Changed GenericHID device demo to use the LUFA scheduler, added INTERRUPT_DATA_ENDPOINT and INTERRUPT_CONTROL_ENDPOINT compile time options.
This commit is contained in:
parent
6198289b38
commit
ece9e3d599
8 changed files with 113 additions and 6 deletions
|
@ -346,6 +346,9 @@ TASK(USB_Mouse_Host)
|
|||
*/
|
||||
ISR(ENDPOINT_PIPE_vect, ISR_BLOCK)
|
||||
{
|
||||
/* Save previously selected pipe before selecting a new pipe */
|
||||
uint8_t PrevSelectedPipe = Pipe_GetCurrentPipe();
|
||||
|
||||
/* Check to see if the mouse data pipe has caused the interrupt */
|
||||
if (Pipe_HasPipeInterrupted(MOUSE_DATAPIPE))
|
||||
{
|
||||
|
@ -363,5 +366,8 @@ ISR(ENDPOINT_PIPE_vect, ISR_BLOCK)
|
|||
ReadNextReport();
|
||||
}
|
||||
}
|
||||
|
||||
/* Restore previously selected pipe */
|
||||
Pipe_SelectPipe(PrevSelectedPipe);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue