Showing changes from revision #3 to #4:
Added | Removed | Changed
int HAL_USBPortDevice(int bus, int port)
Entry | |
---|---|
bus | Bus/interface number to query |
port | Port number to query |
Exit | |
---|---|
- | Returns the device number (IRQ number) of overcurrent sense on the port of the given bus |
This is an internal call for OS use only and should not be used by user software.
Returns device number corresponding to the overcurrent sense circuitry for a single port. A device number refers to the IRQ device number for interrupt calls.
The device number may be shared across several ports (denoted by bit 31 of the device number being set) in the case where, for example, the overcurrent sense lines are wired to a GPIO controller that has only one interrupt output for all its input pins. The HAL_USBPortIRQStatus entry point must be used to determine whether the line is interrupting when deciding whether to claim the respective device vector, or pass it on.
Flag bit 1 of the flags returned by HAL_USBControllerInfo denotes whether the HAL understands how the root hub is wired on the circuit board, if that bit is clear then HAL_USBPortDevice, HAL_USBPortIRQClear and HAL_USBPortIRQStatus are not implemented and an HCI generic means of monitoring the root hub ports must be used as a fallback.
The bus referred to is the same as the one used to enumerate via HAL_USBControllerInfo.