size_t HAL_USBControllerInfo(int bus, struct usbinfo *info, size_t len)
| Entry | |
|---|---|
| bus | Bus/interface number to query |
| info | usbinfo pointer to fill with data |
| len | Length of info |
| Exit | |
|---|---|
| - | Returns sizeof( usbinfo ) or 0 for failure. |
This is an internal call for OS use only and should not be used by user software.
Reads information about the available USB controllers. The information is stored in a usbinfo struct:
struct usbinfo {
enum {
OHCI = 0,
EHCI = 1,
MUSBMHDRC = 2
} type; /* Controller type */
int32 flags; /* Extra flags */
void *hw; /* Logical address of controller registers */
int devno; /* Device (interrupt) number of controller */
}
The available flags are as follows:
| Bit | Meaning |
|---|---|
| 0 | Port power controlled via HAL_USBPortPower (OHCI) |
| 1 | Port status read via HAL_USBPortStatus (OHCI) |
| 2 | Port status IRQ number available via HAL_USBPortIRQ (OHCI) |
| 3 | Must use 32bit access for all registers (EHCI) |