Functions in the Kernel namespace control RTOS kernel information. More...
Data Structures | |
struct | Clock |
A C++11 chrono TrivialClock for the kernel millisecond tick count. More... | |
Functions | |
uint64_t | get_ms_count () |
Read the current RTOS kernel millisecond tick count. More... | |
void | attach_idle_hook (void(*fptr)(void)) |
Attach a function to be called by the RTOS idle task. More... | |
void | attach_thread_terminate_hook (void(*fptr)(osThreadId_t id)) |
Attach a function to be called when a thread terminates. More... | |
Variables | |
constexpr Clock::duration_u32 | wait_for_u32_max {osWaitForever - 1} |
Maximum duration for Kernel::Clock::duration_u32-based APIs. More... | |
constexpr Clock::duration_u32 | wait_for_u32_forever {osWaitForever} |
Magic "wait forever" constant for Kernel::Clock::duration_u32-based APIs. More... | |
Functions in the Kernel namespace control RTOS kernel information.
void rtos::Kernel::attach_idle_hook | ( | void(*)(void) | fptr | ) |
Attach a function to be called by the RTOS idle task.
fptr | pointer to the function to be called |
void rtos::Kernel::attach_thread_terminate_hook | ( | void(*)(osThreadId_t id) | fptr | ) |
Attach a function to be called when a thread terminates.
fptr | pointer to the function to be called |
uint64_t rtos::Kernel::get_ms_count | ( | ) |
Read the current RTOS kernel millisecond tick count.
The tick count corresponds to the tick count the RTOS uses for timing purposes. It increments monotonically from 0 at boot, so it effectively never wraps. If the underlying RTOS only provides a 32-bit tick count, this method expands it to 64 bits.
Kernel::Clock::now()
to get a chrono time_point instead of an integer millisecond count. constexpr Clock::duration_u32 wait_for_u32_forever {osWaitForever} |
constexpr Clock::duration_u32 wait_for_u32_max {osWaitForever - 1} |
Maximum duration for Kernel::Clock::duration_u32-based APIs.