USBD ROM Stack
2.0
ROM based USB device stack
|
#include <C:/Data/nxp/GIT/lpcopen_v3/lpcopen_version3/LPC43xx_18xx/lpc43xx_18xx/LPC_USBD_Lib/mw_usbd/mw_usbd.h>
Data Fields | |
uint8_t | bLength |
uint8_t | bDescriptorType |
uint16_t | wTotalLength |
uint8_t | bNumInterfaces |
uint8_t | bConfigurationValue |
uint8_t | iConfiguration |
uint8_t | bmAttributes |
uint8_t | bMaxPower |
USB Standard Configuration Descriptor
uint8_t USB_CONFIGURATION_DESCRIPTOR::bLength |
Size of this descriptor in bytes
uint8_t USB_CONFIGURATION_DESCRIPTOR::bDescriptorType |
CONFIGURATION Descriptor Type
uint16_t USB_CONFIGURATION_DESCRIPTOR::wTotalLength |
Total length of data returned for this configuration. Includes the combined length of all descriptors (configuration, interface, endpoint, and class- or vendor-specific) returned for this configuration.
uint8_t USB_CONFIGURATION_DESCRIPTOR::bNumInterfaces |
Number of interfaces supported by this configuration
uint8_t USB_CONFIGURATION_DESCRIPTOR::bConfigurationValue |
Value to use as an argument to the SetConfiguration() request to select this configuration.
uint8_t USB_CONFIGURATION_DESCRIPTOR::iConfiguration |
Index of string descriptor describing this configuration
uint8_t USB_CONFIGURATION_DESCRIPTOR::bmAttributes |
Configuration characteristics
D7: Reserved (set to one)
D6: Self-powered
D5: Remote Wakeup
D4...0: Reserved (reset to zero)
D7 is reserved and must be set to one for historical reasons.
A device configuration that uses power from the bus and a local source reports a non-zero value in bMaxPower to indicate the amount of bus power required and sets D6. The actual power source at runtime may be determined using the GetStatus(DEVICE) request (see USB 2.0 spec Section 9.4.5).
If a device configuration supports remote wakeup, D5 is set to one.
uint8_t USB_CONFIGURATION_DESCRIPTOR::bMaxPower |
Maximum power consumption of the USB device from the bus in this specific configuration when the device is fully operational. Expressed in 2 mA units (i.e., 50 = 100 mA).
Note: A device configuration reports whether the configuration is bus-powered or selfpowered. Device status reports whether the device is currently self-powered. If a device is disconnected from its external power source, it updates device status to indicate that it is no longer self-powered.
A device may not increase its power draw from the bus, when it loses its external power source, beyond the amount reported by its configuration.
If a device can continue to operate when disconnected from its external power source, it continues to do so. If the device cannot continue to operate, it fails operations it can no longer support. The USB System Software may determine the cause of the failure by checking the status and noting the loss of the device’s power source.