projects
/
pub
/
lufa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed incorrect/missing control status stage transfers on demos, bootloaders and...
[pub/lufa.git]
/
Demos
/
Mouse
/
Mouse.c
diff --git
a/Demos/Mouse/Mouse.c
b/Demos/Mouse/Mouse.c
index
3e59706
..
da8a4a8
100644
(file)
--- a/
Demos/Mouse/Mouse.c
+++ b/
Demos/Mouse/Mouse.c
@@
-201,6
+201,10
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
\r
/* Send the flag to the host */
\r
Endpoint_ClearSetupIN();
\r
\r
/* Send the flag to the host */
\r
Endpoint_ClearSetupIN();
\r
+
\r
+ /* Acknowledge status stage */
\r
+ while (!(Endpoint_IsSetupOUTReceived()));
\r
+ Endpoint_ClearSetupOUT();
\r
}
\r
\r
break;
\r
}
\r
\r
break;
\r
@@
-215,7
+219,8
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
/* Set or clear the flag depending on what the host indicates that the current Protocol should be */
\r
UsingReportProtocol = (wValue != 0x0000);
\r
\r
/* Set or clear the flag depending on what the host indicates that the current Protocol should be */
\r
UsingReportProtocol = (wValue != 0x0000);
\r
\r
- /* Send an empty packet to acknowedge the command */
\r
+ /* Acknowledge status stage */
\r
+ while (!(Endpoint_IsSetupINReady()));
\r
Endpoint_ClearSetupIN();
\r
}
\r
\r
Endpoint_ClearSetupIN();
\r
}
\r
\r
@@
-231,7
+236,8
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
/* Get idle period in MSB */
\r
IdleCount = (wValue >> 8);
\r
\r
/* Get idle period in MSB */
\r
IdleCount = (wValue >> 8);
\r
\r
- /* Send an empty packet to acknowedge the command */
\r
+ /* Acknowledge status stage */
\r
+ while (!(Endpoint_IsSetupINReady()));
\r
Endpoint_ClearSetupIN();
\r
}
\r
\r
Endpoint_ClearSetupIN();
\r
}
\r
\r
@@
-246,6
+252,10
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
\r
/* Send the flag to the host */
\r
Endpoint_ClearSetupIN();
\r
\r
/* Send the flag to the host */
\r
Endpoint_ClearSetupIN();
\r
+
\r
+ /* Acknowledge status stage */
\r
+ while (!(Endpoint_IsSetupOUTReceived()));
\r
+ Endpoint_ClearSetupOUT();
\r
}
\r
\r
break;
\r
}
\r
\r
break;
\r