25#ifndef EVENT_DEFERRED_CALLBACK_H
26#define EVENT_DEFERRED_CALLBACK_H
71 void (*callback)(
void *),
void *arg)
POSIX.1-2008 compliant version of the assert macro.
Provides a callback-with-argument event type.
void _event_callback_handler(event_t *event)
event callback handler function (used internally)
static void _event_deferred_post(void *arg)
Internal helper function for ztimer callback.
static void event_deferred_callback_cancel(event_deferred_callback_t *event, ztimer_clock_t *clock)
Cancel a callback function if it has not been executed yet.
static void event_deferred_callback_post(event_deferred_callback_t *event, event_queue_t *queue, ztimer_clock_t *clock, uint32_t timeout, void(*callback)(void *), void *arg)
Execute a callback function in the event thread after a timeout.
void event_post(event_queue_t *queue, event_t *event)
Queue an event.
void event_cancel(event_queue_t *queue, event_t *event)
Cancel a queued event.
uint32_t ztimer_set(ztimer_clock_t *clock, ztimer_t *timer, uint32_t val)
Set a timer on a clock.
bool ztimer_remove(ztimer_clock_t *clock, ztimer_t *timer)
Remove a timer from a clock.
Callback Event structure definition.
Deferred Callback Event structure.
ztimer_t timer
ztimer object used for timeout
event_callback_t event
callback event portion
event_queue_t * queue
event queue to post event to