aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Class/Common/HID.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-10-25 12:42:55 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-10-25 12:42:55 +0000
commit55538dcef34bc3c0f2ada4767c51d11202ac0678 (patch)
treef047601bd6ab339511e24acb00801de8fdebc19c /LUFA/Drivers/USB/Class/Common/HID.h
parentb37d77eab32d171ad7b28157a924a4026e2aebd1 (diff)
downloadlufa-55538dcef34bc3c0f2ada4767c51d11202ac0678.tar.gz
lufa-55538dcef34bc3c0f2ada4767c51d11202ac0678.tar.bz2
lufa-55538dcef34bc3c0f2ada4767c51d11202ac0678.zip
Add descriptor class, subclass and protocol constants to the class drivers, modify all demos to use them where possible.
Move out private/internal host class driver constants to the common class driver headers, so that they can be used in the Low Level host mode demos. Ensure all demos, projects and bootloaders use the class driver constants where possible to minimise code repetition.
Diffstat (limited to 'LUFA/Drivers/USB/Class/Common/HID.h')
-rw-r--r--LUFA/Drivers/USB/Class/Common/HID.h42
1 files changed, 25 insertions, 17 deletions
diff --git a/LUFA/Drivers/USB/Class/Common/HID.h b/LUFA/Drivers/USB/Class/Common/HID.h
index b5d095e08..0a7ada3a9 100644
--- a/LUFA/Drivers/USB/Class/Common/HID.h
+++ b/LUFA/Drivers/USB/Class/Common/HID.h
@@ -98,6 +98,31 @@
#define HID_KEYBOARD_LED_KATANA (1 << 3)
/* Type Defines: */
+ /** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the HID
+ * device class.
+ */
+ enum HID_Descriptor_ClassSubclassProtocol_t
+ {
+ HID_CSCP_HIDClass = 0x03, /**< Descriptor Class value indicating that the device or interface
+ * belongs to the HID class.
+ */
+ HID_CSCP_NonBootSubclass = 0x00, /**< Descriptor Subclass value indicating that the device or interface
+ * does not implement a HID boot protocol.
+ */
+ HID_CSCP_BootSubclass = 0x01, /**< Descriptor Subclass value indicating that the device or interface
+ * implements a HID boot protocol.
+ */
+ HID_CSCP_NonBootProtocol = 0x00, /**< Descriptor Protocol value indicating that the device or interface
+ * does not belong to a HID boot protocol.
+ */
+ HID_CSCP_KeyboardBootProtocol = 0x01, /**< Descriptor Protocol value indicating that the device or interface
+ * belongs to the Keyboard HID boot protocol.
+ */
+ HID_CSCP_MouseBootProtocol = 0x02, /**< Descriptor Protocol value indicating that the device or interface
+ * belongs to the Mouse HID boot protocol.
+ */
+ };
+
/** Enum for the HID class specific control requests that can be issued by the USB bus host. */
enum HID_ClassRequests_t
{
@@ -116,23 +141,6 @@
HID_DTYPE_Report = 0x22, /**< Descriptor header type value, to indicate a HID class HID report descriptor. */
};
- /** Enum for the HID class boot protocols that may be supported by HID devices. */
- enum HID_BootProtocols_t
- {
- HID_BOOTP_NonBootProtocol = 0x00, /**< Constant for the protocol value of a HID interface descriptor, indicating
- * that the interface does not support any HID class boot protocol (see HID
- * Class Specification).
- */
- HID_BOOTP_KeyboardBootProtocol = 0x01, /**< Constant for the protocol value of a HID interface descriptor, indicating
- * that the interface supports the HID class Keyboard boot protocol (see HID
- * Class Specification).
- */
- HID_BOOTP_MouseBootProtocol = 0x02, /**< Constant for the protocol value of a HID interface descriptor, indicating
- * that the interface supports the HID class Mouse boot protocol (see HID Class
- * Specification).
- */
- };
-
/** Enum for the different types of HID reports. */
enum HID_ReportItemTypes_t
{