diff options
| author | Akshay Nair <phenax5@gmail.com> | 2026-02-08 16:18:49 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2026-02-08 16:18:49 +0530 |
| commit | 20d86bf1e3dfdfb4c0a3ea557b54f0bea0f5c214 (patch) | |
| tree | 86a7a23ac0b49bb9ff6d29f6c6f5e45209d42d94 /src/display.c | |
| parent | eef689b2e209dcf84c149ee4866c2a007676dc71 (diff) | |
| download | daft-watch-20d86bf1e3dfdfb4c0a3ea557b54f0bea0f5c214.tar.gz daft-watch-20d86bf1e3dfdfb4c0a3ea557b54f0bea0f5c214.zip | |
Handle button state
Diffstat (limited to '')
| -rw-r--r-- | src/display.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/display.c b/src/display.c index 8de5043..7781b7e 100644 --- a/src/display.c +++ b/src/display.c @@ -3,6 +3,7 @@ #include <stdint.h> #include <util/delay.h> +#include "button.h" #include "display.h" #include "rtc.h" @@ -38,8 +39,12 @@ volatile uint8_t current_digit = 0; // Render current digit void display_render(void) { + button_tick(); // Check button click + DDRA |= 0b11111111; DDRB |= 0b11111111; + PORTA = 0b01111111; + PORTB = 0b00000000; write_time(minutes, seconds, current_digit); |
