X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/6a10d6b465be27db090d760dc0fbe722c94e4344..76d5e99bb8765030a7f99e7b5adf9bae7f92e0ba:/LUFA/Drivers/USB/HighLevel/USBInterrupt.c diff --git a/LUFA/Drivers/USB/HighLevel/USBInterrupt.c b/LUFA/Drivers/USB/HighLevel/USBInterrupt.c index 58faa69de..14d277c9a 100644 --- a/LUFA/Drivers/USB/HighLevel/USBInterrupt.c +++ b/LUFA/Drivers/USB/HighLevel/USBInterrupt.c @@ -28,7 +28,6 @@ this software. */ -#include "../LowLevel/USBMode.h" #include "USBInterrupt.h" void USB_INT_DisableAllInterrupts(void) @@ -175,6 +174,10 @@ ISR(USB_GEN_vect, ISR_BLOCK) ENDPOINT_DIR_OUT, USB_ControlEndpointSize, ENDPOINT_BANK_SINGLE); + #if defined(INTERRUPT_CONTROL_ENDPOINT) + USB_INT_Enable(USB_INT_ENDPOINT_SETUP); + #endif + RAISE_EVENT(USB_Reset); } #endif @@ -250,3 +253,16 @@ ISR(USB_GEN_vect, ISR_BLOCK) } #endif } + +#if defined(INTERRUPT_CONTROL_ENDPOINT) +ISR(USB_COM_vect, ISR_BLOCK) +{ + uint8_t PrevSelectedEndpoint = Endpoint_GetCurrentEndpoint(); + + USB_USBTask(); + + USB_INT_Clear(USB_INT_ENDPOINT_SETUP); + + Endpoint_SelectEndpoint(PrevSelectedEndpoint); +} +#endif