USB control endpoint request definitions. More...
Data Structures | |
struct | USB_Request_Header_t |
Standard USB Control Request. More... | |
Macros | |
#define | CONTROL_REQTYPE_DIRECTION 0x80 |
#define | CONTROL_REQTYPE_RECIPIENT 0x1F |
#define | CONTROL_REQTYPE_TYPE 0x60 |
Control Request Data Direction Masks | |
#define | REQDIR_DEVICETOHOST (1 << 7) |
#define | REQDIR_HOSTTODEVICE (0 << 7) |
Control Request Type Masks | |
#define | REQTYPE_CLASS (1 << 5) |
#define | REQTYPE_STANDARD (0 << 5) |
#define | REQTYPE_VENDOR (2 << 5) |
Control Request Recipient Masks | |
#define | REQREC_DEVICE (0 << 0) |
#define | REQREC_ENDPOINT (2 << 0) |
#define | REQREC_INTERFACE (1 << 0) |
#define | REQREC_OTHER (3 << 0) |
Enumerations | |
enum | USB_Control_Request_t { REQ_GetStatus = 0 , REQ_ClearFeature = 1 , REQ_SetFeature = 3 , REQ_SetAddress = 5 , REQ_GetDescriptor = 6 , REQ_SetDescriptor = 7 , REQ_GetConfiguration = 8 , REQ_SetConfiguration = 9 , REQ_GetInterface = 10 , REQ_SetInterface = 11 , REQ_SynchFrame = 12 } |
enum | USB_Feature_Selectors_t { FEATURE_SEL_EndpointHalt = 0x00 , FEATURE_SEL_DeviceRemoteWakeup = 0x01 , FEATURE_SEL_TestMode = 0x02 } |
This module contains definitions for the various control request parameters, so that the request details (such as data direction, request recipient, etc.) can be extracted via masking.