53 #define USB_LEN_DEV_QUALIFIER_DESC 0x0A 54 #define USB_LEN_DEV_DESC 0x12 55 #define USB_LEN_CFG_DESC 0x09 56 #define USB_LEN_IF_DESC 0x09 57 #define USB_LEN_EP_DESC 0x07 58 #define USB_LEN_OTG_DESC 0x03 60 #define USBD_IDX_LANGID_STR 0x00 61 #define USBD_IDX_MFC_STR 0x01 62 #define USBD_IDX_PRODUCT_STR 0x02 63 #define USBD_IDX_SERIAL_STR 0x03 64 #define USBD_IDX_CONFIG_STR 0x04 65 #define USBD_IDX_INTERFACE_STR 0x05 67 #define USB_REQ_TYPE_STANDARD 0x00 68 #define USB_REQ_TYPE_CLASS 0x20 69 #define USB_REQ_TYPE_VENDOR 0x40 70 #define USB_REQ_TYPE_MASK 0x60 72 #define USB_REQ_RECIPIENT_DEVICE 0x00 73 #define USB_REQ_RECIPIENT_INTERFACE 0x01 74 #define USB_REQ_RECIPIENT_ENDPOINT 0x02 75 #define USB_REQ_RECIPIENT_MASK 0x03 77 #define USB_REQ_GET_STATUS 0x00 78 #define USB_REQ_CLEAR_FEATURE 0x01 79 #define USB_REQ_SET_FEATURE 0x03 80 #define USB_REQ_SET_ADDRESS 0x05 81 #define USB_REQ_GET_DESCRIPTOR 0x06 82 #define USB_REQ_SET_DESCRIPTOR 0x07 83 #define USB_REQ_GET_CONFIGURATION 0x08 84 #define USB_REQ_SET_CONFIGURATION 0x09 85 #define USB_REQ_GET_INTERFACE 0x0A 86 #define USB_REQ_SET_INTERFACE 0x0B 87 #define USB_REQ_SYNCH_FRAME 0x0C 89 #define USB_DESC_TYPE_DEVICE 1 90 #define USB_DESC_TYPE_CONFIGURATION 2 91 #define USB_DESC_TYPE_STRING 3 92 #define USB_DESC_TYPE_INTERFACE 4 93 #define USB_DESC_TYPE_ENDPOINT 5 94 #define USB_DESC_TYPE_DEVICE_QUALIFIER 6 95 #define USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION 7 96 #define USB_DESC_TYPE_BOS 0x0F 98 #define USB_CONFIG_REMOTE_WAKEUP 2 99 #define USB_CONFIG_SELF_POWERED 1 101 #define USB_FEATURE_EP_HALT 0 102 #define USB_FEATURE_REMOTE_WAKEUP 1 103 #define USB_FEATURE_TEST_MODE 2 122 #define SWAPBYTE(addr) (((uint16_t)(*((uint8_t *)(addr)))) + \ 123 (((uint16_t)(*(((uint8_t *)(addr)) + 1))) << 8)) 125 #define LOBYTE(x) ((uint8_t)((x) & 0x00FF)) 126 #define HIBYTE(x) ((uint8_t)(((x) & 0xFF00) >>8)) USB Device configuration file.