Add Kernel::get_ms_count
Give C++ access to the RTOS's absolute timebase, reducing the need to run private Timers and similar. Allows wait_until functionality, and makes it easier to avoid time drift. Place it in a new header and namespace in case we want more kernel functions in future. Try to cover over the breaking API change potentially upcoming in CMSIS-RTOS 2.1.1, when it reduces the tick count from 64-bit to 32-bit. (See https://github.com/ARM-software/CMSIS_5/issues/277) Explicitly state that ticks are milliseconds in mbed OS, despite CMSIS RTOS 2 permitting different tick rates. See also https://github.com/ARMmbed/mbed-os/pull/3648 (wait_until for condition variables) and https://github.com/ARMmbed/mbed-os/issues/5378 (EventQueue should use RTOS tick count). |
---|
|
rtos/Kernel.cpp 0 → 100644 |
---|
rtos/Kernel.h 0 → 100644 |
---|
rtos/rtos.h |
---|