Flipper Zero Firmware
Loading...
Searching...
No Matches
event_loop_timer_i.h
1#pragma once
2
3#include "event_loop_timer.h"
4
5#include <m-i-list.h>
6
7typedef enum {
8 FuriEventLoopTimerRequestNone,
9 FuriEventLoopTimerRequestStart,
10 FuriEventLoopTimerRequestStop,
11 FuriEventLoopTimerRequestFree,
12} FuriEventLoopTimerRequest;
13
15 FuriEventLoop* owner;
16
18 void* context;
19
20 uint32_t interval;
21 uint32_t start_time;
22 uint32_t next_interval;
23
24 // Interface for the active timer list
25 ILIST_INTERFACE(TimerList, FuriEventLoopTimer);
26
27 // Interface for the timer request queue
28 ILIST_INTERFACE(TimerQueue, FuriEventLoopTimer);
29
30 FuriEventLoopTimerRequest request;
31
32 bool active;
33 bool periodic;
34};
35
36ILIST_DEF(TimerList, FuriEventLoopTimer, M_POD_OPLIST)
37ILIST_DEF(TimerQueue, FuriEventLoopTimer, M_POD_OPLIST)
38
39uint32_t furi_event_loop_get_timer_wait_time(const FuriEventLoop* instance);
40
41void furi_event_loop_process_timer_queue(FuriEventLoop* instance);
42
43bool furi_event_loop_process_expired_timers(FuriEventLoop* instance);
Software timer functionality for FuriEventLoop.
void(* FuriEventLoopTimerCallback)(void *context)
Timer callback type for functions to be called when a timer expires.
Definition event_loop_timer.h:32
Definition event_loop_i.h:79
Definition event_loop_timer_i.h:14