X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/6198289b388e4122afe4913f899b37a8e7cd8af4..ece9e3d5991dd481fc36baf799a1a85d14b88251:/Demos/Host/KeyboardHost/KeyboardHost.c diff --git a/Demos/Host/KeyboardHost/KeyboardHost.c b/Demos/Host/KeyboardHost/KeyboardHost.c index fe95c3493..13aed7ec3 100644 --- a/Demos/Host/KeyboardHost/KeyboardHost.c +++ b/Demos/Host/KeyboardHost/KeyboardHost.c @@ -350,6 +350,9 @@ TASK(USB_Keyboard_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 keyboard data pipe has caused the interrupt */ if (Pipe_HasPipeInterrupted(KEYBOARD_DATAPIPE)) { @@ -366,5 +369,8 @@ ISR(ENDPOINT_PIPE_vect, ISR_BLOCK) /* Read and process the next report from the device */ ReadNextReport(); } + + /* Restore previously selected pipe */ + Pipe_SelectPipe(PrevSelectedPipe); } #endif