51template <stk::EAccessMode _AccessMode>
Top-level STK include. Provides the Kernel class template and all built-in task-switching strategies.
#define STK_ASSERT(e)
Runtime assertion. Halts execution if the expression e evaluates to false.
Implementation of synchronization primitive: stk::sync::EventFlagsT and stk::sync::EventFlags.
Namespace of STK package.
int64_t Ticks
Ticks value.
static bool SleepUntil(Ticks timestamp)
Put calling process into a sleep state until the specified timestamp.
static Ticks GetTicksFromMs(Time ms, uint32_t resolution)
Convert milliseconds to ticks.
static Ticks GetTicks()
Get number of ticks elapsed since kernel start.
@ KERNEL_TICKLESS
Tickless mode. To use this mode STK_TICKLESS_IDLE must be defined to 1 in stk_config....
@ KERNEL_SYNC
Synchronization support (see Event).
@ KERNEL_STATIC
All tasks are static and can not exit.
EventFlagsT< uint32_t > EventFlags
Default event flags group with a 32-bit flags word (31 usable flags, bit 31 reserved).
Concrete implementation of IKernel.
void Start() override
Start the scheduler. This call does not return until all tasks have exited (KERNEL_DYNAMIC mode) or i...
EAddResult AddTask(ITask *user_task) override
Register task for a soft real-time (SRT) scheduling.
void Initialize(uint32_t resolution_us=PERIODICITY_DEFAULT) override
Initialize kernel.
RAII instance that enters the critical section on construction and exits it on destruction.
Partial implementation of the user task.
static constexpr uint32_t OPT_WAIT_ANY
static bool IsError(uint32_t result)
void Run() override
Entry point of the user task.
static void InitAll(bool init_state)
static void SwitchOnExclusive(Id led)
static stk::Ticks g_Timeline
static const uint32_t FLAGS_ALL[]
static stk::sync::EventFlags g_TaskFlags(FLAGS_ALL[LED_RED])
static stk::sync::EventFlags g_TaskFlags(FLAGS_ALL[LED_RED])
static stk::Ticks g_Timeline