1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

event_periodic_callback: add getter for user context

This commit is contained in:
Benjamin Valentin 2022-09-27 13:15:26 +02:00
parent 2039a10e71
commit e20b966109

View File

@ -40,6 +40,17 @@ typedef struct {
event_callback_t event; /**< callback event portion */
} event_periodic_callback_t;
/**
* @brief Get user context from Periodic Callback Event
*
* @param[in] event event_periodic_callback object to initialize
* @return User supplied argument to the event
*/
static inline void *event_periodic_callback_get_arg(event_periodic_callback_t *event)
{
return event->event.arg;
}
/**
* @brief Initialize a periodic callback event
*