implement hidd_control_request including std & class specific to interface number.

refractor usbd_setup_received
This commit is contained in:
hathach
2013-06-14 18:22:40 +07:00
parent 4103cc374f
commit 40b65b265c
6 changed files with 106 additions and 19 deletions

View File

@@ -75,6 +75,15 @@ enum {
HID_REQUEST_REPORT_FEATURE
};
enum {
HID_REQUEST_CONTROL_GET_REPORT = 0x01,
HID_REQUEST_CONTROL_GET_IDLE = 0x02,
HID_REQUEST_CONTROL_GET_PROTOCOL = 0x03,
HID_REQUEST_CONTROL_SET_REPORT = 0x09,
HID_REQUEST_CONTROL_SET_IDLE = 0x0a,
HID_REQUEST_CONTROL_SET_PROTOCOL = 0x0b
};
typedef ATTR_PREPACKED struct ATTR_PACKED {
uint8_t bLength; /**< Numeric expression that is the total size of the HID descriptor */
uint8_t bDescriptorType; /**< Constant name specifying type of HID descriptor. */