280 #define ZTIMER_CLOCK_NO_REQUIRED_PM_MODE (UINT8_MAX) 
  352 #if MODULE_ZTIMER_ONDEMAND || DOXYGEN 
  377 #if MODULE_ZTIMER_ONDEMAND || DOXYGEN 
  383 #if MODULE_ZTIMER_EXTEND || DOXYGEN 
  389 #if MODULE_PM_LAYERED && !MODULE_ZTIMER_ONDEMAND || DOXYGEN 
  415 #if MODULE_ZTIMER_ONDEMAND || DOXYGEN 
  435 #if MODULE_ZTIMER_ONDEMAND || DOXYGEN 
  532 #define MSG_ZTIMER 0xc83e    
  685 #if MODULE_ZTIMER_ONDEMAND && DEVELHELP 
  689 #if MODULE_ZTIMER_EXTEND 
  697         return clock->
ops->
now(clock);
 
  749     while ((end - 
ztimer_now(clock)) <= duration) {}
 
  791                          uint32_t timeout, 
mutex_t *mutex);
 
  824 #if defined(MODULE_ZTIMER_EXTEND) || defined(DOXYGEN) 
int16_t kernel_pid_t
Unique process identifier.
 
void ztimer_init(void)
Initialize the board-specific default ztimer configuration.
 
bool ztimer_release(ztimer_clock_t *clock)
Release a clock.
 
void(* ztimer_callback_t)(void *arg)
Type of callbacks in timers.
 
void ztimer_periodic_wakeup(ztimer_clock_t *clock, uint32_t *last_wakeup, uint32_t period)
Suspend the calling thread until the time (last_wakeup + period)
 
void ztimer_set_wakeup(ztimer_clock_t *clock, ztimer_t *timer, uint32_t offset, kernel_pid_t pid)
Set a timer that wakes up a thread.
 
ztimer_clock_t *const ZTIMER_SEC
Default ztimer second clock.
 
int ztimer_mbox_get_timeout(ztimer_clock_t *clock, mbox_t *mbox, msg_t *msg, uint32_t timeout)
Get message from mailbox, blocking with a timeout.
 
void ztimer_set_msg(ztimer_clock_t *clock, ztimer_t *timer, uint32_t offset, msg_t *msg, kernel_pid_t target_pid)
Post a message after a delay.
 
ztimer_clock_t *const ZTIMER_MSEC_BASE
Base ztimer for the millisecond clock (ZTIMER_MSEC)
 
uint32_t ztimer_set(ztimer_clock_t *clock, ztimer_t *timer, uint32_t val)
Set a timer on a clock.
 
ztimer_clock_t *const ZTIMER_USEC
Default ztimer microsecond clock.
 
static void ztimer_spin(ztimer_clock_t *clock, uint32_t duration)
Busy-wait specified duration.
 
bool ztimer_acquire(ztimer_clock_t *clock)
Acquire a clock.
 
uint32_t ztimer_now_t
type for ztimer_now() result
 
static ztimer_now_t ztimer_now(ztimer_clock_t *clock)
Get the current time from a clock.
 
int ztimer_msg_receive_timeout(ztimer_clock_t *clock, msg_t *msg, uint32_t timeout)
receive a message (blocking, with timeout)
 
static void ztimer_init_extend(ztimer_clock_t *clock)
Initialize possible ztimer extension intermediate timer.
 
unsigned ztimer_is_set(const ztimer_clock_t *clock, const ztimer_t *timer)
Check if a timer is currently active.
 
int ztimer_rmutex_lock_timeout(ztimer_clock_t *clock, rmutex_t *rmutex, uint32_t timeout)
Try to lock the given rmutex, but give up after timeout.
 
void ztimer_sleep(ztimer_clock_t *clock, uint32_t duration)
Put the calling thread to sleep for the specified number of ticks.
 
bool ztimer_remove(ztimer_clock_t *clock, ztimer_t *timer)
Remove a timer from a clock.
 
void ztimer_handler(ztimer_clock_t *clock)
main ztimer callback handler
 
ztimer_now_t _ztimer_now_extend(ztimer_clock_t *clock)
ztimer_now() for extending timers
 
void ztimer_mutex_unlock(ztimer_clock_t *clock, ztimer_t *timer, uint32_t timeout, mutex_t *mutex)
Unlock mutex after timeout.
 
ztimer_clock_t *const ZTIMER_USEC_BASE
Base ztimer for the microsecond clock (ZTIMER_USEC)
 
void _ztimer_assert_clock_active(ztimer_clock_t *clock)
asserts the given clock to be active
 
void ztimer_set_timeout_flag(ztimer_clock_t *clock, ztimer_t *timer, uint32_t timeout)
Set timeout thread flag after timeout.
 
int ztimer_mutex_lock_timeout(ztimer_clock_t *clock, mutex_t *mutex, uint32_t timeout)
Try to lock the given mutex, but give up after timeout.
 
ztimer_clock_t *const ZTIMER_MSEC
Default ztimer millisecond clock.
 
Mutex for thread synchronization.
 
time_point now()
Returns the current time saved in a time point.
 
Recursive Mutex for thread synchronization.
 
Scheduler API definition.
 
Mailbox struct definition.
 
Describes a message object which can be sent between threads.
 
Minimum information for each timer.
 
uint32_t offset
offset from last timer in list
 
ztimer_base_t * next
next timer in list
 
uint16_t adjust_sleep
will be subtracted on every sleep(), in addition to adjust_set
 
uint32_t lower_last
timer value at last now() call
 
uint32_t max_value
maximum relative timer value
 
ztimer_now_t checkpoint
cumulated time at last now() call
 
ztimer_base_t * last
last timer in queue, for _is_set()
 
uint16_t users
user count of this clock
 
ztimer_base_t list
list of active timers
 
uint16_t adjust_clock_start
will be subtracted on every set(), if the underlying periph is in stopped state
 
uint16_t adjust_set
will be subtracted on every set()
 
const ztimer_ops_t * ops
pointer to methods structure
 
uint8_t block_pm_mode
min.
 
ztimer backend method structure
 
uint32_t(* now)(ztimer_clock_t *clock)
Get the current count of the timer.
 
void(* set)(ztimer_clock_t *clock, uint32_t val)
Set a new timer target.
 
ztimer_callback_t callback
timer callback function pointer
 
void * arg
timer callback argument
 
ztimer_base_t base
clock list entry