Difference between revisions of "Unit USB"
Line 3,559: | Line 3,559: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 3,571: | Line 3,571: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 3,583: | Line 3,583: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 3,595: | Line 3,595: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 3,610: | Line 3,610: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to get the address for | | The USB device to get the address for | ||
|- | |- | ||
− | ! | + | ! Return |
| Device address or 0 on failure | | Device address or 0 on failure | ||
|- | |- | ||
Line 3,625: | Line 3,625: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to set the address for | | The USB device to set the address for | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 3,640: | Line 3,640: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to read the descriptor from | | The USB device to read the descriptor from | ||
|- | |- | ||
− | ! | + | ! bRequest |
| See USBControlRequest | | See USBControlRequest | ||
|- | |- | ||
− | ! | + | ! bmRequestType |
| See USBControlRequest | | See USBControlRequest | ||
|- | |- | ||
− | ! | + | ! wValue |
| See USBControlRequest | | See USBControlRequest | ||
|- | |- | ||
− | ! | + | ! wIndex |
| See USBControlRequest | | See USBControlRequest | ||
|- | |- | ||
− | ! | + | ! Data |
| See USBControlRequest | | See USBControlRequest | ||
|- | |- | ||
− | ! | + | ! Length |
| See USBControlRequest | | See USBControlRequest | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 3,673: | Line 3,673: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to read the device descriptor from | | The USB device to read the device descriptor from | ||
|- | |- | ||
− | ! | + | ! Data |
| See USBControlRequest | | See USBControlRequest | ||
|- | |- | ||
− | ! | + | ! Length |
| See USBControlRequest | | See USBControlRequest | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 3,694: | Line 3,694: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to create the device descriptor for | | The USB device to create the device descriptor for | ||
|- | |- | ||
− | ! | + | ! Length |
| The length of the descriptor to create | | The length of the descriptor to create | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 3,712: | Line 3,712: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to read the device descriptor from | | The USB device to read the device descriptor from | ||
|- | |- | ||
− | ! | + | ! Length |
| The amount of the descriptor to read which may be less than the full size | | The amount of the descriptor to read which may be less than the full size | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 3,730: | Line 3,730: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to read the device descriptor from | | The USB device to read the device descriptor from | ||
|- | |- | ||
− | ! | + | ! Length |
| The amount of the descriptor to read which may be less than the full size | | The amount of the descriptor to read which may be less than the full size | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 3,748: | Line 3,748: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to create the configurations for | | The USB device to create the configurations for | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 3,763: | Line 3,763: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to read the configurations for | | The USB device to read the configurations for | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 3,778: | Line 3,778: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to create the configuration for | | The USB device to create the configuration for | ||
|- | |- | ||
− | ! | + | ! Index |
| The index of the configuration to create | | The index of the configuration to create | ||
|- | |- | ||
− | ! | + | ! Size |
| The size of the configuration descriptor to create | | The size of the configuration descriptor to create | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 3,799: | Line 3,799: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to read the configuration for | | The USB device to read the configuration for | ||
|- | |- | ||
− | ! | + | ! Index |
| The index of the configuration to read | | The index of the configuration to read | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 3,817: | Line 3,817: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to read the string descriptor from | | The USB device to read the string descriptor from | ||
|- | |- | ||
− | ! | + | ! Index |
| The index of the string descriptor to read | | The index of the string descriptor to read | ||
|- | |- | ||
− | ! | + | ! Data |
| See USBControlRequest | | See USBControlRequest | ||
|- | |- | ||
− | ! | + | ! Length |
| See USBControlRequest | | See USBControlRequest | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 3,841: | Line 3,841: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to read the string descriptor from | | The USB device to read the string descriptor from | ||
|- | |- | ||
− | ! | + | ! Index |
| The index of the string descriptor to read | | The index of the string descriptor to read | ||
|- | |- | ||
− | ! | + | ! LanguageId |
| The language identifier of the string descriptor to read (eg USB_LANGID_US_ENGLISH) | | The language identifier of the string descriptor to read (eg USB_LANGID_US_ENGLISH) | ||
|- | |- | ||
− | ! | + | ! Data |
| See USBControlRequest | | See USBControlRequest | ||
|- | |- | ||
− | ! | + | ! Length |
| See USBControlRequest | | See USBControlRequest | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 3,868: | Line 3,868: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to read the language identifiers from | | The USB device to read the language identifiers from | ||
|- | |- | ||
− | ! | + | ! Return |
| An array of supported language identifiers (Unused values are returned as zero) | | An array of supported language identifiers (Unused values are returned as zero) | ||
|- | |- | ||
Line 3,883: | Line 3,883: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to read the string descriptor from | | The USB device to read the string descriptor from | ||
|- | |- | ||
− | ! | + | ! Index |
| The index of the string descriptor to read | | The index of the string descriptor to read | ||
|- | |- | ||
− | ! | + | ! Return |
| The ANSI string content of the string descriptor or an empty string on failure | | The ANSI string content of the string descriptor or an empty string on failure | ||
|- | |- | ||
Line 3,901: | Line 3,901: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to read the string descriptor from | | The USB device to read the string descriptor from | ||
|- | |- | ||
− | ! | + | ! Index |
| The index of the string descriptor to read | | The index of the string descriptor to read | ||
|- | |- | ||
− | ! | + | ! Language Id |
| The language identifier of the string descriptor to read (eg USB_LANGID_US_ENGLISH) | | The language identifier of the string descriptor to read (eg USB_LANGID_US_ENGLISH) | ||
|- | |- | ||
− | ! | + | ! Return |
| The ANSI string content of the string descriptor or an empty string on failure | | The ANSI string content of the string descriptor or an empty string on failure | ||
|- | |- | ||
Line 3,922: | Line 3,922: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to read the string descriptor from | | The USB device to read the string descriptor from | ||
|- | |- | ||
− | ! | + | ! Index |
| The index of the string descriptor to read | | The index of the string descriptor to read | ||
|- | |- | ||
− | ! | + | ! Return |
| The Unicode string content of the string descriptor or an empty string on failure | | The Unicode string content of the string descriptor or an empty string on failure | ||
|- | |- | ||
Line 3,940: | Line 3,940: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to read the string descriptor from | | The USB device to read the string descriptor from | ||
|- | |- | ||
− | ! | + | ! Index |
| The index of the string descriptor to read | | The index of the string descriptor to read | ||
|- | |- | ||
− | ! | + | ! LanguageId |
| The language identifier of the string descriptor to read (eg USB_LANGID_US_ENGLISH) | | The language identifier of the string descriptor to read (eg USB_LANGID_US_ENGLISH) | ||
|- | |- | ||
− | ! | + | ! Return |
| The Unicode string content of the string descriptor or an empty string on failure | | The Unicode string content of the string descriptor or an empty string on failure | ||
|- | |- | ||
Line 3,961: | Line 3,961: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to read the configuration descriptor from | | The USB device to read the configuration descriptor from | ||
|- | |- | ||
− | ! | + | ! Index |
| The index of the configuration descriptor to read | | The index of the configuration descriptor to read | ||
|- | |- | ||
− | ! | + | ! Data |
| See USBControlRequest | | See USBControlRequest | ||
|- | |- | ||
− | ! | + | ! Length |
| See USBControlRequest | | See USBControlRequest | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 3,985: | Line 3,985: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to get the current configuration for | | The USB device to get the current configuration for | ||
|- | |- | ||
− | ! | + | ! ConfigurationValue |
| The current configuration (As per bConfigurationValue in the configuration descriptor) | | The current configuration (As per bConfigurationValue in the configuration descriptor) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 4,003: | Line 4,003: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to set the configuration for | | The USB device to set the configuration for | ||
|- | |- | ||
− | ! | + | ! ConfigurationValue |
| The configuration to set (As per bConfigurationValue in the configuration descriptor) | | The configuration to set (As per bConfigurationValue in the configuration descriptor) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 4,021: | Line 4,021: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to find the configuration for | | The USB device to find the configuration for | ||
|- | |- | ||
− | ! | + | ! ConfigurationValue |
| The configuration value to find (As per bConfigurationValue in the configuration descriptor) | | The configuration value to find (As per bConfigurationValue in the configuration descriptor) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB Configuration if completed or nil on failure | | USB Configuration if completed or nil on failure | ||
|- | |- | ||
Line 4,039: | Line 4,039: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to get the hub for | | The USB device to get the hub for | ||
|- | |- | ||
− | ! | + | ! Return |
| USB Hub if successful or nil on failure | | USB Hub if successful or nil on failure | ||
|- | |- | ||
Line 4,054: | Line 4,054: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to get the port for | | The USB device to get the port for | ||
|- | |- | ||
− | ! | + | ! Return |
| USB Port if successful or nil on failure | | USB Port if successful or nil on failure | ||
|- | |- | ||
Line 4,069: | Line 4,069: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to get the interface alternate setting for | | The USB device to get the interface alternate setting for | ||
|- | |- | ||
− | ! | + | ! Index |
| The index of the interface to get (As per bInterfaceNumber in the interface descriptor) | | The index of the interface to get (As per bInterfaceNumber in the interface descriptor) | ||
|- | |- | ||
− | ! | + | ! AlternateSetting |
| The current alternate setting of the specified interface (As per bAlternateSetting in the interface descriptor) | | The current alternate setting of the specified interface (As per bAlternateSetting in the interface descriptor) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 4,090: | Line 4,090: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to set the interface alternate setting for | | The USB device to set the interface alternate setting for | ||
|- | |- | ||
− | ! | + | ! Index |
| The index of the interface to set (As per bInterfaceNumber in the interface descriptor) | | The index of the interface to set (As per bInterfaceNumber in the interface descriptor) | ||
|- | |- | ||
− | ! | + | ! AlternateSetting |
| The alternate setting to set on the specified interface (As per bAlternateSetting in the interface descriptor) | | The alternate setting to set on the specified interface (As per bAlternateSetting in the interface descriptor) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 4,111: | Line 4,111: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to find the interface from | | The USB device to find the interface from | ||
|- | |- | ||
− | ! | + | ! Index |
| The index of the interface to find (As per bInterfaceNumber in the interface descriptor) | | The index of the interface to find (As per bInterfaceNumber in the interface descriptor) | ||
|- | |- | ||
− | ! | + | ! Return |
| The interface for the matching interface of nil if no interface matched | | The interface for the matching interface of nil if no interface matched | ||
|- | |- | ||
Line 4,129: | Line 4,129: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to find the interface from | | The USB device to find the interface from | ||
|- | |- | ||
− | ! | + | ! InterrfaceClass |
| The interface class to match | | The interface class to match | ||
|- | |- | ||
− | ! | + | ! InterfaceSubClass |
| The interface subclass to match | | The interface subclass to match | ||
|- | |- | ||
− | ! | + | ! InterfaceProtocol |
| The interface protocol to match | | The interface protocol to match | ||
|- | |- | ||
− | ! | + | ! Return |
| The interface for the matching interface of nil if no interface matched | | The interface for the matching interface of nil if no interface matched | ||
|- | |- | ||
Line 4,153: | Line 4,153: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to find the endpoint from | | The USB device to find the endpoint from | ||
|- | |- | ||
− | ! | + | ! Interrface |
| The interface to find the endpoint from | | The interface to find the endpoint from | ||
|- | |- | ||
− | ! | + | ! Index |
| The index of the endpoint to find (First endpoint is zero) | | The index of the endpoint to find (First endpoint is zero) | ||
|- | |- | ||
− | ! | + | ! Return |
| The endpoint for the matching endpoint of nil if no endpoint matched | | The endpoint for the matching endpoint of nil if no endpoint matched | ||
|- | |- | ||
Line 4,174: | Line 4,174: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to find the endpoint from | | The USB device to find the endpoint from | ||
|- | |- | ||
− | ! | + | ! Interrface |
| The interface to find the endpoint from | | The interface to find the endpoint from | ||
|- | |- | ||
− | ! | + | ! Direction |
| The direction of the endpoint to find (eg USB_DIRECTION_OUT) | | The direction of the endpoint to find (eg USB_DIRECTION_OUT) | ||
|- | |- | ||
− | ! | + | ! TransferType |
| The transfer type of the endpoint to find (eg USB_TRANSFER_TYPE_BULK) | | The transfer type of the endpoint to find (eg USB_TRANSFER_TYPE_BULK) | ||
|- | |- | ||
− | ! | + | ! Return |
| The endpoint for the matching endpoint of nil if no endpoint matched | | The endpoint for the matching endpoint of nil if no endpoint matched | ||
|- | |- | ||
Line 4,198: | Line 4,198: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to find the endpoint from | | The USB device to find the endpoint from | ||
|- | |- | ||
− | ! | + | ! Interrface |
| The interface to find the endpoint from | | The interface to find the endpoint from | ||
|- | |- | ||
− | ! | + | ! Direction |
| The direction of the endpoint to find (eg USB_DIRECTION_OUT) | | The direction of the endpoint to find (eg USB_DIRECTION_OUT) | ||
|- | |- | ||
− | ! | + | ! TransferType |
| The transfer type of the endpoint to find (eg USB_TRANSFER_TYPE_BULK) | | The transfer type of the endpoint to find (eg USB_TRANSFER_TYPE_BULK) | ||
|- | |- | ||
− | ! | + | ! Index |
| The index returned from the last call, pass 0 on the first call | | The index returned from the last call, pass 0 on the first call | ||
|- | |- | ||
− | ! | + | ! Return |
| The endpoint for the matching endpoint of nil if no endpoint matched | | The endpoint for the matching endpoint of nil if no endpoint matched | ||
|- | |- | ||
Line 4,225: | Line 4,225: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to find the endpoint from | | The USB device to find the endpoint from | ||
|- | |- | ||
− | ! | + | ! Interrface |
| The interface to find the endpoint from | | The interface to find the endpoint from | ||
|- | |- | ||
− | ! | + | ! Direction |
| The direction of the endpoint to find (eg USB_DIRECTION_OUT) | | The direction of the endpoint to find (eg USB_DIRECTION_OUT) | ||
|- | |- | ||
− | ! | + | ! TransferType |
| The transfer type of the endpoint to find (eg USB_TRANSFER_TYPE_BULK) | | The transfer type of the endpoint to find (eg USB_TRANSFER_TYPE_BULK) | ||
|- | |- | ||
− | ! | + | ! Return |
| The number of matching endpoints on the specified interface | | The number of matching endpoints on the specified interface | ||
|- | |- | ||
Line 4,249: | Line 4,249: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to find the alternate setting from | | The USB device to find the alternate setting from | ||
|- | |- | ||
− | ! | + | ! Interrface |
| The interface to find the alternate setting from | | The interface to find the alternate setting from | ||
|- | |- | ||
− | ! | + | ! Index |
| The index of the alternate setting to find (First alternate setting is zero) | | The index of the alternate setting to find (First alternate setting is zero) | ||
|- | |- | ||
− | ! | + | ! Return |
| The alternate setting for the matching alternate setting of nil if no alternate setting matched | | The alternate setting for the matching alternate setting of nil if no alternate setting matched | ||
|- | |- | ||
Line 4,270: | Line 4,270: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to find the endpoint from | | The USB device to find the endpoint from | ||
|- | |- | ||
− | ! | + | ! Interrface |
| The interface to find the endpoint from | | The interface to find the endpoint from | ||
|- | |- | ||
− | ! | + | ! Alternate |
| The alternate setting to find the endpoint from | | The alternate setting to find the endpoint from | ||
|- | |- | ||
− | ! | + | ! Index |
| The index of the endpoint to find (First endpoint is zero) | | The index of the endpoint to find (First endpoint is zero) | ||
|- | |- | ||
− | ! | + | ! Return |
| The endpoint for the matching endpoint of nil if no endpoint matched | | The endpoint for the matching endpoint of nil if no endpoint matched | ||
|- | |- | ||
Line 4,294: | Line 4,294: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to find the endpoint from | | The USB device to find the endpoint from | ||
|- | |- | ||
− | ! | + | ! Interrface |
| The interface to find the endpoint from | | The interface to find the endpoint from | ||
|- | |- | ||
− | ! | + | ! Alternate |
| The alternate setting to find the endpoint from | | The alternate setting to find the endpoint from | ||
|- | |- | ||
− | ! | + | ! Direction |
| The direction of the endpoint to find (eg USB_DIRECTION_OUT) | | The direction of the endpoint to find (eg USB_DIRECTION_OUT) | ||
|- | |- | ||
− | ! | + | ! TransferType |
| The transfer type of the endpoint to find (eg USB_TRANSFER_TYPE_BULK) | | The transfer type of the endpoint to find (eg USB_TRANSFER_TYPE_BULK) | ||
|- | |- | ||
− | ! | + | ! Return |
| The endpoint for the matching endpoint of nil if no endpoint matched | | The endpoint for the matching endpoint of nil if no endpoint matched | ||
|- | |- | ||
Line 4,321: | Line 4,321: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to enable the feature for | | The USB device to enable the feature for | ||
|- | |- | ||
− | ! | + | ! Endpoint |
| The endpoint to enable the feature on | | The endpoint to enable the feature on | ||
|- | |- | ||
− | ! | + | ! Feature |
| The feature to enable | | The feature to enable | ||
|- | |- | ||
− | ! | + | ! Index |
| To be documented | | To be documented | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 4,345: | Line 4,345: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to disable the feature for | | The USB device to disable the feature for | ||
|- | |- | ||
− | ! | + | ! Endpoint |
| The endpoint to disable the feature on | | The endpoint to disable the feature on | ||
|- | |- | ||
− | ! | + | ! Feature'' |
| The feature to disable | | The feature to disable | ||
|- | |- | ||
− | ! | + | ! Index |
| To be documented | | To be documented | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 4,369: | Line 4,369: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to set the state for | | The USB device to set the state for | ||
|- | |- | ||
− | ! | + | ! Status |
| The new state to set and notify | | The new state to set and notify | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 4,387: | Line 4,387: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to set the status for | | The USB device to set the status for | ||
|- | |- | ||
− | ! | + | ! Status |
| The new status to set and notify | | The new status to set and notify | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 4,405: | Line 4,405: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The device to attempt to bind a driver to | | The device to attempt to bind a driver to | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 4,420: | Line 4,420: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The device to unbind a driver from | | The device to unbind a driver from | ||
|- | |- | ||
− | ! | + | ! Driver |
| The driver to unbind the device from (nil to unbind from current driver) | | The driver to unbind the device from (nil to unbind from current driver) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 4,438: | Line 4,438: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| New USB device to configure and initialize | | New USB device to configure and initialize | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 4,453: | Line 4,453: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to shutdown and detach | | The USB device to shutdown and detach | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 4,468: | Line 4,468: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Host |
| The Host this device is attached to | | The Host this device is attached to | ||
|- | |- | ||
− | ! | + | ! Parent |
| The Parent device (Hub) this device is attached to (nil if this device is a root hub) | | The Parent device (Hub) this device is attached to (nil if this device is a root hub) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to new Device entry or nil if device could not be created | | Pointer to new Device entry or nil if device could not be created | ||
|- | |- | ||
Line 4,486: | Line 4,486: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The device to deregister and destroy | | The device to deregister and destroy | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 4,501: | Line 4,501: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,513: | Line 4,513: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,525: | Line 4,525: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,537: | Line 4,537: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,549: | Line 4,549: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,561: | Line 4,561: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to new Driver entry or nil if driver could not be created | | Pointer to new Driver entry or nil if driver could not be created | ||
|- | |- | ||
Line 4,573: | Line 4,573: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Size |
| Size in bytes to allocate for new driver (Including the driver entry) | | Size in bytes to allocate for new driver (Including the driver entry) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to new Driver entry or nil if driver could not be created | | Pointer to new Driver entry or nil if driver could not be created | ||
|- | |- | ||
Line 4,588: | Line 4,588: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,600: | Line 4,600: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,612: | Line 4,612: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,624: | Line 4,624: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,636: | Line 4,636: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,648: | Line 4,648: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,660: | Line 4,660: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Host |
| The USB host to set the state for | | The USB host to set the state for | ||
|- | |- | ||
− | ! | + | ! State |
| The new state to set and notify | | The new state to set and notify | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 4,678: | Line 4,678: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to new Host entry or nil if host could not be created | | Pointer to new Host entry or nil if host could not be created | ||
|- | |- | ||
Line 4,690: | Line 4,690: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Size |
| Size in bytes to allocate for new host (Including the host entry) | | Size in bytes to allocate for new host (Including the host entry) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to new Host entry or nil if host could not be created | | Pointer to new Host entry or nil if host could not be created | ||
|- | |- | ||
Line 4,705: | Line 4,705: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,717: | Line 4,717: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,729: | Line 4,729: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,741: | Line 4,741: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,753: | Line 4,753: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,765: | Line 4,765: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,777: | Line 4,777: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,789: | Line 4,789: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 4,801: | Line 4,801: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The device that the request will be sent to | | The device that the request will be sent to | ||
|- | |- | ||
− | ! | + | ! Size |
| The size of the data buffer to allocate | | The size of the data buffer to allocate | ||
|- | |- | ||
− | ! | + | ! Return |
| The newly allocated buffer or nil on failure | | The newly allocated buffer or nil on failure | ||
|- | |- | ||
Line 4,819: | Line 4,819: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The device that the request will be sent to | | The device that the request will be sent to | ||
|- | |- | ||
− | ! | + | ! Size |
| The size of the data buffer to allocate | | The size of the data buffer to allocate | ||
|- | |- | ||
− | ! | + | ! Flags |
| The returned flags for the allocated buffer (eg USB_REQUEST_FLAG_SHARED) | | The returned flags for the allocated buffer (eg USB_REQUEST_FLAG_SHARED) | ||
|- | |- | ||
− | ! | + | ! Return |
| The newly allocated buffer or nil on failure | | The newly allocated buffer or nil on failure | ||
|- | |- | ||
Line 4,840: | Line 4,840: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! '''Device | + | ! '''Device |
| The device that the request will be sent to | | The device that the request will be sent to | ||
|- | |- | ||
− | ! | + | ! Buffer |
| The data buffer to validate | | The data buffer to validate | ||
|- | |- | ||
− | ! | + | ! Size |
| The size of the data buffer | | The size of the data buffer | ||
|- | |- | ||
− | ! | + | ! Flags |
| The returned flags for the validated buffer (eg USB_REQUEST_FLAG_SHARED) | | The returned flags for the validated buffer (eg USB_REQUEST_FLAG_SHARED) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS on success or another error code on failure | | USB_STATUS_SUCCESS on success or another error code on failure | ||
|- | |- | ||
Line 4,864: | Line 4,864: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Data |
| The buffer to be released | | The buffer to be released | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS on success or another error code on failure | | USB_STATUS_SUCCESS on success or another error code on failure | ||
|- | |- | ||
Line 4,879: | Line 4,879: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device this request will be sent to | | The USB device this request will be sent to | ||
|- | |- | ||
− | ! | + | ! Endpoint |
| The Endpoint descriptor this request will be sent to (Or nil for the default control endpoint) | | The Endpoint descriptor this request will be sent to (Or nil for the default control endpoint) | ||
|- | |- | ||
− | ! | + | ! Callback |
| The callback function to be called on completion of the request | | The callback function to be called on completion of the request | ||
|- | |- | ||
− | ! | + | ! Size |
| The size of the data buffer for the request | | The size of the data buffer for the request | ||
|- | |- | ||
− | ! | + | ! DriverData |
| Device driver private data for the callback (Optional) | | Device driver private data for the callback (Optional) | ||
|- | |- | ||
− | ! | + | ! Return |
| The newly allocated request or nil on failure | | The newly allocated request or nil on failure | ||
|- | |- | ||
Line 4,906: | Line 4,906: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device this request will be sent to | | The USB device this request will be sent to | ||
|- | |- | ||
− | ! | + | ! Endpoint |
| The Endpoint descriptor this request will be sent to (Or nil for the default control endpoint) | | The Endpoint descriptor this request will be sent to (Or nil for the default control endpoint) | ||
|- | |- | ||
− | ! | + | ! Callback |
| The callback function to be called on completion of the request | | The callback function to be called on completion of the request | ||
|- | |- | ||
− | ! | + | ! Data |
| The returned data buffer allocated for the request (Or nil if size is zero)(Pass an existing buffer to prevent allocation) | | The returned data buffer allocated for the request (Or nil if size is zero)(Pass an existing buffer to prevent allocation) | ||
|- | |- | ||
− | ! | + | ! Size |
| The size of the data buffer for the request | | The size of the data buffer for the request | ||
|- | |- | ||
− | ! | + | ! DriverData |
| Device driver private data for the callback (Optional) | | Device driver private data for the callback (Optional) | ||
|- | |- | ||
− | ! | + | ! Return |
| The newly allocated request or nil on failure | | The newly allocated request or nil on failure | ||
|- | |- | ||
Line 4,936: | Line 4,936: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The request to be released | | The request to be released | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS on success or another error code on failure | | USB_STATUS_SUCCESS on success or another error code on failure | ||
|- | |- | ||
Line 4,951: | Line 4,951: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The request to be initialized | | The request to be initialized | ||
|- | |- | ||
− | ! | + | ! Callback |
| The callback function to be called on completion of the request | | The callback function to be called on completion of the request | ||
|- | |- | ||
− | ! | + | ! Data |
| The returned data buffer allocated for the request (Or nil if size is zero) | | The returned data buffer allocated for the request (Or nil if size is zero) | ||
|- | |- | ||
− | ! | + | ! Size |
| The size of the data buffer for the request | | The size of the data buffer for the request | ||
|- | |- | ||
− | ! | + | ! DriverData |
| Device driver private data for the callback (Optional) | | Device driver private data for the callback (Optional) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS on success or another error code on failure | | USB_STATUS_SUCCESS on success or another error code on failure | ||
|- | |- | ||
Line 4,978: | Line 4,978: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The request to be submitted | | The request to be submitted | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| The request will be completed asynchronously by the host controller and the completion callback will be called when the request has either succeeded or failed | | The request will be completed asynchronously by the host controller and the completion callback will be called when the request has either succeeded or failed | ||
|- | |- | ||
Line 4,996: | Line 4,996: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The request to be cancelled | | The request to be cancelled | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 5,011: | Line 5,011: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The USB request which has completed | | The USB request which has completed | ||
|- | |- | ||
− | ! | + | ! Note |
| Not intended to be called directly by applications | | Not intended to be called directly by applications | ||
|- | |- | ||
Line 5,026: | Line 5,026: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to send the control request to | | The USB device to send the control request to | ||
|- | |- | ||
− | ! | + | ! Endpoint |
| The Endpoint to use for the control request (or nil for the default control endpoint) | | The Endpoint to use for the control request (or nil for the default control endpoint) | ||
|- | |- | ||
− | ! | + | ! bRequest |
− | | The request to send (See Section 9.4 of the USB 2.0 specification for Standard requests) | + | | The request to send |
+ | (See Section 9.4 of the USB 2.0 specification for Standard requests) | ||
|- | |- | ||
− | ! | + | ! bmRequest |
− | | Type of request to send (See Section 9.3.1 of the USB 2.0 specification for Standard request types) | + | | Type of request to send |
+ | (See Section 9.3.1 of the USB 2.0 specification for Standard request types) | ||
|- | |- | ||
− | ! | + | ! wValue |
| Request specific data | | Request specific data | ||
|- | |- | ||
− | ! | + | ! wIndex |
| Request specific data | | Request specific data | ||
|- | |- | ||
− | ! | + | ! Data |
| Buffer for the data to be sent or received from the request (Ignored if wLength is 0) | | Buffer for the data to be sent or received from the request (Ignored if wLength is 0) | ||
|- | |- | ||
− | ! | + | ! wLength |
| Length of the Data buffer in bytes | | Length of the Data buffer in bytes | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 5,062: | Line 5,064: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to send the control request to | | The USB device to send the control request to | ||
|- | |- | ||
− | ! | + | ! Endpoint |
| The Endpoint to use for the control request (or nil for the default control endpoint) | | The Endpoint to use for the control request (or nil for the default control endpoint) | ||
|- | |- | ||
− | ! | + | ! bRequest |
− | | The request to send (See Section 9.4 of the USB 2.0 specification for Standard requests) | + | | The request to send |
+ | (See Section 9.4 of the USB 2.0 specification for Standard requests) | ||
|- | |- | ||
− | ! | + | ! bmRequest |
− | | Type of request to send (See Section 9.3.1 of the USB 2.0 specification for Standard request types) | + | | Type of request to send |
+ | (See Section 9.3.1 of the USB 2.0 specification for Standard request types) | ||
|- | |- | ||
− | ! | + | ! wValue |
| Request specific data | | Request specific data | ||
|- | |- | ||
− | ! | + | ! wIndex |
| Request specific data | | Request specific data | ||
|- | |- | ||
− | ! | + | ! Data |
| Buffer for the data to be sent or received from the request (Ignored if wLength is 0) | | Buffer for the data to be sent or received from the request (Ignored if wLength is 0) | ||
|- | |- | ||
− | ! | + | ! wLength |
| Length of the Data buffer in bytes | | Length of the Data buffer in bytes | ||
|- | |- | ||
− | ! | + | ! Timeout |
| Milliseconds to wait for request to complete (INFINITE to wait forever) | | Milliseconds to wait for request to complete (INFINITE to wait forever) | ||
|- | |- | ||
− | ! | + | ! AllowShort |
| Allow the return size to be less than the requested size | | Allow the return size to be less than the requested size | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 5,104: | Line 5,108: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The USB request which has completed | | The USB request which has completed | ||
|- | |- | ||
− | ! | + | ! Note |
| Not intended to be called directly by applications | | Not intended to be called directly by applications | ||
|- | |- | ||
Line 5,122: | Line 5,126: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to send the request to | | The USB device to send the request to | ||
|- | |- | ||
− | ! | + | ! Endpoint |
| The Endpoint to use for the request | | The Endpoint to use for the request | ||
|- | |- | ||
− | ! | + | ! Data |
| Buffer for the data to be sent or received from the request (Ignored if Size is 0) | | Buffer for the data to be sent or received from the request (Ignored if Size is 0) | ||
|- | |- | ||
− | ! | + | ! Size |
| Size of the Data buffer in bytes | | Size of the Data buffer in bytes | ||
|- | |- | ||
− | ! | + | ! Count |
| The actual number of bytes transferred on completion (May apply even on failure or timeout) | | The actual number of bytes transferred on completion (May apply even on failure or timeout) | ||
|- | |- | ||
− | ! | + | ! Timeout |
| Milliseconds to wait for request to complete (INFINITE to wait forever) | | Milliseconds to wait for request to complete (INFINITE to wait forever) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 5,152: | Line 5,156: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The USB request which has completed | | The USB request which has completed | ||
|- | |- | ||
− | ! | + | ! Note |
| Not intended to be called directly by applications | | Not intended to be called directly by applications | ||
|- | |- | ||
Line 5,167: | Line 5,171: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to send the control request to | | The USB device to send the control request to | ||
|- | |- | ||
− | ! | + | ! Endpoint |
| The Endpoint to use for the control request (or nil for the default control endpoint) | | The Endpoint to use for the control request (or nil for the default control endpoint) | ||
|- | |- | ||
− | ! | + | ! bRequest |
− | | The request to send (See Section 9.4 of the USB 2.0 specification for Standard requests) | + | | The request to send |
+ | (See Section 9.4 of the USB 2.0 specification for Standard requests) | ||
|- | |- | ||
− | ! | + | ! bmRequestType |
− | | Type of request to send (See Section 9.3.1 of the USB 2.0 specification for Standard request types) | + | | Type of request to send |
+ | (See Section 9.3.1 of the USB 2.0 specification for Standard request types) | ||
|- | |- | ||
− | ! | + | ! wValue |
| Request specific data | | Request specific data | ||
|- | |- | ||
− | ! | + | ! wIndex |
| Request specific data | | Request specific data | ||
|- | |- | ||
− | ! | + | ! Data |
| Buffer for the data to be sent or received from the request (Ignored if wLength is 0) | | Buffer for the data to be sent or received from the request (Ignored if wLength is 0) | ||
|- | |- | ||
− | ! | + | ! wLength |
| Length of the Data buffer in bytes | | Length of the Data buffer in bytes | ||
|- | |- | ||
− | ! | + | ! Count |
| The actual number of bytes transferred on completion (May apply even on failure or timeout) | | The actual number of bytes transferred on completion (May apply even on failure or timeout) | ||
|- | |- | ||
− | ! | + | ! Timeout |
| Milliseconds to wait for request to complete (INFINITE to wait forever) | | Milliseconds to wait for request to complete (INFINITE to wait forever) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| This function is very similar to USBControlRequest(Ex) but also returns the actual number of bytes tranferred | | This function is very similar to USBControlRequest(Ex) but also returns the actual number of bytes tranferred | ||
|- | |- | ||
Line 5,212: | Line 5,218: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to send the bulk request to | | The USB device to send the bulk request to | ||
|- | |- | ||
− | ! | + | ! Endpoint |
| The Endpoint to use for the bulk request | | The Endpoint to use for the bulk request | ||
|- | |- | ||
− | ! | + | ! Data |
| Buffer for the data to be sent or received from the request (Ignored if Size is 0) | | Buffer for the data to be sent or received from the request (Ignored if Size is 0) | ||
|- | |- | ||
− | ! | + | ! Size |
| Size of the Data buffer in bytes | | Size of the Data buffer in bytes | ||
|- | |- | ||
− | ! | + | ! Count |
| The actual number of bytes transferred on completion (May apply even on failure or timeout) | | The actual number of bytes transferred on completion (May apply even on failure or timeout) | ||
|- | |- | ||
− | ! | + | ! Timeout |
| Milliseconds to wait for request to complete (INFINITE to wait forever) | | Milliseconds to wait for request to complete (INFINITE to wait forever) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| The type and direction of the transfer is determined from the type and direction of the endpoint | | The type and direction of the transfer is determined from the type and direction of the endpoint | ||
|- | |- | ||
Line 5,245: | Line 5,251: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to send the interrupt request to | | The USB device to send the interrupt request to | ||
|- | |- | ||
− | ! | + | ! Endpoint |
| The Endpoint to use for the interrupt request | | The Endpoint to use for the interrupt request | ||
|- | |- | ||
− | ! | + | ! Data |
| Buffer for the data to be sent or received from the request (Ignored if Size is 0) | | Buffer for the data to be sent or received from the request (Ignored if Size is 0) | ||
|- | |- | ||
− | ! | + | ! Size |
| Size of the Data buffer in bytes | | Size of the Data buffer in bytes | ||
|- | |- | ||
− | ! | + | ! Count |
| The actual number of bytes transferred on completion (May apply even on failure or timeout) | | The actual number of bytes transferred on completion (May apply even on failure or timeout) | ||
|- | |- | ||
− | ! | + | ! Timeout |
| Milliseconds to wait for request to complete (INFINITE to wait forever) | | Milliseconds to wait for request to complete (INFINITE to wait forever) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| The type and direction of the transfer is determined from the type and direction of the endpoint | | The type and direction of the transfer is determined from the type and direction of the endpoint | ||
|- | |- | ||
Line 5,281: | Line 5,287: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Hub |
| The hub to initialize ports for | | The hub to initialize ports for | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 5,296: | Line 5,302: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Hub |
| The hub to power on ports for | | The hub to power on ports for | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 5,311: | Line 5,317: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Hub |
| The hub to create the descriptor for | | The hub to create the descriptor for | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| The class specific hub descriptor is not the same as the device descriptor | | The class specific hub descriptor is not the same as the device descriptor | ||
|- | |- | ||
Line 5,329: | Line 5,335: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Hub |
| The hub to read the descriptor for | | The hub to read the descriptor for | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| The class specific hub descriptor is not the same as the device descriptor | | The class specific hub descriptor is not the same as the device descriptor | ||
|- | |- | ||
Line 5,347: | Line 5,353: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Hub |
| The hub to lock | | The hub to lock | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 5,362: | Line 5,368: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Hub |
| The hub to unlock | | The hub to unlock | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 5,377: | Line 5,383: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Hub |
| The hub to set the state for | | The hub to set the state for | ||
|- | |- | ||
− | ! | + | ! State |
| The new state to set and notify | | The new state to set and notify | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 5,395: | Line 5,401: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device that represents this hub | | The USB device that represents this hub | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to new Hub entry or nil if hub could not be created | | Pointer to new Hub entry or nil if hub could not be created | ||
|- | |- | ||
Line 5,410: | Line 5,416: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Hub |
| The hub to deregister and destroy | | The hub to deregister and destroy | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 5,425: | Line 5,431: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,437: | Line 5,443: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,449: | Line 5,455: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,461: | Line 5,467: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,473: | Line 5,479: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,485: | Line 5,491: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
− | | USB device at which to start the | + | | USB device at which to start the enumeration |
|- | |- | ||
− | ! | + | ! Callback |
| Bind callback function to execute for each device | | Bind callback function to execute for each device | ||
|- | |- | ||
Line 5,500: | Line 5,506: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| USB device at which to start the enumeration | | USB device at which to start the enumeration | ||
|- | |- | ||
− | ! | + | ! Callback |
| Unbind callback function to execute for each device | | Unbind callback function to execute for each device | ||
|- | |- | ||
Line 5,515: | Line 5,521: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| USB device at which to start the enumeration | | USB device at which to start the enumeration | ||
|- | |- | ||
− | ! | + | ! Callback |
| Enumerate callback function to execute for each device | | Enumerate callback function to execute for each device | ||
|- | |- | ||
Line 5,530: | Line 5,536: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Port |
| USB port to reset | | USB port to reset | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the hub lock | | Caller must hold the hub lock | ||
|- | |- | ||
Line 5,548: | Line 5,554: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Port |
| USB port to disable | | USB port to disable | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the hub lock | | Caller must hold the hub lock | ||
A port cannot be enabled in software, only disabled. | A port cannot be enabled in software, only disabled. | ||
Line 5,567: | Line 5,573: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Port |
| USB port to power on | | USB port to power on | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the hub lock | | Caller must hold the hub lock | ||
− | Not all hubs support powering on and off individual ports, you must check if the hub includes the USB_HUB_CHARACTERISTIC_LPSM_PORT in its descriptor | + | Not all hubs support powering on and off individual ports, you must check if the hub includes the USB_HUB_CHARACTERISTIC_LPSM_PORT in its descriptor. |
|- | |- | ||
|} | |} | ||
Line 5,586: | Line 5,592: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Port |
| USB port to power off | | USB port to power off | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the hub lock | | Caller must hold the hub lock | ||
− | Not all hubs support powering on and off individual ports, you must check if the hub includes the USB_HUB_CHARACTERISTIC_LPSM_PORT in its descriptor | + | Not all hubs support powering on and off individual ports, you must check if the hub includes the USB_HUB_CHARACTERISTIC_LPSM_PORT in its descriptor. |
|- | |- | ||
|} | |} | ||
Line 5,605: | Line 5,611: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Port |
| USB port to read status for | | USB port to read status for | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the hub lock | | Caller must hold the hub lock | ||
|- | |- | ||
Line 5,623: | Line 5,629: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Port |
| USB port to enable the feature on | | USB port to enable the feature on | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the hub lock | | Caller must hold the hub lock | ||
|- | |- | ||
Line 5,641: | Line 5,647: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Port |
| USB port to disable the feature on | | USB port to disable the feature on | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the hub lock | | Caller must hold the hub lock | ||
|- | |- | ||
Line 5,659: | Line 5,665: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Port |
| USB port to enable or disable the feature on | | USB port to enable or disable the feature on | ||
|- | |- | ||
− | ! | + | ! Feature |
| The feature to enable or disable | | The feature to enable or disable | ||
|- | |- | ||
− | ! | + | ! Enable |
| True to enable the feature or False to disable the feature | | True to enable the feature or False to disable the feature | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the hub lock | | Caller must hold the hub lock | ||
|- | |- | ||
Line 5,683: | Line 5,689: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Port |
| USB port to attach the new device to | | USB port to attach the new device to | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Caller must hold the hub lock | + | | Caller must hold the hub lock |
+ | Only called in response to a status change on the hub | ||
|- | |- | ||
|} | |} | ||
Line 5,701: | Line 5,708: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Port |
| USB port to detach the device from | | USB port to detach the device from | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Caller must hold the hub lock | + | | Caller must hold the hub lock |
+ | Only called in response to a status change on the hub | ||
|- | |- | ||
|} | |} | ||
Line 5,719: | Line 5,727: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Port |
| USB port to process the status change for | | USB port to process the status change for | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Caller must hold the hub lock | + | | Caller must hold the hub lock |
+ | Only called in response to a status change on the hub | ||
|- | |- | ||
|} | |} | ||
Line 5,737: | Line 5,746: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| One status change request exists for each hub currently connected and is created and submitted by the hub driver when it binds to a new hub device. When a hub is disconnected the hub driver will remove the request when the hub is detached and destroyed. | | One status change request exists for each hub currently connected and is created and submitted by the hub driver when it binds to a new hub device. When a hub is disconnected the hub driver will remove the request when the hub is detached and destroyed. | ||
|- | |- | ||
Line 5,749: | Line 5,758: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The USB request which has completed | | The USB request which has completed | ||
|- | |- | ||
Line 5,761: | Line 5,770: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to attempt to bind to | | The USB device to attempt to bind to | ||
|- | |- | ||
− | ! | + | ! Interrface |
| The USB interface to attempt to bind to (or nil for whole device) | | The USB interface to attempt to bind to (or nil for whole device) | ||
|- | |- | ||
− | ! | + | ! Return |
− | | USB_STATUS_SUCCESS if completed, USB_STATUS_DEVICE_UNSUPPORTED if unsupported or another error code on failure | + | | USB_STATUS_SUCCESS if completed, USB_STATUS_DEVICE_UNSUPPORTED if unsupported or another error code on failure. |
|- | |- | ||
|} | |} | ||
Line 5,779: | Line 5,788: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to unbind from | | The USB device to unbind from | ||
|- | |- | ||
− | ! | + | ! Interrface |
| The USB interface to unbind from (or nil for whole device) | | The USB interface to unbind from (or nil for whole device) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 5,800: | Line 5,809: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,812: | Line 5,821: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,824: | Line 5,833: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,836: | Line 5,845: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,848: | Line 5,857: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,860: | Line 5,869: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,872: | Line 5,881: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,884: | Line 5,893: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,896: | Line 5,905: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,908: | Line 5,917: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,920: | Line 5,929: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,932: | Line 5,941: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,944: | Line 5,953: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,956: | Line 5,965: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,968: | Line 5,977: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,980: | Line 5,989: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 5,992: | Line 6,001: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,004: | Line 6,013: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| USB device to get a description of | | USB device to get a description of | ||
|- | |- | ||
− | ! | + | ! Return |
| A string describing the device | | A string describing the device | ||
|- | |- | ||
Line 6,019: | Line 6,028: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,031: | Line 6,040: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,043: | Line 6,052: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,055: | Line 6,064: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,067: | Line 6,076: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,079: | Line 6,088: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,091: | Line 6,100: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,103: | Line 6,112: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! BCDVersion |
| The bcdUSB value (e.g. from a USB device descriptor) to translate | | The bcdUSB value (e.g. from a USB device descriptor) to translate | ||
|- | |- | ||
− | ! | + | ! Return |
| String describing the USB version | | String describing the USB version | ||
|- | |- | ||
Line 6,118: | Line 6,127: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,130: | Line 6,139: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,142: | Line 6,151: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,154: | Line 6,163: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,166: | Line 6,175: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,178: | Line 6,187: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,190: | Line 6,199: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,202: | Line 6,211: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,214: | Line 6,223: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,226: | Line 6,235: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,238: | Line 6,247: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,250: | Line 6,259: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,262: | Line 6,271: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,274: | Line 6,283: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,286: | Line 6,295: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,298: | Line 6,307: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,310: | Line 6,319: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,322: | Line 6,331: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,334: | Line 6,343: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,346: | Line 6,355: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,358: | Line 6,367: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 6,370: | Line 6,379: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,382: | Line 6,391: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,397: | Line 6,406: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,409: | Line 6,418: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,421: | Line 6,430: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Return |
| Returns True if Hub has multiple Transaction Translators or False if not | | Returns True if Hub has multiple Transaction Translators or False if not | ||
|- | |- | ||
Line 6,433: | Line 6,442: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Return |
| Returns True if Hub is part of a Compound Device or False if not | | Returns True if Hub is part of a Compound Device or False if not | ||
|- | |- | ||
Line 6,445: | Line 6,454: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Return |
| Returns True if Hub supports Port Indicators or False if not | | Returns True if Hub supports Port Indicators or False if not | ||
|- | |- | ||
Line 6,457: | Line 6,466: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Return |
| Returns True if Hub supports per port Power Switching or False if not | | Returns True if Hub supports per port Power Switching or False if not | ||
|- | |- | ||
Line 6,469: | Line 6,478: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Return |
| Returns True if Hub supports per port Over Current Power Protection or False if not | | Returns True if Hub supports per port Over Current Power Protection or False if not | ||
|- | |- | ||
Line 6,481: | Line 6,490: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 6,493: | Line 6,502: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- |
Revision as of 06:45, 20 April 2018
Return to Unit Reference
Contents
[hide]Description
Ultibo USB interface unit
This unit implements the USB core software that does not depend on the specific host controller hardware and is not specific to any single USB device or platform.
Features and limitations:
- This driver is written to be compatible with USB 2.0. USB 3.0 devices work correctly when operating in USB 2.0 compatible mode, actual support for USB 3.0 host controllers and native super speed modes will require some modification to this driver.
- Not all USB transfer types and speeds are supported yet. This depends on the Host Controller Driver, see USBRequestSubmit.
- This driver does not attempt to do any intelligent power management, bandwidth allocation, or transfer scheduling. Devices are always set to their first listed configuration regardless of power requirements. Requests are simply passed to the Host Controller Driver in the order submitted, the Host Controller Driver is responsible for doing any more intelligent scheduling if desired.
- This driver does not support multiple configurations per USB device.If a device happens to have multiple configurations, the first one will be assigned (see devices below for more information).
- By design, it is possible to implement a host controller driver for different host controller hardware without changing any of this code, as long as the host controller driver provides the functions declared in TUSBHost (Start, Stop, Reset, Submit and Cancel).
- By design, this driver has a hard-coded dependency on the USB hub driver because USB is useless without hubs.
To initialize this core USB driver, USBInit must be called by the system startup code. See that function for details.
If the flag USB_AUTOSTART is not set then USBStart must be called to start the USB core. See that function for details.
The other functions exported by this core USB driver are mostly intended to be used by USB device drivers.
Debugging messages in this driver can be enabled by changing the value of USB_DEFAULT_LOG_LEVEL and by enabling the USB_DEBUG define in GlobalDefines.
Be careful when enabling USB debugging as the USB core can generate a lot of messages due to constant polling of interrupt endpoints on devices such as hubs, keyboards and mice.
USB Device
USB devices are the generic implementation of anything that can be connected to the USB bus. All USB devices require a driver to implement the specific behaviour of the device but at the generic level each device will have:
- One or more configurations available. The USB core will first offer the device to drivers without a configuration being selected, the driver may choose a specific configuration if required otherwise the core will simply select the first available configuration.
- One or more interfaces available. On devices with multiple interfaces, the USB core supports different drivers binding to different interfaces. This way combination devices are supported.
- One or more endpoints available. All devices must have a control endpoint and most devices will have one or more bulk, interrupt or isochronous endpoints as well. The USB core will only communicate with the control endpoint to perform generic operations like reading the descriptors and assigning a device address.
Drivers are expected to understand which endpoints they need to communicate with to provide the device specific functionality.
Devices are considered dynamic by the USB core and can be connected or disconnected at any time. The hub driver is responsible for attaching and detaching devices in response to hub status change events and for binding or unbinding drivers as devices are added or removed.
USB Driver
USB drivers implement support for specific devices or specific device classes and provide the interfaces to present those devices to other parts of the system. For example the USB Mass Storage driver accepts devices of the mass storage class and presents them to the file system as a disk device.
All drivers must implement the functions defined in TUSBDriver (Bind and Unbind) and must register themselves with the USB core by calling USBDriverRegister. When a new device is detected the hub driver will enumerate all drivers and call their Bind functions until either one of the drivers accepts the device or all drivers have rejected the device. The hub driver first attempts to bind each driver to the device itself and then offers each driver the option to bind to a single interface on the device. In this way devices that have multiple interfaces of different classes (such as a wireless mouse and keyboard dongle) can actually be bound to multiple drivers which each service a specific interface.
When a new driver is registered the USB core will call the drivers Bind function for each device already present to allow the driver an opportunity to bind to any existing devices that are not serviced by other drivers.
When a device is disconnected the hub driver will first call the Unbind function of any driver that is servicing the device to allow the driver to clean up allocated resources and cancel outstanding requests. Drivers must be careful not to block the hub driver during this process, for example trying to send a USB control message to the device at this time will likely be pointless as in many cases the device will have already been disconnected from the system.
USB Host
USB hosts implement the hardware level interface that supports sending USB requests to the hardware and receiving responses. All handling of interrupts, DMA, transaction sequence, errors and resubmitting/retrying requests is done by the USB host driver. All host drivers must implement the functions defined in TUSBHost (Start, Stop, Reset, Submit and Cancel) and must register themselves with the USB core by calling USBHostRegister. When the USB core is started each registered host driver will be called via the Start function so it can initialize itself and allocate locks, buffers and other resources required to interact with the hardware.
A host driver can also be registered after the USB core has been started and it will be given the opportunity to start itself immediately. In this way USB hosts can potentially be hot pluggable.
Each host driver must also implement a root hub which represents the port or ports that are directly connected to the controller hardware. In many cases this will not be a real hub but will be simulated in the host driver so that the hub driver can interact with it as though it was a standard hub device.
USB Hub
Hubs are one of the fundamental devices in USB and are used to provide connection points (ports) for additional devices. Note that even if no "external" hub is plugged in, the USB still will have at least one logical hub (the root hub) and usually additional "internal" hubs. That is, a USB is a tree of devices where the root node and all non-leaf nodes are hubs. A port on a USB hub may correspond to a port you can physically plug a device into or may correspond to an internal port. USB hubs are commonly based around a design that has 4 ports per hub, so a standard 7 port hub will most often appear as 2 hubs to this driver with one hub connected to a port on the other.
This hub driver is an example of a USB device driver, but it is somewhat special as it mandatory to include this driver if USB is supported at all. This is because it would be impossible to access any USB devices if a hub driver were not available. This hub driver also uses some interfaces in the core driver, such as USBDeviceAttach, that are not useful to any other USB device driver.
The initial entry point of this USB hub driver is USBHubDriverBind, which is called when the USB core has configured a newly attached USB device that may be a hub. USBHubDriverBind is responsible for checking if the device is a hub, and if so, doing hub-specific setup, reading the hub descriptor, powering on the ports, and submitting an asynchronous USB interrupt request to the hub's status change endpoint.
Everything else this hub driver does happens asynchronously as a response to a status change request being completed. Every USB hub has exactly one IN interrupt endpoint called the "status change endpoint". The hub responds on this endpoint whenever the status of the hub or one of the hub's ports has changed, for example when a USB device has been connected or disconnected from a port.
At the hardware level, when a hub has data to send on its status change endpoint, an interrupt will come in from the USB host controller. This eventually will result in the status change transfer being completed and USBHubStatusComplete being called. Thus, the detection of status changes is interrupt-driven and is not implemented by polling at the software level. (At the hardware level, USB is still a polled bus, but the host controller hardware handles that for us). Upon detecting a status change on one or more ports on a hub, the hub driver then must submit one or more control messages to the hub to determine exactly what changed on the affected ports.
Constants
USB_*_PREFIX
USB_TYPE_*
USB_STATE_*
USB_STATUS_*
USB_FLAG_*
USBHOST_TYPE_*
USBHOST_STATE_*
USBHOST_FLAG_*
USB_STATUS_*
USB_REQUEST_FLAG_*
USB_CONTROL_PHASE_*
USB_CONTROL_*
USB_*_*_PACKET_SIZE
USB_FRAMES_*
USB_UFRAMES_*
USB_CONFIGURATION_ATTRIBUTE_*
USB_DEVICE_STATUS_*
USB_ENDPOINT_STATUS_*
USB_SPEED_*
USB_TRANSFER_TYPE_*
USB_TRANSFER_SIZE_*
USB_DESCRIPTOR_TYPE_*
USB_DIRECTION_*
USB_REQUEST_TYPE_*
USB_REQUEST_RECIPIENT_*
USB_BMREQUESTTYPE_*
USB_DEVICE_REQUEST_*
USB_DEVICE_FEATURE_*
USB_DEVICE_TEST_MODE_*
USB_PACKETID_*
USB_CLASS_CODE_*
USB_SUBCLASS_*
USB_PROTOCOL_*
USB_LANG_*
USB_SUBLANG_*
USB_LANGID_*
USB_VENDORID_*
USB_TREE_*
USB_LOG_*
USB_HUB_*
USBHUB_TYPE_*
USBHUB_STATE_*
USBHUB_FLAG_*
USBHUB_THREAD_*
USBHUB_DEVICE_*
USBHUB_DRIVER_*
USB_PORT_RESET_*
USB_HUB_CHARACTERISTIC_*
USB_C_HUB_*
USB_PORT_*
USB_HUB_REQUEST_*
USB_PORT_STATUS_*
USB_PORT_CHANGE_*
USB_HUB_STATUS_*
USB_HUB_CHANGE_*
Type definitions
USB device Id
USB interface Id
USB device and interface Id
USB device and interface no
USB control setup data
USB descriptor header
USB device descriptor
USB configuration descriptor
PUSBConfigurationDescriptor = ^TUSBConfigurationDescriptor;
TUSBConfigurationDescriptor = packed record
USB interface descriptor
PUSBInterfaceDescriptor = ^TUSBInterfaceDescriptor;
TUSBInterfaceDescriptor = packed record
USB endpoint descriptor
USB string descriptor
USB string descriptor string
PUSBStringDescriptorString = ^TUSBStringDescriptorString;
TUSBStringDescriptorString = array[0..125] of Word;
USB string descriptor LANGIDs
PUSBStringDescriptorLANGIDs = ^TUSBStringDescriptorLANGIDs;
TUSBStringDescriptorLANGIDs = array[0..125] of Word;
USB device status
USB device bind callback
TUSBDeviceBind = function(Device:PUSBDevice):LongWord;
|
USB device unbind callback
TUSBDeviceUnbind = function(Device:PUSBDevice; Driver:PUSBDriver):LongWord;
|
USB device enumeration callback
TUSBDeviceEnumerate = function(Device:PUSBDevice; Data:Pointer):LongWord;
|
USB device notification callback
TUSBDeviceNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
USB device
USB configuration
USB interface
USB alternate
USB driver enumeration callback
TUSBDriverEnumerate = function(Driver:PUSBDriver; Data:Pointer):LongWord;
|
USB driver bind
TUSBDriverBind = function(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
|
USB driver unbind
TUSBDriverUnbind = function(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
|
USB driver
USB host enumeration callback
TUSBHostEnumerate = function(Host:PUSBHost; Data:Pointer):LongWord;
|
USB host notification callback
TUSBHostNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
USB host start
TUSBHostStart = function(Host:PUSBHost):LongWord;
|
USB host stop
TUSBHostStop = function(Host:PUSBHost):LongWord;
|
USB host reset
TUSBHostReset = function(Host:PUSBHost):LongWord;
|
USB host submit
TUSBHostSubmit = function(Host:PUSBHost; Request:PUSBRequest):LongWord;
|
USB host cancel
TUSBHostCancel = function(Host:PUSBHost; Request:PUSBRequest):LongWord;
|
USB host
USB request completed
TUSBRequestCompleted = procedure(Request:PUSBRequest);
|
USB request
USB hub descriptor
USB hub descriptor data
PUSBHubDescriptorData = ^TUSBHubDescriptorData;
TUSBHubDescriptorData = array[0..63] of Byte;
USB port status
USB hub status
USB hub data
USB port
USB hub enumeration callback
TUSBHubEnumerate = function(Hub:PUSBHub; Data:Pointer):LongWord;
|
USB hub notification callback
TUSBHubNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
USB hub
Public variables
USB logging
USB_DEFAULT_LOG_LEVEL:LongWord = USB_LOG_LEVEL_DEBUG;
|
Minimum level for USB messages. Only messages with level greater than or equal to this will be printed. |
USB_LOG_ENABLED:Boolean;
|
Function declarations
Initialization functions
procedure USBInit;
function USBStart:LongWord;
USB device, driver and host functions
function USBDeviceGetAddress(Device:PUSBDevice):Byte;
function USBDeviceSetAddress(Device:PUSBDevice; Address:Byte):LongWord;
function USBDeviceGetDescriptor(Device:PUSBDevice; bRequest,bmRequestType:Byte; wValue,wIndex:Word; Data:Pointer; Length:Word):LongWord;
function USBDeviceGetDeviceDescriptor(Device:PUSBDevice; Data:Pointer; Length:Word):LongWord;
function USBDeviceCreateDeviceDescriptor(Device:PUSBDevice; Length:Word):LongWord;
function USBDeviceReadDeviceDescriptor(Device:PUSBDevice; Length:Word):LongWord; inline;
function USBDeviceReadDeviceDescriptorEx(Device:PUSBDevice; Length:Word; AllowShort:Boolean):LongWord;
function USBDeviceCreateConfigurations(Device:PUSBDevice):LongWord;
function USBDeviceReadConfigurations(Device:PUSBDevice):LongWord;
function USBDeviceCreateConfiguration(Device:PUSBDevice; Index:Byte; Size:Word):LongWord;
function USBDeviceReadConfiguration(Device:PUSBDevice; Index:Byte):LongWord;
function USBDeviceGetStringDescriptor(Device:PUSBDevice; Index:Byte; Data:Pointer; Length:Word):LongWord; inline;
function USBDeviceGetStringDescriptorEx(Device:PUSBDevice; Index:Byte;LanguageId:Word; Data:Pointer; Length:Word):LongWord;
function USBDeviceReadStringLanguageIds(Device:PUSBDevice):TUSBStringDescriptorLANGIDs;
function USBDeviceReadStringDescriptor(Device:PUSBDevice; Index:Byte):String; inline;
function USBDeviceReadStringDescriptorEx(Device:PUSBDevice;Index:Byte;LanguageId:Word):String;
function USBDeviceReadStringDescriptorW(Device:PUSBDevice; Index:Byte):UnicodeString; inline;
function USBDeviceReadStringDescriptorExW(Device:PUSBDevice; Index:Byte; LanguageId:Word):UnicodeString;
function USBDeviceGetConfigurationDescriptor(Device:PUSBDevice; Index:Byte;Data:Pointer; Length:Word):LongWord;
function USBDeviceGetConfiguration(Device:PUSBDevice; var ConfigurationValue:Byte):LongWord;
function USBDeviceSetConfiguration(Device:PUSBDevice; ConfigurationValue:Byte):LongWord;
function USBDeviceFindConfigurationByValue(Device:PUSBDevice; ConfigurationValue:Byte):PUSBConfiguration;
function USBDeviceGetHub(Device:PUSBDevice):PUSBHub;
function USBDeviceGetPort(Device:PUSBDevice):PUSBPort;
function USBDeviceGetInterface(Device:PUSBDevice; Index:Byte; var AlternateSetting:Byte):LongWord;
function USBDeviceSetInterface(Device:PUSBDevice; Index,AlternateSetting:Byte):LongWord;
function USBDeviceFindInterfaceByIndex(Device:PUSBDevice; Index:Byte):PUSBInterface;
function USBDeviceFindInterfaceByClass(Device:PUSBDevice; InterfaceClass,InterfaceSubClass,InterfaceProtocol:Byte):PUSBInterface;
function USBDeviceFindEndpointByIndex(Device:PUSBDevice; Interrface:PUSBInterface; Index:Byte):PUSBEndpointDescriptor;
function USBDeviceFindEndpointByType(Device:PUSBDevice; Interrface:PUSBInterface; Direction,TransferType:Byte):PUSBEndpointDescriptor;
function USBDeviceFindEndpointByTypeEx(Device:PUSBDevice; Interrface:PUSBInterface; Direction,TransferType:Byte; var Index:Byte):PUSBEndpointDescriptor;
function USBDeviceCountEndpointsByType(Device:PUSBDevice; Interrface:PUSBInterface; Direction,TransferType:Byte):Byte;
function USBDeviceFindAlternateByIndex(Device:PUSBDevice; Interrface:PUSBInterface; Index:Byte):PUSBAlternate;
function USBDeviceFindAlternateEndpointByIndex(Device:PUSBDevice; Interrface:PUSBInterface; Alternate:PUSBAlternate; Index:Byte):PUSBEndpointDescriptor;
function USBDeviceFindAlternateEndpointByType(Device:PUSBDevice; Interrface:PUSBInterface; Alternate:PUSBAlternate; Direction,TransferType:Byte):PUSBEndpointDescriptor;
function USBDeviceSetFeature(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; Feature,Index:Word):LongWord;
function USBDeviceClearFeature(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; Feature:Word):LongWord;
function USBDeviceSetState(Device:PUSBDevice; State:LongWord):LongWord;
function USBDeviceSetStatus(Device:PUSBDevice; Status:LongWord):LongWord;
function USBDeviceBind(Device:PUSBDevice):LongWord;
function USBDeviceUnbind(Device:PUSBDevice; Driver:PUSBDriver):LongWord;
function USBDeviceAttach(Device:PUSBDevice):LongWord;
function USBDeviceDetach(Device:PUSBDevice):LongWord;
function USBDeviceAllocate(Host:PUSBHost; Parent:PUSBDevice):PUSBDevice;
function USBDeviceRelease(Device:PUSBDevice):LongWord;
function USBDeviceFindByName(const Name:String):PUSBDevice; inline;
function USBDeviceFindByDescription(const Description:String):PUSBDevice; inline;
function USBDeviceEnumerate(Callback:TUSBDeviceEnumerate; Data:Pointer):LongWord;
function USBDeviceNotification(Device:PUSBDevice; Callback:TUSBDeviceNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
function USBDriverCreateEx(Size:LongWord):PUSBDriver;
function USBDriverDestroy(Driver:PUSBDriver):LongWord;
function USBDriverRegister(Driver:PUSBDriver):LongWord;
function USBDriverDeregister(Driver:PUSBDriver):LongWord;
function USBDriverFindByName(const Name:String):PUSBDriver; inline;
function USBDriverEnumerate(Callback:TUSBDriverEnumerate; Data:Pointer):LongWord;
function USBHostSetState(Host:PUSBHost; State:LongWord):LongWord;
function USBHostDestroy(Host:PUSBHost):LongWord;
function USBHostRegister(Host:PUSBHost):LongWord;
function USBHostDeregister(Host:PUSBHost):LongWord;
function USBHostFindByName(const Name:String):PUSBHost; inline;
function USBHostFindByDescription(const Description:String):PUSBHost; inline;
function USBHostEnumerate(Callback:TUSBHostEnumerate; Data:Pointer):LongWord;
function USBHostNotification(Host:PUSBHost; Callback:TUSBHostNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
function USBBufferAllocate(Device:PUSBDevice; Size:LongWord):Pointer; inline;
function USBBufferAllocateEx(Device:PUSBDevice; Size:LongWord; var Flags:LongWord):Pointer;
function USBBufferValidate(Device:PUSBDevice; Buffer:Pointer; Size:LongWord; var Flags:LongWord):LongWord;
function USBBufferRelease(Buffer:Pointer):LongWord;
function USBRequestAllocate(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; Callback:TUSBRequestCompleted; Size:LongWord; DriverData:Pointer):PUSBRequest; inline;
function USBRequestAllocateEx(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; Callback:TUSBRequestCompleted; var Data:Pointer; Size:LongWord; DriverData:Pointer):PUSBRequest;
function USBRequestRelease(Request:PUSBRequest):LongWord;
function USBRequestInitialize(Request:PUSBRequest; Callback:TUSBRequestCompleted; Data:Pointer; Size:LongWord; DriverData:Pointer):LongWord;
function USBRequestSubmit(Request:PUSBRequest):LongWord;
function USBRequestCancel(Request:PUSBRequest):LongWord;
procedure USBRequestComplete(Request:PUSBRequest);
function USBControlRequest(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; bRequest,bmRequestType:Byte; wValue,wIndex:Word; Data:Pointer; wLength:Word):LongWord; inline;
function USBControlRequestEx(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; bRequest,bmRequestType:Byte; wValue,wIndex:Word; Data:Pointer; wLength:Word; Timeout:LongWord; AllowShort:Boolean):LongWord;
procedure USBControlRequestComplete(Request:PUSBRequest);
USB synchronous transfer methods
function USBTransfer(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; Data:Pointer; Size:LongWord; var Count:LongWord; Timeout:LongWord):LongWord;
procedure USBTransferComplete(Request:PUSBRequest);
function USBControlTransfer(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; bRequest,bmRequestType:Byte; wValue,wIndex:Word; Data:Pointer; wLength:Word; var Count:LongWord; Timeout:LongWord):LongWord;
function USBBulkTransfer(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; Data:Pointer; Size:LongWord; var Count:LongWord; Timeout:LongWord):LongWord;
function USBInterruptTransfer(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; Data:Pointer; Size:LongWord; var Count:LongWord; Timeout:LongWord):LongWord;
USB hub functions
function USBHubCreatePorts(Hub:PUSBHub):LongWord;
function USBHubPowerOnPorts(Hub:PUSBHub):LongWord;
function USBHubCreateHubDescriptor(Hub:PUSBHub):LongWord;
function USBHubReadHubDescriptor(Hub:PUSBHub):LongWord;
function USBHubLock(Hub:PUSBHub):LongWord;
function USBHubUnlock(Hub:PUSBHub):LongWord;
function USBHubSetState(Hub:PUSBHub; State:LongWord):LongWord;
function USBHubAllocate(Device:PUSBDevice):PUSBHub;
function USBHubRelease(Hub:PUSBHub):LongWord;
function USBHubFindByName(const Name:String):PUSBHub; inline;
function USBHubFindByDescription(const Description:String):PUSBHub; inline;
function USBHubEnumerate(Callback:TUSBHubEnumerate; Data:Pointer):LongWord;
function USBHubNotification(Hub:PUSBHub; Callback:TUSBHubNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
procedure USBHubBindDevices(Device:PUSBDevice; Callback:TUSBDeviceBind);
procedure USBHubUnbindDevices(Device:PUSBDevice; Driver:PUSBDriver; Callback:TUSBDeviceUnbind);
procedure USBHubEnumerateDevices(Device:PUSBDevice; Callback:TUSBDeviceEnumerate; Data:Pointer);
function USBHubPortReset(Port:PUSBPort):LongWord;
function USBHubPortDisable(Port:PUSBPort):LongWord;
function USBHubPortPowerOn(Port:PUSBPort):LongWord;
function USBHubPortPowerOff(Port:PUSBPort):LongWord;
function USBHubPortGetStatus(Port:PUSBPort):LongWord;
function USBHubPortSetFeature(Port:PUSBPort; Feature:Word):LongWord;
function USBHubPortClearFeature(Port:PUSBPort; Feature:Word):LongWord;
function USBHubPortChangeFeature(Port:PUSBPort; Feature:Word; Enable:Boolean):LongWord;
function USBHubPortAttachDevice(Port:PUSBPort):LongWord;
function USBHubPortDetachDevice(Port:PUSBPort):LongWord;
function USBHubPortStatusChanged(Port:PUSBPort):LongWord;
function USBHubExecute(Parameter:Pointer):PtrInt;
procedure USBHubStatusComplete(Request:PUSBRequest);
function USBHubDriverBind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
function USBHubDriverUnbind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
USB device, driver and host helper functions
function USBDeviceCheck(Device:PUSBDevice):PUSBDevice;
function USBDriverCheck(Driver:PUSBDriver):PUSBDriver;
function USBHostCheck(Host:PUSBHost):PUSBHost;
function USBIsHub(Device:PUSBDevice):Boolean;
function USBIsRootHub(Device:PUSBDevice):Boolean;
function USBIsControlRequest(Request:PUSBRequest):Boolean;
function USBIsBulkRequest(Request:PUSBRequest):Boolean;
function USBIsInterruptRequest(Request:PUSBRequest):Boolean;
function USBIsIsochronousRequest(Request:PUSBRequest):Boolean;
function USBIsInEndpoint(Endpoint:PUSBEndpointDescriptor):Boolean;
function USBIsOutEndpoint(Endpoint:PUSBEndpointDescriptor):Boolean;
function USBIsBulkEndpoint(Endpoint:PUSBEndpointDescriptor):Boolean;
function USBIsInterruptEndpoint(Endpoint:PUSBEndpointDescriptor):Boolean;
function USBIsIsochronousEndpoint(Endpoint:PUSBEndpointDescriptor):Boolean;
function USBDeviceToString(Device:PUSBDevice):String;
function USBStatusToString(Status:LongWord):String;
function USBClassCodeToString(ClassCode:Integer):String;
function USBSubClassCodeToString(ClassCode,SubClassCode:Integer):String;
function USBProtocolCodeToString(ClassCode,ProtocolCode:Integer):String;
function USBSpeedToString(Speed:Integer):String;
function USBTransferTypeToString(TransferType:Integer):String;
function USBDirectionToString(Direction:Integer):String;
function USBBCDVersionToString(BCDVersion:Word):String;
function USBHubCharacteristicsToString(HubCharacteristics:Word):String;
function USBDeviceStateToNotification(State:LongWord):LongWord;
function USBDeviceStatusToNotification(Status:LongWord):LongWord;
function USBHostStateToNotification(State:LongWord):LongWord;
procedure USBLog(Level:LongWord; Device:PUSBDevice; const AText:String);
procedure USBLogInfo(Device:PUSBDevice; const AText:String); inline;
procedure USBLogWarn(Device:PUSBDevice; const AText:String); inline;
procedure USBLogError(Device:PUSBDevice; const AText:String); inline;
procedure USBLogDebug(Device:PUSBDevice; const AText:String); inline;
procedure USBLogDeviceDescriptor(Device:PUSBDevice; Descriptor:PUSBDeviceDescriptor);
procedure USBLogConfigurationDescriptor(Device:PUSBDevice; Descriptor:PUSBConfigurationDescriptor);
procedure USBLogInterfaceDescriptor(Device:PUSBDevice; Descriptor:PUSBInterfaceDescriptor);
procedure USBLogEndpointDescriptor(Device:PUSBDevice; Descriptor:PUSBEndpointDescriptor);
function USBLogDevices:LongWord;
function USBLogDeviceCallback(Device:PUSBDevice; Data:Pointer):LongWord;
function USBLogTreeCallback(Device:PUSBDevice; Data:Pointer):LongWord;
USB hub helper functions
function USBHubCheck(Hub:PUSBHub):PUSBHub;
function USBHubHasPortCurrentProtection(Hub:PUSBHub):Boolean;
function USBHubGetTTThinkTime(Hub:PUSBHub):Byte;
function USBHubStateToNotification(State:LongWord):LongWord;
Return to Unit Reference