diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-04-13 23:29:11 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-04-13 23:29:11 +0000 |
commit | 7b79325aa037db9786f0da069c11315a3f6d9721 (patch) | |
tree | c7cecdb1ed159e7f9c2331cb159e8b39bb6a8316 /LUFA/Drivers/USB/LowLevel/LowLevel.c | |
parent | 19ecd04f37f68c0674f1194aa8d8a4fc94d6168b (diff) | |
download | lufa-7b79325aa037db9786f0da069c11315a3f6d9721.tar.gz lufa-7b79325aa037db9786f0da069c11315a3f6d9721.tar.bz2 lufa-7b79325aa037db9786f0da069c11315a3f6d9721.zip |
Removed two-step endpoint/pipe bank clear and switch sequence for smaller, faster endpoint/pipe code.
Added spacing between multiple paragraphs in Doxygen \note sections.
Removed call to the clock prescaler reset function in the Teensy bootloader to save space - the user application is accessed via a watchdog reset anyway, so the prescale reset would only affect the speed of the bootloader itself.
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel/LowLevel.c')
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/LowLevel.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/LowLevel.c b/LUFA/Drivers/USB/LowLevel/LowLevel.c index f4f277ccb..c9d0493b4 100644 --- a/LUFA/Drivers/USB/LowLevel/LowLevel.c +++ b/LUFA/Drivers/USB/LowLevel/LowLevel.c @@ -113,9 +113,18 @@ void USB_ShutDown(void) USB_Detach();
USB_Controller_Disable();
+ USB_INT_DisableAllInterrupts();
+ USB_INT_ClearAllInterrupts();
+
+ #if defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
+ UHWCON &= ~(1 << UIMOD);
+ #endif
+
if (!(USB_Options & USB_OPT_MANUAL_PLL))
USB_PLL_Off();
+ USB_REG_Off();
+
#if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
USB_OTGPAD_Off();
#endif
@@ -145,11 +154,11 @@ void USB_ResetInterface(void) USB_ConfigurationNumber = 0;
#if !defined(NO_DEVICE_REMOTE_WAKEUP)
- USB_RemoteWakeupEnabled = false;
+ USB_RemoteWakeupEnabled = false;
#endif
#if !defined(NO_DEVICE_SELF_POWER)
- USB_CurrentlySelfPowered = false;
+ USB_CurrentlySelfPowered = false;
#endif
#endif
@@ -217,9 +226,9 @@ void USB_ResetInterface(void) USB_INT_Clear(USB_INT_EORSTI);
USB_INT_Enable(USB_INT_EORSTI);
- #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
- USB_INT_Enable(USB_INT_VBUS);
- #endif
+ #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
+ USB_INT_Enable(USB_INT_VBUS);
+ #endif
#elif defined(USB_HOST_ONLY)
USB_Host_HostMode_On();
|