projects
/
pub
/
lufa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed GenericHID device demo to use the LUFA scheduler, added INTERRUPT_DATA_ENDPOI...
[pub/lufa.git]
/
Demos
/
Host
/
GenericHIDHost
/
GenericHIDHost.c
diff --git
a/Demos/Host/GenericHIDHost/GenericHIDHost.c
b/Demos/Host/GenericHIDHost/GenericHIDHost.c
index
625ca70
..
c703039
100644
(file)
--- a/
Demos/Host/GenericHIDHost/GenericHIDHost.c
+++ b/
Demos/Host/GenericHIDHost/GenericHIDHost.c
@@
-350,6
+350,9
@@
TASK(USB_HID_Host)
*/
\r
ISR(ENDPOINT_PIPE_vect, ISR_BLOCK)
\r
{
\r
*/
\r
ISR(ENDPOINT_PIPE_vect, ISR_BLOCK)
\r
{
\r
+ /* Save previously selected pipe before selecting a new pipe */
\r
+ uint8_t PrevSelectedPipe = Pipe_GetCurrentPipe();
\r
+
\r
/* Check to see if the HID data IN pipe has caused the interrupt */
\r
if (Pipe_HasPipeInterrupted(HID_DATA_IN_PIPE))
\r
{
\r
/* Check to see if the HID data IN pipe has caused the interrupt */
\r
if (Pipe_HasPipeInterrupted(HID_DATA_IN_PIPE))
\r
{
\r
@@
-367,5
+370,8
@@
ISR(ENDPOINT_PIPE_vect, ISR_BLOCK)
ReadNextReport();
\r
}
\r
}
\r
ReadNextReport();
\r
}
\r
}
\r
+
\r
+ /* Restore previously selected pipe */
\r
+ Pipe_SelectPipe(PrevSelectedPipe);
\r
}
\r
#endif
\r
}
\r
#endif
\r