USB_EndpointInformation (SWI&55396)
Prev | Chapter 2. Core SWI Calls | Next

## Name

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

## On Entry

R0 | Pointer to an array of 4 Byte Words.
R1 | 0
R2 | Maximal number of elements inside the array.
R3 | Pointer to endpoint structure.
R4 | Reserved. Must be set to zero.
R5 | Reserved. Must be set to zero.

## On Exit

R0 | preserved
R1 | Error code Table A.1
R2 | Number of elements inside the array which really have been filled.
R3, R4, R5 | preserved

## 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 element | Description
--- | ---
0 | Pointer to controller structure. Don't use for reference purposes but for comparison at Service call or USB_FindObject.
1 | Pointer to device structure. Don't use for reference purposes but for comparison at Service call or USB_FindObject.
2 | Device number of the device the endpoint belongs to.
3 | Device speed Table A.6
4 | Endpoint number ???
5 | Transfer type Table A.5
6 | Data payload size. May vary from the size inside endpoint descriptor.
7 | Number of frames that must pass until the next requests can be sent/received
8 | Number 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)

Prev | Up | Next
USB_FastAccessInformation (SWI&55395) | Home | USB_TransactionTracking (SWI&55397)