diff options
author | QMK Bot <hello@qmk.fm> | 2021-09-09 03:20:08 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2021-09-09 03:20:08 +0000 |
commit | ac4849df133631aa11dd9c61eacd5efb25644ebf (patch) | |
tree | e981119d7785e1bc54b784748fe1a9cb20c5dd78 /tmk_core | |
parent | f03e78e8880c3a5024104061dd979d08ecbfe989 (diff) | |
parent | 6d43a5daf4225cf677840d11b151d28f49e8f9e9 (diff) | |
download | qmk_firmware-ac4849df133631aa11dd9c61eacd5efb25644ebf.tar.gz qmk_firmware-ac4849df133631aa11dd9c61eacd5efb25644ebf.zip |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'tmk_core')
-rw-r--r-- | tmk_core/protocol/lufa/lufa.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 4e17834be9..5b56e8a03c 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -1015,8 +1015,13 @@ static void setup_mcu(void) { MCUSR &= ~_BV(WDRF); wdt_disable(); - /* Disable clock division */ +// For boards running at 3.3V and crystal at 16 MHz +#if (F_CPU == 8000000 && F_USB == 16000000) + /* Divide clock by 2 */ + clock_prescale_set(clock_div_2); +#else /* Disable clock division */ clock_prescale_set(clock_div_1); +#endif } /** \brief Setup USB |