52 #define POST_PACK __attribute__ ((__packed__)) 53 #define ALIGNED(n) __attribute__ ((aligned(n))) 56 #elif defined(__CC_ARM) 57 #define PRE_PACK __packed 59 #define ALIGNED(n) __align(n) 60 #define INLINE __inline 62 #elif defined(__ICCARM__) 63 #define PRE_PACK __packed 65 #define PRAGMA_ALIGN_4096 _Pragma("data_alignment=4096") 66 #define PRAGMA_ALIGN_2048 _Pragma("data_alignment=2048") 67 #define PRAGMA_ALIGN_256 _Pragma("data_alignment=256") 68 #define PRAGMA_ALIGN_128 _Pragma("data_alignment=128") 69 #define PRAGMA_ALIGN_64 _Pragma("data_alignment=64") 70 #define PRAGMA_ALIGN_48 _Pragma("data_alignment=48") 71 #define PRAGMA_ALIGN_32 _Pragma("data_alignment=32") 72 #define PRAGMA_ALIGN_4 _Pragma("data_alignment=4") 73 #define ALIGNED(n) PRAGMA_ALIGN_ ## n 78 PRE_PACK
struct POST_PACK
_WB_T {
84 typedef struct _WB_T WB_T;
99 #define REQUEST_HOST_TO_DEVICE 0 101 #define REQUEST_DEVICE_TO_HOST 1 108 #define REQUEST_STANDARD 0 110 #define REQUEST_CLASS 1 112 #define REQUEST_VENDOR 2 114 #define REQUEST_RESERVED 3 121 #define REQUEST_TO_DEVICE 0 123 #define REQUEST_TO_INTERFACE 1 125 #define REQUEST_TO_ENDPOINT 2 127 #define REQUEST_TO_OTHER 3 138 typedef struct _BM_T BM_T;
153 #define USB_REQUEST_GET_STATUS 0 155 #define USB_REQUEST_CLEAR_FEATURE 1 157 #define USB_REQUEST_SET_FEATURE 3 159 #define USB_REQUEST_SET_ADDRESS 5 161 #define USB_REQUEST_GET_DESCRIPTOR 6 163 #define USB_REQUEST_SET_DESCRIPTOR 7 165 #define USB_REQUEST_GET_CONFIGURATION 8 167 #define USB_REQUEST_SET_CONFIGURATION 9 169 #define USB_REQUEST_GET_INTERFACE 10 171 #define USB_REQUEST_SET_INTERFACE 11 173 #define USB_REQUEST_SYNC_FRAME 12 180 #define USB_GETSTATUS_SELF_POWERED 0x01 182 #define USB_GETSTATUS_REMOTE_WAKEUP 0x02 184 #define USB_GETSTATUS_ENDPOINT_STALL 0x01 191 #define USB_FEATURE_ENDPOINT_STALL 0 193 #define USB_FEATURE_REMOTE_WAKEUP 1 195 #define USB_FEATURE_TEST_MODE 2 227 #define USB_DEVICE_DESCRIPTOR_TYPE 1 229 #define USB_CONFIGURATION_DESCRIPTOR_TYPE 2 231 #define USB_STRING_DESCRIPTOR_TYPE 3 233 #define USB_INTERFACE_DESCRIPTOR_TYPE 4 235 #define USB_ENDPOINT_DESCRIPTOR_TYPE 5 237 #define USB_DEVICE_QUALIFIER_DESCRIPTOR_TYPE 6 239 #define USB_OTHER_SPEED_CONFIG_DESCRIPTOR_TYPE 7 241 #define USB_INTERFACE_POWER_DESCRIPTOR_TYPE 8 243 #define USB_OTG_DESCRIPTOR_TYPE 9 245 #define USB_DEBUG_DESCRIPTOR_TYPE 10 247 #define USB_INTERFACE_ASSOCIATION_DESCRIPTOR_TYPE 11 248 #define USB_SECURITY_TYPE 12 249 #define USB_KEY_TYPE 13 250 #define USB_ENCRIPTION_TYPE 14 251 #define USB_BOS_TYPE 15 252 #define USB_DEVICE_CAPABILITY_TYPE 16 253 #define USB_WIRELESS_ENDPOINT_COMPANION_TYPE 17 260 #define USB_DEVICE_CLASS_RESERVED 0x00 262 #define USB_DEVICE_CLASS_AUDIO 0x01 264 #define USB_DEVICE_CLASS_COMMUNICATIONS 0x02 266 #define USB_DEVICE_CLASS_HUMAN_INTERFACE 0x03 268 #define USB_DEVICE_CLASS_MONITOR 0x04 270 #define USB_DEVICE_CLASS_PHYSICAL_INTERFACE 0x05 272 #define USB_DEVICE_CLASS_POWER 0x06 274 #define USB_DEVICE_CLASS_PRINTER 0x07 276 #define USB_DEVICE_CLASS_STORAGE 0x08 278 #define USB_DEVICE_CLASS_HUB 0x09 280 #define USB_DEVICE_CLASS_MISCELLANEOUS 0xEF 282 #define USB_DEVICE_CLASS_APP 0xFE 284 #define USB_DEVICE_CLASS_VENDOR_SPECIFIC 0xFF 291 #define USB_CONFIG_POWERED_MASK 0x40 293 #define USB_CONFIG_BUS_POWERED 0x80 295 #define USB_CONFIG_SELF_POWERED 0xC0 297 #define USB_CONFIG_REMOTE_WAKEUP 0x20 301 #define USB_CONFIG_POWER_MA(mA) ((mA) / 2) 307 #define USB_ENDPOINT_DIRECTION_MASK 0x80 309 #define USB_ENDPOINT_OUT(addr) ((addr) | 0x00) 311 #define USB_ENDPOINT_IN(addr) ((addr) | 0x80) 318 #define USB_ENDPOINT_TYPE_MASK 0x03 320 #define USB_ENDPOINT_TYPE_CONTROL 0x00 322 #define USB_ENDPOINT_TYPE_ISOCHRONOUS 0x01 324 #define USB_ENDPOINT_TYPE_BULK 0x02 326 #define USB_ENDPOINT_TYPE_INTERRUPT 0x03 328 #define USB_ENDPOINT_SYNC_MASK 0x0C 330 #define USB_ENDPOINT_SYNC_NO_SYNCHRONIZATION 0x00 332 #define USB_ENDPOINT_SYNC_ASYNCHRONOUS 0x04 334 #define USB_ENDPOINT_SYNC_ADAPTIVE 0x08 336 #define USB_ENDPOINT_SYNC_SYNCHRONOUS 0x0C 338 #define USB_ENDPOINT_USAGE_MASK 0x30 340 #define USB_ENDPOINT_USAGE_DATA 0x00 342 #define USB_ENDPOINT_USAGE_FEEDBACK 0x10 344 #define USB_ENDPOINT_USAGE_IMPLICIT_FEEDBACK 0x20 346 #define USB_ENDPOINT_USAGE_RESERVED 0x30 350 #define USB_ENDPOINT_0_HS_MAXP 64 352 #define USB_ENDPOINT_0_LS_MAXP 8 354 #define USB_ENDPOINT_BULK_HS_MAXP 512 670 uint8_t bDescriptorType;
671 uint16_t wTotalLength;
672 uint8_t bNumDeviceCaps;
680 uint8_t bDescriptorType;
681 uint8_t bDeviceCapabilityType;
683 uint16_t wSpeedsSupported;
684 uint8_t bFunctionalitySupport;
685 uint8_t bU1DevExitLat;
686 uint16_t bU2DevExitLat;
694 uint8_t bDescriptorType;
695 uint8_t bDeviceCapabilityType;
696 uint32_t bmAttributes;
uint8_t bConfigurationValue
Definition: mw_usbd.h:452
Definition: mw_usbd.h:199
uint8_t H
Definition: mw_usbd.h:81
uint8_t bInterfaceClass
Definition: mw_usbd.h:516
uint16_t bcdUSB
Definition: mw_usbd.h:361
uint8_t iProduct
Definition: mw_usbd.h:416
uint8_t bDescriptorType
Definition: mw_usbd.h:445
Definition: mw_usbd.h:357
uint8_t IConfiguration
Definition: mw_usbd.h:660
uint8_t iManufacturer
Definition: mw_usbd.h:415
uint8_t bDescriptorType
Definition: mw_usbd.h:554
uint8_t bReserved
Definition: mw_usbd.h:436
uint8_t bDeviceClass
Definition: mw_usbd.h:367
uint8_t bDescriptorType
Definition: mw_usbd.h:656
BM_T BM
Definition: mw_usbd.h:144
uint8_t B
Definition: mw_usbd.h:142
uint8_t iConfiguration
Definition: mw_usbd.h:455
uint8_t Type
Definition: mw_usbd.h:134
uint16_t bcdDevice
Definition: mw_usbd.h:414
Definition: mw_usbd.h:131
uint8_t bMaxPacketSize0
Definition: mw_usbd.h:407
uint8_t L
Definition: mw_usbd.h:79
Definition: mw_usbd.h:668
uint16_t bcdUSB
Definition: mw_usbd.h:430
uint16_t idProduct
Definition: mw_usbd.h:413
uint8_t bRequest
Definition: mw_usbd.h:204
uint8_t bDescriptorType
Definition: mw_usbd.h:637
uint8_t bDeviceClass
Definition: mw_usbd.h:431
uint8_t bLength
Definition: mw_usbd.h:654
REQUEST_TYPE bmRequestType
Definition: mw_usbd.h:200
uint8_t bInterfaceSubClass
Definition: mw_usbd.h:523
Definition: mw_usbd.h:634
uint8_t bmAttributes
Definition: mw_usbd.h:661
uint16_t wTotalLength
Definition: mw_usbd.h:657
uint8_t bDeviceSubClass
Definition: mw_usbd.h:432
uint8_t bInterfaceProtocol
Definition: mw_usbd.h:531
uint8_t Recipient
Definition: mw_usbd.h:132
uint8_t bLength
Definition: mw_usbd.h:427
uint8_t bDeviceSubClass
Definition: mw_usbd.h:382
uint8_t bDeviceProtocol
Definition: mw_usbd.h:433
uint8_t bDescriptorType
Definition: mw_usbd.h:429
uint8_t bNumInterfaces
Definition: mw_usbd.h:451
WORD_BYTE wIndex
Definition: mw_usbd.h:211
Definition: mw_usbd.h:502
Definition: mw_usbd.h:442
WORD_BYTE wValue
Definition: mw_usbd.h:208
uint8_t iInterface
Definition: mw_usbd.h:545
uint8_t bMaxPower
Definition: mw_usbd.h:662
uint8_t bMaxPacketSize0
Definition: mw_usbd.h:434
uint8_t bNumConfigurations
Definition: mw_usbd.h:420
uint8_t bInterfaceNumber
Definition: mw_usbd.h:506
Definition: mw_usbd.h:426
uint8_t bLength
Definition: mw_usbd.h:645
uint8_t bLength
Definition: mw_usbd.h:443
uint8_t bMaxPower
Definition: mw_usbd.h:473
uint16_t W
Definition: mw_usbd.h:88
uint8_t bConfigurationValue
Definition: mw_usbd.h:659
uint8_t bInterval
Definition: mw_usbd.h:607
uint16_t idVendor
Definition: mw_usbd.h:412
uint8_t bDescriptorType
Definition: mw_usbd.h:505
uint8_t Dir
Definition: mw_usbd.h:135
uint8_t bEndpointAddress
Definition: mw_usbd.h:555
uint8_t bDescriptorType
Definition: mw_usbd.h:360
uint8_t bNumInterfaces
Definition: mw_usbd.h:658
uint8_t bmAttributes
Definition: mw_usbd.h:457
Definition: mw_usbd.h:644
uint8_t bDescriptorType
Definition: mw_usbd.h:647
uint16_t wLength
Definition: mw_usbd.h:215
Definition: mw_usbd.h:141
uint8_t iSerialNumber
Definition: mw_usbd.h:417
uint16_t wTotalLength
Definition: mw_usbd.h:446
Definition: mw_usbd.h:692
Definition: mw_usbd.h:653
uint8_t bLength
Definition: mw_usbd.h:635
uint8_t bNumEndpoints
Definition: mw_usbd.h:512
uint8_t bLength
Definition: mw_usbd.h:358
uint8_t bLength
Definition: mw_usbd.h:552
void * USBD_HANDLE_T
Definition: mw_usbd.h:704
uint8_t bLength
Definition: mw_usbd.h:503
uint16_t wMaxPacketSize
Definition: mw_usbd.h:587
WB_T WB
Definition: mw_usbd.h:90
uint8_t bmAttributes
Definition: mw_usbd.h:563
Definition: mw_usbd.h:551
uint8_t bNumConfigurations
Definition: mw_usbd.h:435
uint8_t bDeviceProtocol
Definition: mw_usbd.h:391
Definition: mw_usbd.h:678
uint8_t bAlternateSetting
Definition: mw_usbd.h:510