From a5d88e879c5e9298b29d25f5a5795b56bf4f15ae Mon Sep 17 00:00:00 2001 From: finga Date: Sun, 12 Sep 2021 01:05:33 +0200 Subject: [PATCH] Furbish code and comment Remove unneeded brackets and improve comment. --- firmware/src/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/firmware/src/main.c b/firmware/src/main.c index c3baf01..121233d 100644 --- a/firmware/src/main.c +++ b/firmware/src/main.c @@ -695,9 +695,8 @@ ISR(PCINT1_vect) { TCNT1 = 0; } } else { // press - if (!(TCCR1B & (1 << CS10))) { + if (!(TCCR1B & (1 << CS10))) TCCR1B |= (1 << CS11) | (1 << CS10); // Enable Timer/Counter1 - } } // TODO: proper debouncing @@ -706,7 +705,7 @@ ISR(PCINT1_vect) { sei(); } -// Timer/Counter1 compare match A +// Timer/Counter1 compare match A for back event ISR(TIMER1_COMPA_vect) { cli();