39 #define SYS_TIMER_CTX_SIZE 32 #define SYS_TIMER_CTX_SIZE
Size of the timer context buffer.
bool sys_timer_valid(sys_timer_t *timer)
Checks if a timer is valid, configured and running.
bool sys_timer_finalize(sys_timer_t *timer)
Cancels and finalizes a timer.
struct sys_timer_t sys_timer_t
Timer context structure.
sys_timer_t sys_timer_init(uint32_t interval_ms, void *userdata, void(*callback)(sys_timer_t *))
Initializes a new timer context.
void * ptr
Pointer to external timer context (platform-specific)
uint32_t interval
Timer interval in milliseconds.
void * userdata
User-defined data passed to callback.
void(* callback)(struct sys_timer_t *)
Function called when timer fires.
bool sys_timer_start(sys_timer_t *timer)
Starts a timer.
uint8_t ctx[SYS_TIMER_CTX_SIZE]
Internal context buffer for timer state.