USB_EndpointInformation (SWI&55396)

USB_EndpointInformation (SWI&55396) — Returns information about a given endpoint.

On Entry

R0Pointer to an array of 4 Byte Words.
R10
R2Maximal number of elements inside the array.
R3Pointer to endpoint structure.
R4Reserved. Must be set to zero.
R5Reserved. Must be set to zero.

On Exit

R0preserved
R1Error code Table A.1, “Error codes used by the USB system”
R2Number of elements inside the array which really have been filled.
R3, R4, R5preserved

Use

The reference to the endpoint structure is kept in every case.

This SWI is used to obtain various information about a given endpoint. Normally a direct USB Descriptor request would be the better choice but such a request consists of several steps and so this SWI may be the faster choice. You can also use this call to see whether a pipe is used. But note that this command does not implement a Test-And-Set-operation so the results of this call may be invalid a moment later in a parallel environment.

Array elementDescription
0Pointer to controller structure. Don't use for reference purposes but for comparison at Service call or USB_FindObject.
1Pointer to device structure. Don't use for reference purposes but for comparison at Service call or USB_FindObject.
2Device number of the device the endpoint belongs to.
3Device speed Table A.6, “Constants used for device speed”
4Endpoint number Table 1.5, “Bits of endpoint address”
5Transfer type Table A.5, “Constants used for type of USB transfer”
6Data payload size. May vary from the size inside endpoint descriptor.
7Number of frames that must pass until the next requests can be sent/received
8Number of pipes open at this endpoint. Bit 31 is set if pipes are in shared mode, else pipe isn't shared.

Related SWI's

USB_EndpointRegister (SWI &55380)
USB_PipeOpen (SWI&5538B)
USB_FindObject (SWI&55387)