projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed LowLevel Keyboard demo not saving the issued report only after it has been...
[pub/USBasp.git]
/
Demos
/
Device
/
LowLevel
/
Mouse
/
Mouse.c
diff --git
a/Demos/Device/LowLevel/Mouse/Mouse.c
b/Demos/Device/LowLevel/Mouse/Mouse.c
index
4b318e3
..
ff54c65
100644
(file)
--- a/
Demos/Device/LowLevel/Mouse/Mouse.c
+++ b/
Demos/Device/LowLevel/Mouse/Mouse.c
@@
-268,9
+268,6
@@
void SendNextReport(void)
if ((MouseReportData.Y != 0) || (MouseReportData.X != 0))
\r
SendReport = true;
\r
\r
if ((MouseReportData.Y != 0) || (MouseReportData.X != 0))
\r
SendReport = true;
\r
\r
- /* Save the current report data for later comparison to check for changes */
\r
- PrevMouseReportData = MouseReportData;
\r
-
\r
/* Check if the idle period is set and has elapsed */
\r
if ((IdleCount != HID_IDLE_CHANGESONLY) && (!(IdleMSRemaining)))
\r
{
\r
/* Check if the idle period is set and has elapsed */
\r
if ((IdleCount != HID_IDLE_CHANGESONLY) && (!(IdleMSRemaining)))
\r
{
\r
@@
-286,7
+283,10
@@
void SendNextReport(void)
\r
/* Check if Mouse Endpoint Ready for Read/Write and if we should send a new report */
\r
if (Endpoint_IsReadWriteAllowed() && SendReport)
\r
\r
/* Check if Mouse Endpoint Ready for Read/Write and if we should send a new report */
\r
if (Endpoint_IsReadWriteAllowed() && SendReport)
\r
- {
\r
+ {
\r
+ /* Save the current report data for later comparison to check for changes */
\r
+ PrevMouseReportData = MouseReportData;
\r
+
\r
/* Write Mouse Report Data */
\r
Endpoint_Write_Stream_LE(&MouseReportData, sizeof(MouseReportData));
\r
\r
/* Write Mouse Report Data */
\r
Endpoint_Write_Stream_LE(&MouseReportData, sizeof(MouseReportData));
\r
\r