1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

event_periodic_callback: add assertion that event has a handler

This commit is contained in:
Benjamin Valentin 2024-08-29 17:20:16 +02:00
parent 10f28b873e
commit 6177380762

View File

@ -25,6 +25,7 @@
#ifndef EVENT_PERIODIC_CALLBACK_H
#define EVENT_PERIODIC_CALLBACK_H
#include <assert.h>
#include "event/callback.h"
#include "event/periodic.h"
@ -94,6 +95,7 @@ static inline void event_periodic_callback_init(event_periodic_callback_t *event
static inline void event_periodic_callback_start(event_periodic_callback_t *event,
uint32_t interval)
{
assert(event->event.callback);
event_periodic_start(&event->periodic, interval);
}