pomodoro-avr

Pomodoro timer на базе Attiny45
git clone git://git.konyahin.xyz/pomodoro-avr
Log | Files | Refs | LICENSE

commit 2fd6d891abc826640ee9927ed057a0f0458f9937
parent b73db5264b064cdb89e10c45750806b48ec3a488
Author: Anton Konyahin <me@konyahin.xyz>
Date:   Thu, 14 Apr 2022 21:55:25 +0300

calibration of timer

Diffstat:
Mtimer.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/timer.c b/timer.c @@ -4,6 +4,9 @@ #include "timer.h" +// should be 60, but I calibrate it for my needs +#define SEC 57 + static uint8_t minutes = 0; static uint8_t seconds = 0; static void (*callback) (void) = NULL; @@ -17,7 +20,7 @@ ISR (TIMER1_COMPA_vect) } else { - seconds = 60; + seconds = SEC; --minutes; } if (minutes == 0 && callback != NULL) @@ -43,5 +46,5 @@ set_timer_callback(uint8_t min, void (*call) (void)) { minutes = min; callback = call; - seconds = 60; + seconds = SEC; }