#define DESC_CONFIG_WORD(a) (a&0xFF),((a>>8)&0xFF)
The DESC_CONFIG_WORD() macro is implemented for convenience. Since the configuration descriptor array is a uint8_t array, each entry needs to be a uint8_t in LSB format. The DESC_CONFIG_WORD() macro breaks up a uint16_t into the appropriate uint8_t entries in LSB. Typical Usage:
const uint8_t configDescriptor1[]={ 0x09, // Size of this descriptor in bytes USB_DESCRIPTOR_CONFIGURATION, // CONFIGURATION descriptor type DESC_CONFIG_WORD(0x0022), // Total length of data for this cfg
MLA - USB Library Help Version : 2.16
![]() |