USB_EndpointRegister (SWI &55380)
Prev | Chapter 2. Core SWI Calls | Next

## Name

USB_EndpointRegister (SWI &55380) — Installs a new endpoint for a given device.

## On Entry

R0 | Pointer to device structure
R1 | Endpoint number ???
R2 | Transfer type Table A.5
R3 | Data payload size
R4 | Number of frames that must pass until the next requests can be sent/received
R5 | Reserved. Must be set to zero.
R6 | Reserved. Must be set to zero.

## On Exit

R0 | Pointer to endpoint structure or 0 on error.
R1 | Error code Table A.1.
R2, R3, R4 | Preserved.

## Use

A reference to the new endpoint structure is registered automatically if call is successful. The reference to the device structure is deregistered automatically in every case.

The parameters passed to this function must correspond to that which can be obtained for an endpoint of an USB device by getting an endpoint descriptor for that device and which are corresponding to the actual configuration of this device.

This call is normally used only internally when a configuration for a device has been set, which requires endpoints using this configuration to be established. For every registered device a default pipe must be registered.

Note that an endpoint may either input or output or both directions. This selection is done by passing a long endpoint number to the functions. You must also pass the transfer type of the endpoint and some parameters describing the transfer type in more detail.

If successful a pointer to the new endpoint structure will be returned. If the call is not successful a NULL pointer and an according Error code will be returned.

## Related SWI's

USB_EndpointDeregister (SWI&55381)

Prev | Up | Next
Chapter 2. Core SWI Calls | Home | USB_EndpointDeregister (SWI&55381)