hardware::KBD4x: Disable clock division

The KBD4x has a set of WS2812 LEDs, which are very picky about timing. To make
them happy (even though we do not use them yet), we need to disable clock
division at startup.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/540/head
Gergely Nagy 6 years ago
parent 9f0d85500a
commit 9402c6ff33
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -54,6 +54,10 @@ class KBD4x: public kaleidoscope::hardware::ATMegaKeyboard {
*/
MCUCR |= (1 << JTD);
MCUCR |= (1 << JTD);
// Disable Clock division
CLKPR = (1 << CLKPCE);
CLKPR = (0 << CLKPS3) | (0 << CLKPS2) | (0 << CLKPS1) | (0 << CLKPS0);
}
ATMEGA_KEYBOARD_CONFIG(

Loading…
Cancel
Save