projects
/
pub
/
lufa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ensure that the previous HID reports in the HID device class driver are kept per...
[pub/lufa.git]
/
LUFA
/
Drivers
/
USB
/
Class
/
Device
/
HID.c
diff --git
a/LUFA/Drivers/USB/Class/Device/HID.c
b/LUFA/Drivers/USB/Class/Device/HID.c
index
4c13436
..
bfe97ff
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/HID.c
+++ b/
LUFA/Drivers/USB/Class/Device/HID.c
@@
-150,8
+150,6
@@
bool HID_Device_ConfigureEndpoints(USB_ClassInfo_HID_Device_t* const HIDInterfac
\r
void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
\r
{
\r
\r
void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
\r
{
\r
- static uint8_t PreviousReportINData[HID_MAX_REPORT_SIZE];
\r
-
\r
if (USB_DeviceState != DEVICE_STATE_Configured)
\r
return;
\r
\r
if (USB_DeviceState != DEVICE_STATE_Configured)
\r
return;
\r
\r
@@
-167,10
+165,10
@@
void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
\r
ReportINSize = CALLBACK_HID_Device_CreateHIDReport(HIDInterfaceInfo, &ReportID, ReportINData);
\r
\r
\r
ReportINSize = CALLBACK_HID_Device_CreateHIDReport(HIDInterfaceInfo, &ReportID, ReportINData);
\r
\r
- bool StatesChanged = (memcmp(ReportINData, PreviousReportINData, ReportINSize) != 0);
\r
+ bool StatesChanged = (memcmp(ReportINData,
HIDInterfaceInfo->State.
PreviousReportINData, ReportINSize) != 0);
\r
bool IdlePeriodElapsed = (HIDInterfaceInfo->State.IdleCount && !(HIDInterfaceInfo->State.IdleMSRemaining));
\r
\r
bool IdlePeriodElapsed = (HIDInterfaceInfo->State.IdleCount && !(HIDInterfaceInfo->State.IdleMSRemaining));
\r
\r
- memcpy(PreviousReportINData, ReportINData, ReportINSize);
\r
+ memcpy(
HIDInterfaceInfo->State.
PreviousReportINData, ReportINData, ReportINSize);
\r
\r
if (ReportINSize && (StatesChanged || IdlePeriodElapsed))
\r
{
\r
\r
if (ReportINSize && (StatesChanged || IdlePeriodElapsed))
\r
{
\r