pub unsafe extern "C" fn ztimer_periodic_wakeup(
clock: *mut ztimer_clock_t,
last_wakeup: *mut u32,
period: u32,
)
Expand description
@brief Suspend the calling thread until the time (@p last_wakeup + @p period)
This function can be used to create periodic wakeups.
When the function returns, @p last_wakeup is set to (@p last_wakeup + @p period).
@c last_wakeup should be set to ztimer_now(@p clock) before first call of the function.
If the time (@p last_wakeup + @p period) has already passed, the function sets @p last_wakeup to @p last_wakeup + @p period and returns immediately.
@warning Make sure to call @ref ztimer_acquire(@p clock) before making use of @ref ztimer_periodic_wakeup. After usage @ref ztimer_release(@p clock) should be called.
@param[in] clock ztimer clock to operate on @param[in] last_wakeup base time stamp for the wakeup @param[in] period time in ticks that will be added to @p last_wakeup