modm API documentation
|
Classes | |
class | modm::rtos::BinarySemaphore |
Binary semaphore More... | |
class | modm::rtos::Mutex |
Mutex More... | |
class | modm::rtos::MutexGuard |
class | modm::rtos::Queue< T > |
Queue More... | |
class | modm::rtos::Scheduler |
class | modm::rtos::Semaphore |
Counting semaphore More... | |
class | modm::rtos::Thread |
Thread More... | |
Macros | |
#define | TIME_LOOP(frequency) |
Create a timed periodic loop. More... | |
#define | MILLISECONDS |
Convert between scheduler ticks and milliseconds. More... | |
lbuild module: modm:processing:rtos
Basic building blocks of an RTOS abstracted as C++ classes and implemented either with FreeRTOS or stdlibc++.
#define MILLISECONDS |
Convert between scheduler ticks and milliseconds.
For example 20 ms in scheduler ticks might be written as:
This should only be used with constant values as the calculation is done using floating point. For constant values the compiler will do the calculation at compile time.
For non constant value use the following formula:
The parentheses are important because otherwise the division might be done first which will lead to wrong results.
#define TIME_LOOP |
Create a timed periodic loop.
Example:
frequency | Frequency in ticks |