diff options
Diffstat (limited to 'LUFA/Drivers/USB')
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/USBInterrupt.c | 5 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Device.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/LowLevel.c | 6 |
3 files changed, 9 insertions, 4 deletions
diff --git a/LUFA/Drivers/USB/HighLevel/USBInterrupt.c b/LUFA/Drivers/USB/HighLevel/USBInterrupt.c index 20545a40e..f0a59edb7 100644 --- a/LUFA/Drivers/USB/HighLevel/USBInterrupt.c +++ b/LUFA/Drivers/USB/HighLevel/USBInterrupt.c @@ -93,7 +93,10 @@ ISR(USB_GEN_vect, ISR_BLOCK) USB_Detach();
USB_CLK_Freeze();
- USB_PLL_Off();
+
+ if (!(USB_Options & USB_OPT_MANUAL_PLL))
+ USB_PLL_Off();
+
USB_REG_Off();
EVENT_USB_VBUSDisconnect();
diff --git a/LUFA/Drivers/USB/LowLevel/Device.h b/LUFA/Drivers/USB/LowLevel/Device.h index e162a5980..d66def438 100644 --- a/LUFA/Drivers/USB/LowLevel/Device.h +++ b/LUFA/Drivers/USB/LowLevel/Device.h @@ -185,7 +185,7 @@ #if !defined(__DOXYGEN__)
/* Macros: */
#define USB_Device_SetLowSpeed() MACROS{ UDCON |= (1 << LSM); }MACROE
- #define USB_Device_SetHighSpeed() MACROS{ UDCON &= ~(1 << LSM); }MACROE
+ #define USB_Device_SetFullSpeed() MACROS{ UDCON &= ~(1 << LSM); }MACROE
#endif
#endif
diff --git a/LUFA/Drivers/USB/LowLevel/LowLevel.c b/LUFA/Drivers/USB/LowLevel/LowLevel.c index 41d9e10cc..3ad1e9830 100644 --- a/LUFA/Drivers/USB/LowLevel/LowLevel.c +++ b/LUFA/Drivers/USB/LowLevel/LowLevel.c @@ -121,7 +121,9 @@ void USB_ShutDown(void) USB_ResetInterface();
USB_Detach();
USB_Controller_Disable();
- USB_PLL_Off();
+
+ if (!(USB_Options & USB_OPT_MANUAL_PLL))
+ USB_PLL_Off();
#if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
USB_OTGPAD_Off();
@@ -188,7 +190,7 @@ void USB_ResetInterface(void) if (USB_Options & USB_DEVICE_OPT_LOWSPEED)
USB_Device_SetLowSpeed();
else
- USB_Device_SetHighSpeed();
+ USB_Device_SetFullSpeed();
USB_INT_Enable(USB_INT_VBUS);
}
|