diff options
| author | Akshay Nair <phenax5@gmail.com> | 2026-02-27 11:42:13 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2026-02-27 11:42:13 +0530 |
| commit | 02c12bfedcf669df81491ea49502a982e980bcda (patch) | |
| tree | 109a6a0564a79d455b6ada92ff97c7c25f36c6b0 /src/main.c | |
| parent | 124c45a43829b58558b35a75c2369c1bf1ba86ef (diff) | |
| download | daft-watch-02c12bfedcf669df81491ea49502a982e980bcda.tar.gz daft-watch-02c12bfedcf669df81491ea49502a982e980bcda.zip | |
Refactor button
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |
