diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-02-19 12:09:55 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-02-19 12:09:55 +0000 |
commit | 100a197d0efa177b9f514cbf5292a6a333b03de9 (patch) | |
tree | b0c95ae3aab2837e9de7f94d7f23f1f48af8097d /LUFA/Drivers/USB | |
parent | e4f3d9957efee6d2259f3b9f19a26ce0c8bee95d (diff) | |
download | lufa-100a197d0efa177b9f514cbf5292a6a333b03de9.tar.gz lufa-100a197d0efa177b9f514cbf5292a6a333b03de9.tar.bz2 lufa-100a197d0efa177b9f514cbf5292a6a333b03de9.zip |
Reduced latency for executing the Start-Of-Frame events (if enabled in the user application).
Diffstat (limited to 'LUFA/Drivers/USB')
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/USBInterrupt.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/USBInterrupt.c b/LUFA/Drivers/USB/LowLevel/USBInterrupt.c index fdcfef272..34234fe84 100644 --- a/LUFA/Drivers/USB/LowLevel/USBInterrupt.c +++ b/LUFA/Drivers/USB/LowLevel/USBInterrupt.c @@ -74,6 +74,15 @@ void USB_INT_ClearAllInterrupts(void) ISR(USB_GEN_vect, ISR_BLOCK) { #if defined(USB_CAN_BE_DEVICE) + #if !defined(NO_SOF_EVENTS) + if (USB_INT_HasOccurred(USB_INT_SOFI) && USB_INT_IsEnabled(USB_INT_SOFI)) + { + USB_INT_Clear(USB_INT_SOFI); + + EVENT_USB_Device_StartOfFrame(); + } + #endif + #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) if (USB_INT_HasOccurred(USB_INT_VBUS) && USB_INT_IsEnabled(USB_INT_VBUS)) { @@ -161,18 +170,18 @@ ISR(USB_GEN_vect, ISR_BLOCK) EVENT_USB_Device_Reset(); } + #endif + #if defined(USB_CAN_BE_HOST) #if !defined(NO_SOF_EVENTS) - if (USB_INT_HasOccurred(USB_INT_SOFI) && USB_INT_IsEnabled(USB_INT_SOFI)) + if (USB_INT_HasOccurred(USB_INT_HSOFI) && USB_INT_IsEnabled(USB_INT_HSOFI)) { - USB_INT_Clear(USB_INT_SOFI); + USB_INT_Clear(USB_INT_HSOFI); - EVENT_USB_Device_StartOfFrame(); + EVENT_USB_Host_StartOfFrame(); } #endif - #endif - #if defined(USB_CAN_BE_HOST) if (USB_INT_HasOccurred(USB_INT_DDISCI) && USB_INT_IsEnabled(USB_INT_DDISCI)) { USB_INT_Clear(USB_INT_DDISCI); @@ -218,15 +227,6 @@ ISR(USB_GEN_vect, ISR_BLOCK) USB_ResetInterface(); } - - #if !defined(NO_SOF_EVENTS) - if (USB_INT_HasOccurred(USB_INT_HSOFI) && USB_INT_IsEnabled(USB_INT_HSOFI)) - { - USB_INT_Clear(USB_INT_HSOFI); - - EVENT_USB_Host_StartOfFrame(); - } - #endif #endif #if defined(USB_CAN_BE_BOTH) |