diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-08-27 22:34:41 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-08-27 22:34:41 +0000 |
commit | 94c899d7b7b84cd170d75e1fbb4e696cf3447c27 (patch) | |
tree | 64c8d9d7c181ee3a3ca0e67137671a955820e6db | |
parent | 922e60192dc089654a82be0d789fb7a8ecc47039 (diff) | |
download | lufa-94c899d7b7b84cd170d75e1fbb4e696cf3447c27.tar.gz lufa-94c899d7b7b84cd170d75e1fbb4e696cf3447c27.tar.bz2 lufa-94c899d7b7b84cd170d75e1fbb4e696cf3447c27.zip |
Fixed Device mode HID Class driver not explicitly initializing the ReportSize parameter to zero before calling callback routine, so that ignored callbacks don't cause incorrect data to be sent.
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/HID.c | 8 | ||||
-rw-r--r-- | LUFA/ManPages/ChangeLog.txt | 2 | ||||
-rw-r--r-- | LUFA/ManPages/FutureChanges.txt | 1 |
3 files changed, 6 insertions, 5 deletions
diff --git a/LUFA/Drivers/USB/Class/Device/HID.c b/LUFA/Drivers/USB/Class/Device/HID.c index b44d4db63..a99c2647c 100644 --- a/LUFA/Drivers/USB/Class/Device/HID.c +++ b/LUFA/Drivers/USB/Class/Device/HID.c @@ -48,8 +48,8 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter {
Endpoint_ClearSETUP();
- uint16_t ReportINSize;
- uint8_t ReportID = (USB_ControlRequest.wValue & 0xFF);
+ uint16_t ReportINSize = 0;
+ uint8_t ReportID = (USB_ControlRequest.wValue & 0xFF);
memset(HIDInterfaceInfo->Config.PrevReportINBuffer, 0, HIDInterfaceInfo->Config.PrevReportINBufferSize);
@@ -151,8 +151,8 @@ void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo) if (Endpoint_IsReadWriteAllowed())
{
uint8_t ReportINData[HIDInterfaceInfo->Config.PrevReportINBufferSize];
- uint8_t ReportID = 0;
- uint16_t ReportINSize;
+ uint8_t ReportID = 0;
+ uint16_t ReportINSize = 0;
memset(ReportINData, 0, sizeof(ReportINData));
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 13cf672ca..b5f1590ce 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -43,6 +43,8 @@ * - Added hardware USART receive interrupt and software buffering to the Benito project to ensure received data is not
* missed or corrupted
* - Fixed Device mode HID Class driver always sending IN packets, even when nothing to report
+ * - Fixed Device mode HID Class driver not explicitly initializing the ReportSize parameter to zero before calling callback
+ * routine, so that ignored callbacks don't cause incorrect data to be sent
*
*
* \section Sec_ChangeLog090810 Version 090810
diff --git a/LUFA/ManPages/FutureChanges.txt b/LUFA/ManPages/FutureChanges.txt index ae592fde5..639e4eee4 100644 --- a/LUFA/ManPages/FutureChanges.txt +++ b/LUFA/ManPages/FutureChanges.txt @@ -12,7 +12,6 @@ * or post your suggestion as an enhancement request to the project bug tracker.
*
* <b>Targeted for This Release:</b>
- * - Simplify Mass Storage Host LowLevel SCSI demo
* - Finish Host Mode Class Drivers
* ( ) Audio
* (C) CDC
|