mirror of
https://github.com/zsa/qmk_firmware.git
synced 2026-05-04 14:55:29 +00:00
Renamed USB_Device_SetHighSpeed() to USB_Device_SetFullSpeed() so that the correct terminology is used (thanks to Brian Dickman).
Fix USB_PLL_Off() call in the series 4, 6 and 7 microcontroller disconnect interrupt handler code, which wasn't guarded by a test of USB_Options to check if the user has specified manual PLL control (thanks to Brian Dickman).
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user