25 #ifndef EVENT_PERIODIC_CALLBACK_H
26 #define EVENT_PERIODIC_CALLBACK_H
51 return event->event.arg;
67 void (*callback)(
void *),
void *arg)
69 memset(&
event->event, 0,
sizeof(
event->event));
71 event->event.callback = callback;
72 event->event.arg = arg;
Provides a callback-with-argument event type.
void _event_callback_handler(event_t *event)
event callback handler function (used internally)
Provides functionality to trigger periodic events.
static void event_periodic_stop(event_periodic_t *event_periodic)
Stop a periodic timeout event.
static void event_periodic_set_count(event_periodic_t *event_periodic, uint32_t count)
Set the amount of times the periodic event should repeat itself.
static void event_periodic_start(event_periodic_t *event_periodic, uint32_t interval)
Starts a periodic timeout.
void event_periodic_init(event_periodic_t *event_periodic, ztimer_clock_t *clock, event_queue_t *queue, event_t *event)
Initialize a periodic event timeout.
static void event_periodic_callback_init(event_periodic_callback_t *event, ztimer_clock_t *clock, event_queue_t *queue, void(*callback)(void *), void *arg)
Initialize a periodic callback event.
static void event_periodic_callback_stop(event_periodic_callback_t *event)
Stop a periodic callback event.
static void * event_periodic_callback_get_arg(event_periodic_callback_t *event)
Get user context from Periodic Callback Event.
static void event_periodic_callback_start(event_periodic_callback_t *event, uint32_t interval)
Starts a periodic callback event.
static void event_periodic_callback_set_count(event_periodic_callback_t *event, uint32_t count)
Set the amount of times the periodic callback event should repeat itself.
Callback Event structure definition.
Periodic Callback Event structure.
event_callback_t event
callback event portion
event_periodic_t periodic
periodic event portion