4#include "event_loop_link_i.h"
5#include "event_loop_timer_i.h"
6#include "event_loop_tick_i.h"
7#include "event_loop_thread_flag_interface.h"
22 FuriEventLoopObject* object;
27 void* callback_context;
36#define FURI_EVENT_LOOP_TREE_RANK (4)
40 FURI_EVENT_LOOP_TREE_RANK,
46#define M_OPL_FuriEventLoopTree_t() BPTREE_OPLIST(FuriEventLoopTree, M_POD_OPLIST)
48#define FURI_EVENT_LOOP_FLAG_NOTIFY_INDEX (2)
51 FuriEventLoopFlagEvent = (1 << 0),
52 FuriEventLoopFlagStop = (1 << 1),
53 FuriEventLoopFlagTimer = (1 << 2),
54 FuriEventLoopFlagPending = (1 << 3),
55 FuriEventLoopFlagThreadFlag = (1 << 4),
58#define FuriEventLoopFlagAll \
59 (FuriEventLoopFlagEvent | FuriEventLoopFlagStop | FuriEventLoopFlagTimer | \
60 FuriEventLoopFlagPending | FuriEventLoopFlagThreadFlag)
63 FuriEventLoopProcessStatusComplete,
64 FuriEventLoopProcessStatusIncomplete,
65 FuriEventLoopProcessStatusFreeLater,
66} FuriEventLoopProcessStatus;
69 FuriEventLoopStateStopped,
70 FuriEventLoopStateRunning,
85 volatile FuriEventLoopState state;
89 FuriEventLoopTree_t tree;
90 WaitingList_t waiting_list;
93 TimerList_t timer_list;
95 TimerQueue_t timer_queue;
97 PendingQueue_t pending_queue;
102 bool are_thread_flags_subscribed;
104 void* thread_flags_callback_context;
void(* FuriEventLoopPendingCallback)(void *context)
Timer callback type for functions to be called in a deferred manner.
Definition event_loop.h:177
FuriEventLoopEvent
Enumeration of event types, flags and masks.
Definition event_loop.h:35
void(* FuriEventLoopEventCallback)(FuriEventLoopObject *object, void *context)
Callback type for event loop events.
Definition event_loop.h:204
void(* FuriEventLoopThreadFlagsCallback)(void *context)
Callback type for event loop thread flag events.
Definition event_loop.h:210
Definition event_loop_link_i.h:27
Definition event_loop_i.h:80
Definition event_loop_i.h:16
Definition event_loop_i.h:73
Definition event_loop_tick_i.h:5
void * FuriThreadId
Unique thread identifier type (used by the OS kernel).
Definition thread.h:56