hardware/ErgoDox: Switch debouncing to ~3 times / 5ms

Based on the change made to `ATMegaKeyboard`, apply the same treatment to the
`ErgoDoxScanner` too, and run debouncing only 3 times per 5ms, which is closer
to what switch manufacturers recommend.

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

@ -67,11 +67,11 @@ void ErgoDox::setup(void) {
setStatusLEDBrightness(2, 15);
setStatusLEDBrightness(3, 15);
/* Set up Timer1 for 500usec */
/* Set up Timer1 for 1700usec */
TCCR1B = _BV(WGM13);
TCCR1A = 0;
const uint32_t cycles = (F_CPU / 2000000) * 500;
const uint32_t cycles = (F_CPU / 2000000) * 1700;
ICR1 = cycles;
TCCR1B = _BV(WGM13) | _BV(CS10);

Loading…
Cancel
Save