Make fast_stopwatch power efficiend by using the new counter32

This commit is contained in:
Alessandro Genova
2025-07-26 22:31:53 -04:00
parent 6fe1b236a4
commit 1b9624d042
2 changed files with 193 additions and 230 deletions
@@ -55,7 +55,10 @@
#include "movement.h"
typedef struct {
bool light_on_button; // determines whether the light button actually triggers the led
rtc_counter_t start_counter; // rtc counter when the stopwatch was started
rtc_counter_t lap_counter; // rtc counter when the stopwatch was lapped
rtc_counter_t stop_counter; // rtc counter when the stopwatch was stopped
uint8_t status; // the status the stopwatch is in (idle, running, stopped)
} fast_stopwatch_state_t;
void fast_stopwatch_face_setup(uint8_t watch_face_index, void ** context_ptr);
@@ -63,12 +66,6 @@ void fast_stopwatch_face_activate(void *context);
bool fast_stopwatch_face_loop(movement_event_t event, void *context);
void fast_stopwatch_face_resign(void *context);
#if __EMSCRIPTEN__
void em_cb_handler(void *userData);
#else
void TC2_Handler(void);
#endif
#define fast_stopwatch_face ((const watch_face_t){ \
fast_stopwatch_face_setup, \
fast_stopwatch_face_activate, \