mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-06-06 08:22:44 +00:00
Speed up Mass Storage bootloader by turning off the internal clock divider, as there is enough FLASH space to do so.
This commit is contained in:
parent
1703283893
commit
88bcc6fde5
@ -104,6 +104,9 @@ static void SetupHardware(void)
|
|||||||
MCUSR &= ~(1 << WDRF);
|
MCUSR &= ~(1 << WDRF);
|
||||||
wdt_disable();
|
wdt_disable();
|
||||||
|
|
||||||
|
/* Disable clock division */
|
||||||
|
clock_prescale_set(clock_div_1);
|
||||||
|
|
||||||
/* Relocate the interrupt vector table to the bootloader section */
|
/* Relocate the interrupt vector table to the bootloader section */
|
||||||
MCUCR = (1 << IVCE);
|
MCUCR = (1 << IVCE);
|
||||||
MCUCR = (1 << IVSEL);
|
MCUCR = (1 << IVSEL);
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
/* Includes: */
|
/* Includes: */
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <avr/wdt.h>
|
#include <avr/wdt.h>
|
||||||
|
#include <avr/power.h>
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user