From 02c12bfedcf669df81491ea49502a982e980bcda Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 27 Feb 2026 11:42:13 +0530 Subject: Refactor button --- src/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 11ad99f..98b63a2 100644 --- a/src/main.c +++ b/src/main.c @@ -20,13 +20,16 @@ FUSES = { // Timer 0 has lower priority than timer 1, so some ticks could get skipped on // interrupt starvation ISR(TIM0_COMPA_vect, ISR_FLATTEN) { - // button_tick(); // Check button click + button_tick(); // Check button click display_render(); } // RTC interrupt ISR(TIM1_COMPA_vect, ISR_FLATTEN) { rtc_increment(); } +// Button interrupt +ISR(PCINT0_vect, ISR_FLATTEN) { button_tick(); } + int main(void) { PRR = 0b0011; // Power reduction register. Shut down USI and ADC -- cgit v1.3.1