mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-16 21:01:31 +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:
parent
7df6b9563c
commit
a789619fbe
@ -33,7 +33,6 @@
|
|||||||
* Main source file for the TeensyHID bootloader. This file contains the complete bootloader logic.
|
* Main source file for the TeensyHID bootloader. This file contains the complete bootloader logic.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define INCLUDE_FROM_TEENSYHID_C
|
|
||||||
#include "TeensyHID.h"
|
#include "TeensyHID.h"
|
||||||
|
|
||||||
/* Global Variables: */
|
/* Global Variables: */
|
||||||
|
@ -93,7 +93,10 @@ ISR(USB_GEN_vect, ISR_BLOCK)
|
|||||||
|
|
||||||
USB_Detach();
|
USB_Detach();
|
||||||
USB_CLK_Freeze();
|
USB_CLK_Freeze();
|
||||||
|
|
||||||
|
if (!(USB_Options & USB_OPT_MANUAL_PLL))
|
||||||
USB_PLL_Off();
|
USB_PLL_Off();
|
||||||
|
|
||||||
USB_REG_Off();
|
USB_REG_Off();
|
||||||
|
|
||||||
EVENT_USB_VBUSDisconnect();
|
EVENT_USB_VBUSDisconnect();
|
||||||
|
@ -185,7 +185,7 @@
|
|||||||
#if !defined(__DOXYGEN__)
|
#if !defined(__DOXYGEN__)
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
#define USB_Device_SetLowSpeed() MACROS{ UDCON |= (1 << LSM); }MACROE
|
#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
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -121,6 +121,8 @@ void USB_ShutDown(void)
|
|||||||
USB_ResetInterface();
|
USB_ResetInterface();
|
||||||
USB_Detach();
|
USB_Detach();
|
||||||
USB_Controller_Disable();
|
USB_Controller_Disable();
|
||||||
|
|
||||||
|
if (!(USB_Options & USB_OPT_MANUAL_PLL))
|
||||||
USB_PLL_Off();
|
USB_PLL_Off();
|
||||||
|
|
||||||
#if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
|
#if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
|
||||||
@ -188,7 +190,7 @@ void USB_ResetInterface(void)
|
|||||||
if (USB_Options & USB_DEVICE_OPT_LOWSPEED)
|
if (USB_Options & USB_DEVICE_OPT_LOWSPEED)
|
||||||
USB_Device_SetLowSpeed();
|
USB_Device_SetLowSpeed();
|
||||||
else
|
else
|
||||||
USB_Device_SetHighSpeed();
|
USB_Device_SetFullSpeed();
|
||||||
|
|
||||||
USB_INT_Enable(USB_INT_VBUS);
|
USB_INT_Enable(USB_INT_VBUS);
|
||||||
}
|
}
|
||||||
|
@ -64,6 +64,7 @@
|
|||||||
* to only unfreeze and check one data pipe at a time) to prevent incorrect device enumerations and freezes while trasferring data
|
* to only unfreeze and check one data pipe at a time) to prevent incorrect device enumerations and freezes while trasferring data
|
||||||
* - Make Pipe_ConfigurePipe() mask the given endpoint number against PIPE_EPNUM_MASK to ensure the endpoint IN direction bit is
|
* - Make Pipe_ConfigurePipe() mask the given endpoint number against PIPE_EPNUM_MASK to ensure the endpoint IN direction bit is
|
||||||
* cleared to prevent endpoint type corruption
|
* cleared to prevent endpoint type corruption
|
||||||
|
* - Fixed USB_OPT_MANUAL_PLL option being ignored during device disconnects on some models (thanks to Brian Dickman)
|
||||||
* - Fixed documentation mentioning Pipe_GetCurrentToken() function when correct function name is Pipe_GetPipeToken()
|
* - Fixed documentation mentioning Pipe_GetCurrentToken() function when correct function name is Pipe_GetPipeToken()
|
||||||
* - Fixed ADC driver for the ATMEGA32U4 and ATMEGA16U4 (thanks to Opendous Inc.)
|
* - Fixed ADC driver for the ATMEGA32U4 and ATMEGA16U4 (thanks to Opendous Inc.)
|
||||||
* - Fixed CDCHost demo unfreezing the pipes at the point of configuration, rather than use
|
* - Fixed CDCHost demo unfreezing the pipes at the point of configuration, rather than use
|
||||||
|
Loading…
Reference in New Issue
Block a user