USB Controller
USB_OTG_MODE_ASIDE_DEV indicates that the controller is in device mode on the A-side
of the cable.
USB_OTG_MODE_BSIDE_HOST indicates that the controller is in host mode on the B-side
of the cable.
USB_OTG_MODE_BSIDE_DEV indicates that the controller is in device mode on the B-side
of the cable. If and OTG session request is started with no cable in place this is the default
mode for the controller.
USB_OTG_MODE_NONE indicates that the controller is not attempting to determine its role
in the system.
For Dual Mode controllers:
The function will return on of the following values: USB_DUAL_MODE_HOST,
USB_DUAL_MODE_DEVICE, or USB_DUAL_MODE_NONE.
USB_DUAL_MODE_HOST indicates that the controller is acting as a host.
USB_DUAL_MODE_DEVICE indicates that the controller acting as a device.
USB_DUAL_MODE_NONE indicates that the controller is not active as either a host or device.
Returns:
Returns USB_OTG_MODE_ASIDE_HOST, USB_OTG_MODE_ASIDE_DEV,
USB_OTG_MODE_BSIDE_HOST, USB_OTG_MODE_BSIDE_DEV,
USB_OTG_MODE_NONE, USB_DUAL_MODE_HOST, USB_DUAL_MODE_DEVICE,
or USB_DUAL_MODE_NONE.
24.3.1.55 ROM_USBNumEndpointsGet
Returns the number of USB endpoint pairs on the device.
Prototype:
uint32_t
ROM_USBNumEndpointsGet(uint32_t ui32Base)
ROM Location:
ROM_APITABLE is an array of pointers located at 0x0100.0010.
ROM_USBTABLE is an array of pointers located at ROM_APITABLE[16].
ROM_USBNumEndpointsGet is a function pointer located at ROM_USBTABLE[61].
Parameters:
ui32Base specifies the USB module base address.
Description:
This function returns the number of endpoint pairs supported by the USB controller corre-
sponding to the passed base address. The value returned is the number of IN or OUT end-
points available and does not include endpoint 0 (the control endpoint). For example, if 15 is
returned, there are 15 IN and 15 OUT endpoints available in addition to endpoint 0.
Returns:
Returns the number of IN or OUT endpoints available.
338 April 8, 2013