Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Go to the source code of this file.
Macros | |
#define | SYS_FOREVER_MS (-1) |
System-wide macro to denote "forever" in milliseconds. More... | |
#define | SYS_TIMEOUT_MS(ms) ((ms) == SYS_FOREVER_MS ? K_FOREVER : K_MSEC(ms)) |
System-wide macro to convert milliseconds to kernel timeouts. More... | |
#define | TIME_CONSTEXPR |
Functions | |
static int | sys_clock_hw_cycles_per_sec (void) |
static uint32_t | k_ms_to_cyc_floor32 (uint32_t t) |
Convert milliseconds to hardware cycles. More... | |
static uint64_t | k_ms_to_cyc_floor64 (uint64_t t) |
Convert milliseconds to hardware cycles. More... | |
static uint32_t | k_ms_to_cyc_near32 (uint32_t t) |
Convert milliseconds to hardware cycles. More... | |
static uint64_t | k_ms_to_cyc_near64 (uint64_t t) |
Convert milliseconds to hardware cycles. More... | |
static uint32_t | k_ms_to_cyc_ceil32 (uint32_t t) |
Convert milliseconds to hardware cycles. More... | |
static uint64_t | k_ms_to_cyc_ceil64 (uint64_t t) |
Convert milliseconds to hardware cycles. More... | |
static uint32_t | k_ms_to_ticks_floor32 (uint32_t t) |
Convert milliseconds to ticks. More... | |
static uint64_t | k_ms_to_ticks_floor64 (uint64_t t) |
Convert milliseconds to ticks. More... | |
static uint32_t | k_ms_to_ticks_near32 (uint32_t t) |
Convert milliseconds to ticks. More... | |
static uint64_t | k_ms_to_ticks_near64 (uint64_t t) |
Convert milliseconds to ticks. More... | |
static uint32_t | k_ms_to_ticks_ceil32 (uint32_t t) |
Convert milliseconds to ticks. More... | |
static uint64_t | k_ms_to_ticks_ceil64 (uint64_t t) |
Convert milliseconds to ticks. More... | |
static uint32_t | k_us_to_cyc_floor32 (uint32_t t) |
Convert microseconds to hardware cycles. More... | |
static uint64_t | k_us_to_cyc_floor64 (uint64_t t) |
Convert microseconds to hardware cycles. More... | |
static uint32_t | k_us_to_cyc_near32 (uint32_t t) |
Convert microseconds to hardware cycles. More... | |
static uint64_t | k_us_to_cyc_near64 (uint64_t t) |
Convert microseconds to hardware cycles. More... | |
static uint32_t | k_us_to_cyc_ceil32 (uint32_t t) |
Convert microseconds to hardware cycles. More... | |
static uint64_t | k_us_to_cyc_ceil64 (uint64_t t) |
Convert microseconds to hardware cycles. More... | |
static uint32_t | k_us_to_ticks_floor32 (uint32_t t) |
Convert microseconds to ticks. More... | |
static uint64_t | k_us_to_ticks_floor64 (uint64_t t) |
Convert microseconds to ticks. More... | |
static uint32_t | k_us_to_ticks_near32 (uint32_t t) |
Convert microseconds to ticks. More... | |
static uint64_t | k_us_to_ticks_near64 (uint64_t t) |
Convert microseconds to ticks. More... | |
static uint32_t | k_us_to_ticks_ceil32 (uint32_t t) |
Convert microseconds to ticks. More... | |
static uint64_t | k_us_to_ticks_ceil64 (uint64_t t) |
Convert microseconds to ticks. More... | |
static uint32_t | k_ns_to_cyc_floor32 (uint32_t t) |
Convert nanoseconds to hardware cycles. More... | |
static uint64_t | k_ns_to_cyc_floor64 (uint64_t t) |
Convert nanoseconds to hardware cycles. More... | |
static uint32_t | k_ns_to_cyc_near32 (uint32_t t) |
Convert nanoseconds to hardware cycles. More... | |
static uint64_t | k_ns_to_cyc_near64 (uint64_t t) |
Convert nanoseconds to hardware cycles. More... | |
static uint32_t | k_ns_to_cyc_ceil32 (uint32_t t) |
Convert nanoseconds to hardware cycles. More... | |
static uint64_t | k_ns_to_cyc_ceil64 (uint64_t t) |
Convert nanoseconds to hardware cycles. More... | |
static uint32_t | k_ns_to_ticks_floor32 (uint32_t t) |
Convert nanoseconds to ticks. More... | |
static uint64_t | k_ns_to_ticks_floor64 (uint64_t t) |
Convert nanoseconds to ticks. More... | |
static uint32_t | k_ns_to_ticks_near32 (uint32_t t) |
Convert nanoseconds to ticks. More... | |
static uint64_t | k_ns_to_ticks_near64 (uint64_t t) |
Convert nanoseconds to ticks. More... | |
static uint32_t | k_ns_to_ticks_ceil32 (uint32_t t) |
Convert nanoseconds to ticks. More... | |
static uint64_t | k_ns_to_ticks_ceil64 (uint64_t t) |
Convert nanoseconds to ticks. More... | |
static uint32_t | k_cyc_to_ms_floor32 (uint32_t t) |
Convert hardware cycles to milliseconds. More... | |
static uint64_t | k_cyc_to_ms_floor64 (uint64_t t) |
Convert hardware cycles to milliseconds. More... | |
static uint32_t | k_cyc_to_ms_near32 (uint32_t t) |
Convert hardware cycles to milliseconds. More... | |
static uint64_t | k_cyc_to_ms_near64 (uint64_t t) |
Convert hardware cycles to milliseconds. More... | |
static uint32_t | k_cyc_to_ms_ceil32 (uint32_t t) |
Convert hardware cycles to milliseconds. More... | |
static uint64_t | k_cyc_to_ms_ceil64 (uint64_t t) |
Convert hardware cycles to milliseconds. More... | |
static uint32_t | k_cyc_to_us_floor32 (uint32_t t) |
Convert hardware cycles to microseconds. More... | |
static uint64_t | k_cyc_to_us_floor64 (uint64_t t) |
Convert hardware cycles to microseconds. More... | |
static uint32_t | k_cyc_to_us_near32 (uint32_t t) |
Convert hardware cycles to microseconds. More... | |
static uint64_t | k_cyc_to_us_near64 (uint64_t t) |
Convert hardware cycles to microseconds. More... | |
static uint32_t | k_cyc_to_us_ceil32 (uint32_t t) |
Convert hardware cycles to microseconds. More... | |
static uint64_t | k_cyc_to_us_ceil64 (uint64_t t) |
Convert hardware cycles to microseconds. More... | |
static uint32_t | k_cyc_to_ns_floor32 (uint32_t t) |
Convert hardware cycles to nanoseconds. More... | |
static uint64_t | k_cyc_to_ns_floor64 (uint64_t t) |
Convert hardware cycles to nanoseconds. More... | |
static uint32_t | k_cyc_to_ns_near32 (uint32_t t) |
Convert hardware cycles to nanoseconds. More... | |
static uint64_t | k_cyc_to_ns_near64 (uint64_t t) |
Convert hardware cycles to nanoseconds. More... | |
static uint32_t | k_cyc_to_ns_ceil32 (uint32_t t) |
Convert hardware cycles to nanoseconds. More... | |
static uint64_t | k_cyc_to_ns_ceil64 (uint64_t t) |
Convert hardware cycles to nanoseconds. More... | |
static uint32_t | k_cyc_to_ticks_floor32 (uint32_t t) |
Convert hardware cycles to ticks. More... | |
static uint64_t | k_cyc_to_ticks_floor64 (uint64_t t) |
Convert hardware cycles to ticks. More... | |
static uint32_t | k_cyc_to_ticks_near32 (uint32_t t) |
Convert hardware cycles to ticks. More... | |
static uint64_t | k_cyc_to_ticks_near64 (uint64_t t) |
Convert hardware cycles to ticks. More... | |
static uint32_t | k_cyc_to_ticks_ceil32 (uint32_t t) |
Convert hardware cycles to ticks. More... | |
static uint64_t | k_cyc_to_ticks_ceil64 (uint64_t t) |
Convert hardware cycles to ticks. More... | |
static uint32_t | k_ticks_to_ms_floor32 (uint32_t t) |
Convert ticks to milliseconds. More... | |
static uint64_t | k_ticks_to_ms_floor64 (uint64_t t) |
Convert ticks to milliseconds. More... | |
static uint32_t | k_ticks_to_ms_near32 (uint32_t t) |
Convert ticks to milliseconds. More... | |
static uint64_t | k_ticks_to_ms_near64 (uint64_t t) |
Convert ticks to milliseconds. More... | |
static uint32_t | k_ticks_to_ms_ceil32 (uint32_t t) |
Convert ticks to milliseconds. More... | |
static uint64_t | k_ticks_to_ms_ceil64 (uint64_t t) |
Convert ticks to milliseconds. More... | |
static uint32_t | k_ticks_to_us_floor32 (uint32_t t) |
Convert ticks to microseconds. More... | |
static uint64_t | k_ticks_to_us_floor64 (uint64_t t) |
Convert ticks to microseconds. More... | |
static uint32_t | k_ticks_to_us_near32 (uint32_t t) |
Convert ticks to microseconds. More... | |
static uint64_t | k_ticks_to_us_near64 (uint64_t t) |
Convert ticks to microseconds. More... | |
static uint32_t | k_ticks_to_us_ceil32 (uint32_t t) |
Convert ticks to microseconds. More... | |
static uint64_t | k_ticks_to_us_ceil64 (uint64_t t) |
Convert ticks to microseconds. More... | |
static uint32_t | k_ticks_to_ns_floor32 (uint32_t t) |
Convert ticks to nanoseconds. More... | |
static uint64_t | k_ticks_to_ns_floor64 (uint64_t t) |
Convert ticks to nanoseconds. More... | |
static uint32_t | k_ticks_to_ns_near32 (uint32_t t) |
Convert ticks to nanoseconds. More... | |
static uint64_t | k_ticks_to_ns_near64 (uint64_t t) |
Convert ticks to nanoseconds. More... | |
static uint32_t | k_ticks_to_ns_ceil32 (uint32_t t) |
Convert ticks to nanoseconds. More... | |
static uint64_t | k_ticks_to_ns_ceil64 (uint64_t t) |
Convert ticks to nanoseconds. More... | |
static uint32_t | k_ticks_to_cyc_floor32 (uint32_t t) |
Convert ticks to hardware cycles. More... | |
static uint64_t | k_ticks_to_cyc_floor64 (uint64_t t) |
Convert ticks to hardware cycles. More... | |
static uint32_t | k_ticks_to_cyc_near32 (uint32_t t) |
Convert ticks to hardware cycles. More... | |
static uint64_t | k_ticks_to_cyc_near64 (uint64_t t) |
Convert ticks to hardware cycles. More... | |
static uint32_t | k_ticks_to_cyc_ceil32 (uint32_t t) |
Convert ticks to hardware cycles. More... | |
static uint64_t | k_ticks_to_cyc_ceil64 (uint64_t t) |
Convert ticks to hardware cycles. More... | |
#define SYS_FOREVER_MS (-1) |
System-wide macro to denote "forever" in milliseconds.
Usage of this macro is limited to APIs that want to expose a timeout value that can optionally be unlimited, or "forever". This macro can not be fed into kernel functions or macros directly. Use SYS_TIMEOUT_MS instead.
System-wide macro to convert milliseconds to kernel timeouts.
#define TIME_CONSTEXPR |
Convert hardware cycles to milliseconds.
Converts time values in hardware cycles to milliseconds. Computes result in 32 bit precision. Rounds up to the next highest output unit.
Convert hardware cycles to milliseconds.
Converts time values in hardware cycles to milliseconds. Computes result in 64 bit precision. Rounds up to the next highest output unit.
Convert hardware cycles to milliseconds.
Converts time values in hardware cycles to milliseconds. Computes result in 32 bit precision. Truncates to the next lowest output unit.
Convert hardware cycles to milliseconds.
Converts time values in hardware cycles to milliseconds. Computes result in 64 bit precision. Truncates to the next lowest output unit.
Convert hardware cycles to milliseconds.
Converts time values in hardware cycles to milliseconds. Computes result in 32 bit precision. Rounds to the nearest output unit.
Convert hardware cycles to milliseconds.
Converts time values in hardware cycles to milliseconds. Computes result in 64 bit precision. Rounds to the nearest output unit.
Convert hardware cycles to nanoseconds.
Converts time values in hardware cycles to nanoseconds. Computes result in 32 bit precision. Rounds up to the next highest output unit.
Convert hardware cycles to nanoseconds.
Converts time values in hardware cycles to nanoseconds. Computes result in 64 bit precision. Rounds up to the next highest output unit.
Convert hardware cycles to nanoseconds.
Converts time values in hardware cycles to nanoseconds. Computes result in 32 bit precision. Truncates to the next lowest output unit.
Convert hardware cycles to nanoseconds.
Converts time values in hardware cycles to nanoseconds. Computes result in 64 bit precision. Truncates to the next lowest output unit.
Convert hardware cycles to nanoseconds.
Converts time values in hardware cycles to nanoseconds. Computes result in 32 bit precision. Rounds to the nearest output unit.
Convert hardware cycles to nanoseconds.
Converts time values in hardware cycles to nanoseconds. Computes result in 64 bit precision. Rounds to the nearest output unit.
Convert hardware cycles to ticks.
Converts time values in hardware cycles to ticks. Computes result in 32 bit precision. Rounds up to the next highest output unit.
Convert hardware cycles to ticks.
Converts time values in hardware cycles to ticks. Computes result in 64 bit precision. Rounds up to the next highest output unit.
Convert hardware cycles to ticks.
Converts time values in hardware cycles to ticks. Computes result in 32 bit precision. Truncates to the next lowest output unit.
Convert hardware cycles to ticks.
Converts time values in hardware cycles to ticks. Computes result in 64 bit precision. Truncates to the next lowest output unit.
Convert hardware cycles to ticks.
Converts time values in hardware cycles to ticks. Computes result in 32 bit precision. Rounds to the nearest output unit.
Convert hardware cycles to ticks.
Converts time values in hardware cycles to ticks. Computes result in 64 bit precision. Rounds to the nearest output unit.
Convert hardware cycles to microseconds.
Converts time values in hardware cycles to microseconds. Computes result in 32 bit precision. Rounds up to the next highest output unit.
Convert hardware cycles to microseconds.
Converts time values in hardware cycles to microseconds. Computes result in 64 bit precision. Rounds up to the next highest output unit.
Convert hardware cycles to microseconds.
Converts time values in hardware cycles to microseconds. Computes result in 32 bit precision. Truncates to the next lowest output unit.
Convert hardware cycles to microseconds.
Converts time values in hardware cycles to microseconds. Computes result in 64 bit precision. Truncates to the next lowest output unit.
Convert hardware cycles to microseconds.
Converts time values in hardware cycles to microseconds. Computes result in 32 bit precision. Rounds to the nearest output unit.
Convert hardware cycles to microseconds.
Converts time values in hardware cycles to microseconds. Computes result in 64 bit precision. Rounds to the nearest output unit.
Convert milliseconds to hardware cycles.
Converts time values in milliseconds to hardware cycles. Computes result in 32 bit precision. Rounds up to the next highest output unit.
Convert milliseconds to hardware cycles.
Converts time values in milliseconds to hardware cycles. Computes result in 64 bit precision. Rounds up to the next highest output unit.
Convert milliseconds to hardware cycles.
Converts time values in milliseconds to hardware cycles. Computes result in 32 bit precision. Truncates to the next lowest output unit.
Convert milliseconds to hardware cycles.
Converts time values in milliseconds to hardware cycles. Computes result in 64 bit precision. Truncates to the next lowest output unit.
Convert milliseconds to hardware cycles.
Converts time values in milliseconds to hardware cycles. Computes result in 32 bit precision. Rounds to the nearest output unit.
Convert milliseconds to hardware cycles.
Converts time values in milliseconds to hardware cycles. Computes result in 64 bit precision. Rounds to the nearest output unit.
Convert milliseconds to ticks.
Converts time values in milliseconds to ticks. Computes result in 32 bit precision. Rounds up to the next highest output unit.
Convert milliseconds to ticks.
Converts time values in milliseconds to ticks. Computes result in 64 bit precision. Rounds up to the next highest output unit.
Convert milliseconds to ticks.
Converts time values in milliseconds to ticks. Computes result in 32 bit precision. Truncates to the next lowest output unit.
Convert milliseconds to ticks.
Converts time values in milliseconds to ticks. Computes result in 64 bit precision. Truncates to the next lowest output unit.
Convert milliseconds to ticks.
Converts time values in milliseconds to ticks. Computes result in 32 bit precision. Rounds to the nearest output unit.
Convert milliseconds to ticks.
Converts time values in milliseconds to ticks. Computes result in 64 bit precision. Rounds to the nearest output unit.
Convert nanoseconds to hardware cycles.
Converts time values in nanoseconds to hardware cycles. Computes result in 32 bit precision. Rounds up to the next highest output unit.
Convert nanoseconds to hardware cycles.
Converts time values in nanoseconds to hardware cycles. Computes result in 64 bit precision. Rounds up to the next highest output unit.
Convert nanoseconds to hardware cycles.
Converts time values in nanoseconds to hardware cycles. Computes result in 32 bit precision. Truncates to the next lowest output unit.
Convert nanoseconds to hardware cycles.
Converts time values in nanoseconds to hardware cycles. Computes result in 64 bit precision. Truncates to the next lowest output unit.
Convert nanoseconds to hardware cycles.
Converts time values in nanoseconds to hardware cycles. Computes result in 32 bit precision. Rounds to the nearest output unit.
Convert nanoseconds to hardware cycles.
Converts time values in nanoseconds to hardware cycles. Computes result in 64 bit precision. Rounds to the nearest output unit.
Convert nanoseconds to ticks.
Converts time values in nanoseconds to ticks. Computes result in 32 bit precision. Rounds up to the next highest output unit.
Convert nanoseconds to ticks.
Converts time values in nanoseconds to ticks. Computes result in 64 bit precision. Rounds up to the next highest output unit.
Convert nanoseconds to ticks.
Converts time values in nanoseconds to ticks. Computes result in 32 bit precision. Truncates to the next lowest output unit.
Convert nanoseconds to ticks.
Converts time values in nanoseconds to ticks. Computes result in 64 bit precision. Truncates to the next lowest output unit.
Convert nanoseconds to ticks.
Converts time values in nanoseconds to ticks. Computes result in 32 bit precision. Rounds to the nearest output unit.
Convert nanoseconds to ticks.
Converts time values in nanoseconds to ticks. Computes result in 64 bit precision. Rounds to the nearest output unit.
Convert ticks to hardware cycles.
Converts time values in ticks to hardware cycles. Computes result in 32 bit precision. Rounds up to the next highest output unit.
Convert ticks to hardware cycles.
Converts time values in ticks to hardware cycles. Computes result in 64 bit precision. Rounds up to the next highest output unit.
Convert ticks to hardware cycles.
Converts time values in ticks to hardware cycles. Computes result in 32 bit precision. Truncates to the next lowest output unit.
Convert ticks to hardware cycles.
Converts time values in ticks to hardware cycles. Computes result in 64 bit precision. Truncates to the next lowest output unit.
Convert ticks to hardware cycles.
Converts time values in ticks to hardware cycles. Computes result in 32 bit precision. Rounds to the nearest output unit.
Convert ticks to hardware cycles.
Converts time values in ticks to hardware cycles. Computes result in 64 bit precision. Rounds to the nearest output unit.
Convert ticks to milliseconds.
Converts time values in ticks to milliseconds. Computes result in 32 bit precision. Rounds up to the next highest output unit.
Convert ticks to milliseconds.
Converts time values in ticks to milliseconds. Computes result in 64 bit precision. Rounds up to the next highest output unit.
Convert ticks to milliseconds.
Converts time values in ticks to milliseconds. Computes result in 32 bit precision. Truncates to the next lowest output unit.
Convert ticks to milliseconds.
Converts time values in ticks to milliseconds. Computes result in 64 bit precision. Truncates to the next lowest output unit.
Convert ticks to milliseconds.
Converts time values in ticks to milliseconds. Computes result in 32 bit precision. Rounds to the nearest output unit.
Convert ticks to milliseconds.
Converts time values in ticks to milliseconds. Computes result in 64 bit precision. Rounds to the nearest output unit.
Convert ticks to nanoseconds.
Converts time values in ticks to nanoseconds. Computes result in 32 bit precision. Rounds up to the next highest output unit.
Convert ticks to nanoseconds.
Converts time values in ticks to nanoseconds. Computes result in 64 bit precision. Rounds up to the next highest output unit.
Convert ticks to nanoseconds.
Converts time values in ticks to nanoseconds. Computes result in 32 bit precision. Truncates to the next lowest output unit.
Convert ticks to nanoseconds.
Converts time values in ticks to nanoseconds. Computes result in 64 bit precision. Truncates to the next lowest output unit.
Convert ticks to nanoseconds.
Converts time values in ticks to nanoseconds. Computes result in 32 bit precision. Rounds to the nearest output unit.
Convert ticks to nanoseconds.
Converts time values in ticks to nanoseconds. Computes result in 64 bit precision. Rounds to the nearest output unit.
Convert ticks to microseconds.
Converts time values in ticks to microseconds. Computes result in 32 bit precision. Rounds up to the next highest output unit.
Convert ticks to microseconds.
Converts time values in ticks to microseconds. Computes result in 64 bit precision. Rounds up to the next highest output unit.
Convert ticks to microseconds.
Converts time values in ticks to microseconds. Computes result in 32 bit precision. Truncates to the next lowest output unit.
Convert ticks to microseconds.
Converts time values in ticks to microseconds. Computes result in 64 bit precision. Truncates to the next lowest output unit.
Convert ticks to microseconds.
Converts time values in ticks to microseconds. Computes result in 32 bit precision. Rounds to the nearest output unit.
Convert ticks to microseconds.
Converts time values in ticks to microseconds. Computes result in 64 bit precision. Rounds to the nearest output unit.
Convert microseconds to hardware cycles.
Converts time values in microseconds to hardware cycles. Computes result in 32 bit precision. Rounds up to the next highest output unit.
Convert microseconds to hardware cycles.
Converts time values in microseconds to hardware cycles. Computes result in 64 bit precision. Rounds up to the next highest output unit.
Convert microseconds to hardware cycles.
Converts time values in microseconds to hardware cycles. Computes result in 32 bit precision. Truncates to the next lowest output unit.
Convert microseconds to hardware cycles.
Converts time values in microseconds to hardware cycles. Computes result in 64 bit precision. Truncates to the next lowest output unit.
Convert microseconds to hardware cycles.
Converts time values in microseconds to hardware cycles. Computes result in 32 bit precision. Rounds to the nearest output unit.
Convert microseconds to hardware cycles.
Converts time values in microseconds to hardware cycles. Computes result in 64 bit precision. Rounds to the nearest output unit.
Convert microseconds to ticks.
Converts time values in microseconds to ticks. Computes result in 32 bit precision. Rounds up to the next highest output unit.
Convert microseconds to ticks.
Converts time values in microseconds to ticks. Computes result in 64 bit precision. Rounds up to the next highest output unit.
Convert microseconds to ticks.
Converts time values in microseconds to ticks. Computes result in 32 bit precision. Truncates to the next lowest output unit.
Convert microseconds to ticks.
Converts time values in microseconds to ticks. Computes result in 64 bit precision. Truncates to the next lowest output unit.
Convert microseconds to ticks.
Converts time values in microseconds to ticks. Computes result in 32 bit precision. Rounds to the nearest output unit.
Convert microseconds to ticks.
Converts time values in microseconds to ticks. Computes result in 64 bit precision. Rounds to the nearest output unit.
|
inlinestatic |