aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-10-26 11:44:36 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-10-26 11:44:36 +0000
commitde8c9445d478dc31dab7e042c9c2943d0758bbb3 (patch)
treebd6d4e98ce3a3d2995a7cbc86f0fcd84abdef5ad /Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
parent9ea891ea201a3ef897b108c7a9431d36cadfafae (diff)
downloadlufa-de8c9445d478dc31dab7e042c9c2943d0758bbb3.tar.gz
lufa-de8c9445d478dc31dab7e042c9c2943d0758bbb3.tar.bz2
lufa-de8c9445d478dc31dab7e042c9c2943d0758bbb3.zip
Make HID device class driver ignore the previous HID report comparison buffer when the user sets it to NULL, disabling automatic report comparisons. Update HID device class driver documentation giving previous report buffer limitations.
Diffstat (limited to 'Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c')
-rw-r--r--Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
index fc7d136f0..033bc5665 100644
--- a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
+++ b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
@@ -40,6 +40,24 @@
/** Buffer to hold the previously generated Keyboard HID report, for comparison purposes inside the HID class driver. */
uint8_t PrevKeyboardHIDReportBuffer[sizeof(USB_KeyboardReport_Data_t)];
+/** LUFA HID Class driver interface configuration and state information. This structure is
+ * passed to all HID Class driver functions, so that multiple instances of the same class
+ * within a device can be differentiated from one another.
+ */
+USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
+ {
+ .Config =
+ {
+ .InterfaceNumber = 1,
+
+ .ReportINEndpointNumber = KEYBOARD_EPNUM,
+ .ReportINEndpointSize = KEYBOARD_EPSIZE,
+
+ .PrevReportINBuffer = PrevKeyboardHIDReportBuffer,
+ .PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer),
+ },
+ };
+
/** LUFA Mass Storage Class driver interface configuration and state information. This structure is
* passed to all Mass Storage Class driver functions, so that multiple instances of the same class
* within a device can be differentiated from one another.
@@ -60,24 +78,6 @@ USB_ClassInfo_MS_Device_t Disk_MS_Interface =
},
};
-/** LUFA HID Class driver interface configuration and state information. This structure is
- * passed to all HID Class driver functions, so that multiple instances of the same class
- * within a device can be differentiated from one another.
- */
-USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
- {
- .Config =
- {
- .InterfaceNumber = 1,
-
- .ReportINEndpointNumber = KEYBOARD_EPNUM,
- .ReportINEndpointSize = KEYBOARD_EPSIZE,
-
- .PrevReportINBuffer = PrevKeyboardHIDReportBuffer,
- .PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer),
- },
- };
-
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/