Move USB constants to usb_api.h
This commit is contained in:
@@ -14,6 +14,31 @@
|
||||
|
||||
// Macros:
|
||||
|
||||
// General constants
|
||||
|
||||
#define USB_DEVICE_CLASS 0x00
|
||||
#define USB_DEVICE_SUBCLASS 0x00
|
||||
#define USB_DEVICE_PROTOCOL 0x00
|
||||
|
||||
#define USB_INTERFACE_ALTERNATE_SETTING_NONE 0x00
|
||||
#define USB_STRING_DESCRIPTOR_NONE 0x00
|
||||
|
||||
// HID related constants
|
||||
|
||||
#define USB_CLASS_HID 0x03
|
||||
#define USB_HID_COUNTRY_CODE_NOT_SUPPORTED 0x00
|
||||
|
||||
#define USB_DESCRIPTOR_LENGTH_HID 9
|
||||
|
||||
#define USB_HID_SUBCLASS_NONE 0
|
||||
#define USB_HID_SUBCLASS_BOOT 1
|
||||
|
||||
#define USB_HID_PROTOCOL_NONE 0
|
||||
#define USB_HID_PROTOCOL_KEYBOARD 1
|
||||
#define USB_HID_PROTOCOL_MOUSE 2
|
||||
|
||||
// HID report item related constants
|
||||
|
||||
#define HID_RI_USAGE_PAGE_GENERIC_DESKTOP 0x01
|
||||
#define HID_RI_USAGE_PAGE_LEDS 0x08
|
||||
#define HID_RI_USAGE_PAGE_BUTTONS 0x09
|
||||
@@ -37,4 +62,8 @@
|
||||
|
||||
#define HID_RI_USAGE_PAGE_KEY_CODES 0x07
|
||||
|
||||
// Miscellaneous constants
|
||||
|
||||
#define USB_LANGUAGE_ID_UNITED_STATES 0x0409
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user