USB_DeviceRegister (SWI&55382)
Prev | Chapter 2. Core SWI Calls | Next

## Name

USB_DeviceRegister (SWI&55382) — Register a device

## On Entry

R0 | Pointer to USB host controller driver structure
R1 | Pointer to unique device number. See below.
R2 | Device speed Table A.6
R3 | Reserved. Must be set to zero.
R4 | Reserved. Must be set to zero.

## On Exit

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

## Use

The reference to the USB host controller driver structure is deregistered automatically in every case.

A reference to the new device structure is registered automatically if call is successful.

You are able to pass a pointer to a given unique device number in the range from 0 to USB_DEVICE_MAX or this number is selected automatically if you are passing USB_DEVICE_AUTO_NUMBER. In this case the number will be written back into the value your pointer is pointing to. You must also determine the speed of a device.

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

This call is normally used only internally by the USB-Hub driver module when a device has been connected.

## Related SWI's

USB_DeviceDeregister (SWI&55383)

Prev | Up | Next
USB_EndpointDeregister (SWI&55381) | Home | USB_DeviceDeregister (SWI&55383)