BeRTOS
|
00001 00038 #ifndef USB_HID_H 00039 #define USB_HID_H 00040 00041 #include <cpu/types.h> 00042 00043 /* 00044 * USB HID interface subclass and protocol codes 00045 */ 00046 #define USB_INTERFACE_SUBCLASS_BOOT 1 00047 #define USB_INTERFACE_PROTOCOL_KEYBOARD 1 00048 #define USB_INTERFACE_PROTOCOL_MOUSE 2 00049 00050 /* 00051 * HID class requests 00052 */ 00053 #define HID_REQ_GET_REPORT 0x01 00054 #define HID_REQ_GET_IDLE 0x02 00055 #define HID_REQ_GET_PROTOCOL 0x03 00056 #define HID_REQ_SET_REPORT 0x09 00057 #define HID_REQ_SET_IDLE 0x0A 00058 #define HID_REQ_SET_PROTOCOL 0x0B 00059 00060 /* 00061 * HID class descriptor types 00062 */ 00063 #define HID_DT_HID (USB_TYPE_CLASS | 0x01) 00064 #define HID_DT_REPORT (USB_TYPE_CLASS | 0x02) 00065 #define HID_DT_PHYSICAL (USB_TYPE_CLASS | 0x03) 00066 00067 /* 00068 * USB HID descriptor 00069 */ 00070 typedef struct usb_HidDesc 00071 { 00072 uint8_t bLength; 00073 uint8_t bDescriptorType; 00074 uint16_t bcdHID; 00075 uint8_t bCountryCode; 00076 uint8_t bNumDescriptors; 00077 uint8_t bDescriptorHidType; 00078 uint16_t wDescriptorLength; 00079 } PACKED usb_HidDesc; 00080 00081 #endif /* USB_HID_H */