USB_DeviceRegister (SWI&55382) — Register a device
R0 | Pointer to USB host controller driver structure |
R1 | Pointer to unique device number. See below. |
R2 | Device speed Table A.6, “Constants used for device speed” |
R3 | Reserved. Must be set to zero. |
R4 | Reserved. Must be set to zero. |
R0 | Pointer to endpoint structure |
R1 | Error code Table A.1, “Error codes used by the USB system” |
R2, R3, R4 | Preserved |
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.