Replace Beep/WAV list screen with a timer; pick duration via presets or Set numpad (1-99 min), and keep selectable alarm sounds. Co-authored-by: Cursor <cursoragent@cursor.com>
26 lines
508 B
C
26 lines
508 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
enum PomoState : uint8_t {
|
|
POMO_IDLE = 0,
|
|
POMO_RUNNING = 1,
|
|
POMO_PAUSED = 2,
|
|
POMO_DONE = 3,
|
|
};
|
|
|
|
void pomo_init();
|
|
void pomo_tick();
|
|
|
|
PomoState pomo_state();
|
|
uint32_t pomo_remaining_sec();
|
|
uint16_t pomo_duration_minutes(); // last configured length
|
|
|
|
void pomo_set_minutes(uint16_t minutes); // 1..99; idle/paused/done only
|
|
void pomo_start_pause();
|
|
void pomo_reset();
|
|
void pomo_adjust_minutes(int8_t delta);
|
|
|
|
const char *pomo_state_name();
|
|
bool pomo_consume_alarm();
|