![]() |
LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
|
Go to the source code of this file.
Macros | |
#define | WBVAL(x) ((x) & 0xFF),(((x) >> 8) & 0xFF) |
#define | NO_DESCRIPTOR 0 |
#define | USB_CONFIG_POWER_MA(mA) ((mA) >> 1) |
#define | USB_STRING_LEN(UnicodeChars) (sizeof(USB_Descriptor_Header_t) + ((UnicodeChars) << 1)) |
#define | VERSION_BCD(x) |
#define | LANGUAGE_ID_ENG 0x0409 |
USB Configuration Descriptor Attribute Masks | |
#define | USB_CONFIG_ATTR_BUSPOWERED 0x80 |
#define | USB_CONFIG_ATTR_SELFPOWERED 0x40 |
#define | USB_CONFIG_ATTR_REMOTEWAKEUP 0x20 |
Endpoint Descriptor Attribute Masks | |
#define | ENDPOINT_ATTR_NO_SYNC (0 << 2) |
#define | ENDPOINT_ATTR_ASYNC (1 << 2) |
#define | ENDPOINT_ATTR_ADAPTIVE (2 << 2) |
#define | ENDPOINT_ATTR_SYNC (3 << 2) |
Endpoint Descriptor Usage Masks | |
#define | ENDPOINT_USAGE_DATA (0 << 4) |
#define | ENDPOINT_USAGE_FEEDBACK (1 << 4) |
#define | ENDPOINT_USAGE_IMPLICIT_FEEDBACK (2 << 4) |
Enumerations | |
enum | USB_DescriptorTypes_t { DTYPE_Device = 0x01, DTYPE_Configuration = 0x02, DTYPE_String = 0x03, DTYPE_Interface = 0x04, DTYPE_Endpoint = 0x05, DTYPE_DeviceQualifier = 0x06, DTYPE_Other = 0x07, DTYPE_InterfacePower = 0x08, DTYPE_InterfaceAssociation = 0x0B, DTYPE_CSInterface = 0x24, DTYPE_CSEndpoint = 0x25 } |
enum | USB_Descriptor_ClassSubclassProtocol_t { USB_CSCP_NoDeviceClass = 0x00, USB_CSCP_NoDeviceSubclass = 0x00, USB_CSCP_NoDeviceProtocol = 0x00, USB_CSCP_VendorSpecificClass = 0xFF, USB_CSCP_VendorSpecificSubclass = 0xFF, USB_CSCP_VendorSpecificProtocol = 0xFF, USB_CSCP_IADDeviceClass = 0xEF, USB_CSCP_IADDeviceSubclass = 0x02, USB_CSCP_IADDeviceProtocol = 0x01 } |
uint8_t AlternateSetting |
Alternate setting for the interface number. The same interface number can have multiple alternate settings with different endpoint configurations, which can be selected by the host.
Definition at line 489 of file StdDescriptors.h.
uint8_t Attributes |
Endpoint attributes, comprised of a mask of the endpoint type (EP_TYPE_*) and attributes (ENDPOINT_ATTR_*) masks.
Definition at line 612 of file StdDescriptors.h.
uint8_t bAlternateSetting |
Alternate setting for the interface number. The same interface number can have multiple alternate settings with different endpoint configurations, which can be selected by the host.
Definition at line 519 of file StdDescriptors.h.
uint16_t bcdDevice |
Product release (version) number.
Definition at line 339 of file StdDescriptors.h.
uint16_t bcdUSB |
BCD of the supported USB specification.
Definition at line 332 of file StdDescriptors.h.
uint8_t bConfigurationValue |
Configuration index of the current configuration.
Definition at line 464 of file StdDescriptors.h.
uint8_t bDescriptorType |
Type of the descriptor, either a value in USB_DescriptorTypes_t or a value given by the specific class.
Definition at line 261 of file StdDescriptors.h.
uint8_t bDeviceClass |
USB device class.
Definition at line 333 of file StdDescriptors.h.
uint8_t bDeviceProtocol |
USB device protocol.
Definition at line 335 of file StdDescriptors.h.
uint8_t bDeviceSubClass |
USB device subclass.
Definition at line 334 of file StdDescriptors.h.
uint8_t bEndpointAddress |
Logical address of the endpoint within the device for the current configuration, including direction mask.
Definition at line 639 of file StdDescriptors.h.
uint8_t bFirstInterface |
Index of the first associated interface.
Definition at line 586 of file StdDescriptors.h.
uint8_t bFunctionClass |
Interface class ID.
Definition at line 588 of file StdDescriptors.h.
uint8_t bFunctionProtocol |
Interface protocol ID.
Definition at line 590 of file StdDescriptors.h.
uint8_t bFunctionSubClass |
Interface subclass ID.
Definition at line 589 of file StdDescriptors.h.
uint8_t bInterfaceClass |
Interface class ID.
Definition at line 525 of file StdDescriptors.h.
uint8_t bInterfaceCount |
Total number of associated interfaces.
Definition at line 587 of file StdDescriptors.h.
uint8_t bInterfaceNumber |
Index of the interface in the current configuration.
Definition at line 518 of file StdDescriptors.h.
uint8_t bInterfaceProtocol |
Interface protocol ID.
Definition at line 527 of file StdDescriptors.h.
uint8_t bInterfaceSubClass |
Interface subclass ID.
Definition at line 526 of file StdDescriptors.h.
uint8_t bInterval |
Polling interval in milliseconds for the endpoint if it is an INTERRUPT or ISOCHRONOUS type.
Definition at line 648 of file StdDescriptors.h.
uint8_t bLength |
Size of the descriptor, in bytes.
Definition at line 260 of file StdDescriptors.h.
uint8_t bmAttributes |
Configuration attributes, comprised of a mask of zero or more USB_CONFIG_ATTR_* masks.
Endpoint attributes, comprised of a mask of the endpoint type (EP_TYPE_*) and attributes (ENDPOINT_ATTR_*) masks.
Definition at line 466 of file StdDescriptors.h.
uint8_t bMaxPacketSize0 |
Size of the control (address 0) endpoint's bank in bytes.
Definition at line 336 of file StdDescriptors.h.
uint8_t bMaxPower |
Maximum power consumption of the device while in the current configuration, calculated by the USB_CONFIG_POWER_MA() macro.
Definition at line 469 of file StdDescriptors.h.
uint8_t bNumConfigurations |
Total number of configurations supported by the device.
Definition at line 362 of file StdDescriptors.h.
uint8_t bNumEndpoints |
Total number of endpoints in the interface.
Definition at line 524 of file StdDescriptors.h.
uint8_t bNumInterfaces |
Total number of interfaces in the configuration.
Definition at line 463 of file StdDescriptors.h.
uint8_t bReserved |
Reserved for future use, must be 0.
Definition at line 411 of file StdDescriptors.h.
uint16_t bString[] |
String data, as unicode characters (alternatively, string language IDs). If normal ASCII characters are to be used, they must be added as an array of characters rather than a normal C string so that they are widened to Unicode size.
Under GCC, strings prefixed with the "L" character (before the opening string quotation mark) are considered to be Unicode strings, and may be used instead of an explicit array of ASCII characters.
Definition at line 712 of file StdDescriptors.h.
uint8_t Class |
uint8_t ConfigAttributes |
Configuration attributes, comprised of a mask of zero or more USB_CONFIG_ATTR_* masks.
Definition at line 435 of file StdDescriptors.h.
uint8_t ConfigurationNumber |
Configuration index of the current configuration.
Definition at line 432 of file StdDescriptors.h.
uint8_t ConfigurationStrIndex |
Index of a string descriptor describing the configuration.
Definition at line 433 of file StdDescriptors.h.
uint8_t Endpoint0Size |
Size of the control (address 0) endpoint's bank in bytes.
Definition at line 284 of file StdDescriptors.h.
uint8_t EndpointAddress |
Logical address of the endpoint within the device for the current configuration, including direction mask.
Definition at line 609 of file StdDescriptors.h.
uint16_t EndpointSize |
Size of the endpoint bank, in bytes. This indicates the maximum packet size that the endpoint can receive at a time.
Definition at line 615 of file StdDescriptors.h.
uint8_t FirstInterfaceIndex |
Index of the first associated interface.
Definition at line 552 of file StdDescriptors.h.
USB_Descriptor_Header_t Header |
Descriptor header, including type and size.
Definition at line 277 of file StdDescriptors.h.
uint8_t IADStrIndex |
Index of the string descriptor describing the interface association.
Definition at line 559 of file StdDescriptors.h.
uint8_t iConfiguration |
Index of a string descriptor describing the configuration.
Definition at line 465 of file StdDescriptors.h.
uint16_t idProduct |
Unique product ID for the USB product.
Definition at line 338 of file StdDescriptors.h.
uint16_t idVendor |
Vendor ID for the USB product.
Definition at line 337 of file StdDescriptors.h.
uint8_t iFunction |
Index of the string descriptor describing the interface association.
Definition at line 591 of file StdDescriptors.h.
uint8_t iInterface |
Index of the string descriptor describing the interface.
Definition at line 528 of file StdDescriptors.h.
uint8_t iManufacturer |
String index for the manufacturer's name. The host will request this string via a separate control request for the string descriptor.
Definition at line 340 of file StdDescriptors.h.
uint8_t InterfaceNumber |
Index of the interface in the current configuration.
Definition at line 488 of file StdDescriptors.h.
uint8_t InterfaceStrIndex |
Index of the string descriptor describing the interface.
Definition at line 500 of file StdDescriptors.h.
uint8_t iProduct |
String index for the product name/details.
@see ManufacturerStrIndex structure entry.
Definition at line 346 of file StdDescriptors.h.
uint8_t iSerialNumber |
String index for the product's globally unique hexadecimal serial number, in uppercase Unicode ASCII.
Definition at line 350 of file StdDescriptors.h.
uint8_t ManufacturerStrIndex |
String index for the manufacturer's name. The host will request this string via a separate control request for the string descriptor.
Definition at line 290 of file StdDescriptors.h.
uint8_t MaxPowerConsumption |
Maximum power consumption of the device while in the current configuration, calculated by the USB_CONFIG_POWER_MA() macro.
Definition at line 439 of file StdDescriptors.h.
uint8_t NumberOfConfigurations |
Total number of configurations supported by the device.
Definition at line 312 of file StdDescriptors.h.
uint8_t PollingIntervalMS |
Polling interval in milliseconds for the endpoint if it is an INTERRUPT or ISOCHRONOUS type.
Definition at line 618 of file StdDescriptors.h.
uint16_t ProductID |
Unique product ID for the USB product.
Definition at line 287 of file StdDescriptors.h.
uint8_t ProductStrIndex |
String index for the product name/details.
@see ManufacturerStrIndex structure entry.
Definition at line 296 of file StdDescriptors.h.
uint8_t Protocol |
uint16_t ReleaseNumber |
Product release (version) number.
Definition at line 288 of file StdDescriptors.h.
uint8_t Reserved |
Reserved for future use, must be 0.
Definition at line 387 of file StdDescriptors.h.
uint8_t SerialNumStrIndex |
String index for the product's globally unique hexadecimal serial number, in uppercase Unicode ASCII.
Definition at line 300 of file StdDescriptors.h.
uint8_t Size |
Size of the descriptor, in bytes.
Definition at line 243 of file StdDescriptors.h.
uint8_t SubClass |
uint16_t TotalConfigurationSize |
Size of the configuration descriptor header, and all sub descriptors inside the configuration.
Definition at line 427 of file StdDescriptors.h.
uint8_t TotalEndpoints |
Total number of endpoints in the interface.
Definition at line 494 of file StdDescriptors.h.
uint8_t TotalInterfaces |
Total number of interfaces in the configuration.
Total number of associated interfaces.
Definition at line 430 of file StdDescriptors.h.
uint8_t Type |
Type of the descriptor, either a value in USB_DescriptorTypes_t or a value given by the specific class.
Definition at line 244 of file StdDescriptors.h.
uint16_t UnicodeString[] |
String data, as unicode characters (alternatively, string language IDs). If normal ASCII characters are to be used, they must be added as an array of characters rather than a normal C string so that they are widened to Unicode size.
Under GCC, strings prefixed with the "L" character (before the opening string quotation mark) are considered to be Unicode strings, and may be used instead of an explicit array of ASCII characters on little endian devices with UTF-16-LE wchar_t
encoding.
Definition at line 675 of file StdDescriptors.h.
uint16_t USBSpecification |
BCD of the supported USB specification.
Definition at line 279 of file StdDescriptors.h.
uint16_t VendorID |
Vendor ID for the USB product.
Definition at line 286 of file StdDescriptors.h.
uint16_t wMaxPacketSize |
Size of the endpoint bank, in bytes. This indicates the maximum packet size that the endpoint can receive at a time.
Definition at line 645 of file StdDescriptors.h.
uint16_t wTotalLength |
Size of the configuration descriptor header, and all sub descriptors inside the configuration.
Definition at line 460 of file StdDescriptors.h.