diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-05-14 10:07:08 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-05-14 10:07:08 +0000 |
commit | 32f0f605efa293430a47d60bb857695ff6937d21 (patch) | |
tree | 9ab514c6088c9f044c029fdf36c880ecdf700a71 /LUFA/Drivers/USB/HighLevel/USBInterrupt.c | |
parent | 0d5baf9bb3e88ebcbc53cc9a71566582d585f7dd (diff) | |
download | lufa-32f0f605efa293430a47d60bb857695ff6937d21.tar.gz lufa-32f0f605efa293430a47d60bb857695ff6937d21.tar.bz2 lufa-32f0f605efa293430a47d60bb857695ff6937d21.zip |
Removed all user pipe/endpoint interrupt APIs, added internal library support for interrupt driven control endpoints when in device mode by defining INTERRUPT_CONTROL_ENDPOINT token and passing it to the compiler via the -D switch.
Diffstat (limited to 'LUFA/Drivers/USB/HighLevel/USBInterrupt.c')
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/USBInterrupt.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/LUFA/Drivers/USB/HighLevel/USBInterrupt.c b/LUFA/Drivers/USB/HighLevel/USBInterrupt.c index 93bd6d084..14d277c9a 100644 --- a/LUFA/Drivers/USB/HighLevel/USBInterrupt.c +++ b/LUFA/Drivers/USB/HighLevel/USBInterrupt.c @@ -174,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
@@ -249,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
|