Skip to content
Snippets Groups Projects
Commit 94c899d7 authored by Dean Camera's avatar Dean Camera
Browse files

Fixed Device mode HID Class driver not explicitly initializing the ReportSize...

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.
parent 922e6019
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter ...@@ -48,7 +48,7 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter
{ {
Endpoint_ClearSETUP(); Endpoint_ClearSETUP();
uint16_t ReportINSize; uint16_t ReportINSize = 0;
uint8_t ReportID = (USB_ControlRequest.wValue & 0xFF); uint8_t ReportID = (USB_ControlRequest.wValue & 0xFF);
memset(HIDInterfaceInfo->Config.PrevReportINBuffer, 0, HIDInterfaceInfo->Config.PrevReportINBufferSize); memset(HIDInterfaceInfo->Config.PrevReportINBuffer, 0, HIDInterfaceInfo->Config.PrevReportINBufferSize);
...@@ -152,7 +152,7 @@ void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo) ...@@ -152,7 +152,7 @@ void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
{ {
uint8_t ReportINData[HIDInterfaceInfo->Config.PrevReportINBufferSize]; uint8_t ReportINData[HIDInterfaceInfo->Config.PrevReportINBufferSize];
uint8_t ReportID = 0; uint8_t ReportID = 0;
uint16_t ReportINSize; uint16_t ReportINSize = 0;
memset(ReportINData, 0, sizeof(ReportINData)); memset(ReportINData, 0, sizeof(ReportINData));
......
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
* - Added hardware USART receive interrupt and software buffering to the Benito project to ensure received data is not * - Added hardware USART receive interrupt and software buffering to the Benito project to ensure received data is not
* missed or corrupted * missed or corrupted
* - Fixed Device mode HID Class driver always sending IN packets, even when nothing to report * - 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 * \section Sec_ChangeLog090810 Version 090810
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
* or post your suggestion as an enhancement request to the project bug tracker. * or post your suggestion as an enhancement request to the project bug tracker.
* *
* <b>Targeted for This Release:</b> * <b>Targeted for This Release:</b>
* - Simplify Mass Storage Host LowLevel SCSI demo
* - Finish Host Mode Class Drivers * - Finish Host Mode Class Drivers
* ( ) Audio * ( ) Audio
* (C) CDC * (C) CDC
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment