Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
system_timer.h File Reference

Timer driver API. More...

#include <stdbool.h>
#include <zephyr/types.h>
#include <zephyr/spinlock.h>

Go to the source code of this file.

Macros

#define SYS_CLOCK_MAX_WAIT   (UINT32_MAX / 2)

Functions

k_spinlock_key_t sys_clock_lock (void)
 Lock the system clock.
void sys_clock_unlock (k_spinlock_key_t key)
 Unlock the system clock.
void sys_clock_set_timeout (uint32_t ticks, bool idle)
 Set system clock timeout.
void sys_clock_idle_exit (void)
 Timer idle exit notification.
void sys_clock_announce_locked (uint32_t ticks, k_spinlock_key_t key)
 Announce time progress to the kernel.
static void sys_clock_announce (uint32_t ticks)
 Announce time progress to the kernel (legacy wrapper).
uint32_t sys_clock_elapsed (void)
 Ticks elapsed since last sys_clock_announce() call.
void sys_clock_disable (void)
 Disable system timer.
uint32_t sys_clock_cycle_get_32 (void)
 Hardware cycle counter.
uint64_t sys_clock_cycle_get_64 (void)
 64 bit hardware cycle counter

Detailed Description

Timer driver API.

Declare API implemented by system timer driver and used by kernel components.

Macro Definition Documentation

◆ SYS_CLOCK_MAX_WAIT

#define SYS_CLOCK_MAX_WAIT   (UINT32_MAX / 2)