mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
Reduce prescaler of the flush timer in the USBtoSerial demo, so that buffer overruns will not occur regardless of hardware and baud rate settings.
This commit is contained in:
@@ -124,8 +124,8 @@ void SetupHardware(void)
|
||||
LEDs_Init();
|
||||
USB_Init();
|
||||
|
||||
/* Configure the UART flush timer - run at Fcpu/1024 for maximum interval before overflow */
|
||||
TCCR0B = ((1 << CS02) | (1 << CS00));
|
||||
/* Start the flush timer so that overflows occur rapidly to push received bytes to the USB interface */
|
||||
TCCR0B = (1 << CS02);
|
||||
}
|
||||
|
||||
/** Event handler for the library USB Connection event. */
|
||||
|
||||
Reference in New Issue
Block a user