|
Zephyr Project API
3.2.0
A Scalable Open Source RTOS
|
Variables needed for system clock. More...
#include <zephyr/sys/util.h>#include <zephyr/sys/dlist.h>#include <zephyr/toolchain.h>#include <zephyr/types.h>#include <zephyr/sys/time_units.h>Go to the source code of this file.
Data Structures | |
| struct | k_timeout_t |
| Kernel timeout type. More... | |
Macros | |
| #define | K_TICKS_FOREVER ((k_ticks_t) -1) |
| #define | K_TIMEOUT_EQ(a, b) ((a).ticks == (b).ticks) |
| Compare timeouts for equality. More... | |
| #define | NSEC_PER_USEC 1000U |
| #define | NSEC_PER_MSEC 1000000U |
| #define | USEC_PER_MSEC 1000U |
| #define | MSEC_PER_SEC 1000U |
| #define | USEC_PER_SEC ((USEC_PER_MSEC) * (MSEC_PER_SEC)) |
| #define | NSEC_PER_SEC ((NSEC_PER_USEC) * (USEC_PER_MSEC) * (MSEC_PER_SEC)) |
| #define | SYS_CLOCK_HW_CYCLES_TO_NS_AVG(X, NCYCLES) (uint32_t)(k_cyc_to_ns_floor64(X) / NCYCLES) |
Typedefs | |
| typedef uint32_t | k_ticks_t |
| Tick precision used in timeout APIs. More... | |
Functions | |
| uint32_t | sys_clock_tick_get_32 (void) |
| Return the lower part of the current system tick count. More... | |
| int64_t | sys_clock_tick_get (void) |
| Return the current system tick count. More... | |
| uint64_t | sys_clock_timeout_end_calc (k_timeout_t timeout) |
Variables needed for system clock.
Declare variables used by both system timer device driver and kernel components that use timer functionality.
| #define MSEC_PER_SEC 1000U |
| #define NSEC_PER_MSEC 1000000U |
| #define NSEC_PER_SEC ((NSEC_PER_USEC) * (USEC_PER_MSEC) * (MSEC_PER_SEC)) |
| #define NSEC_PER_USEC 1000U |
| #define SYS_CLOCK_HW_CYCLES_TO_NS_AVG | ( | X, | |
| NCYCLES | |||
| ) | (uint32_t)(k_cyc_to_ns_floor64(X) / NCYCLES) |
| #define USEC_PER_MSEC 1000U |
| #define USEC_PER_SEC ((USEC_PER_MSEC) * (MSEC_PER_SEC)) |
| int64_t sys_clock_tick_get | ( | void | ) |
Return the current system tick count.
| uint32_t sys_clock_tick_get_32 | ( | void | ) |
Return the lower part of the current system tick count.
| uint64_t sys_clock_timeout_end_calc | ( | k_timeout_t | timeout | ) |