#include "example.h"
#ifdef _PICO_H
#else
#endif
template <int32_t _Weight, stk::EAccessMode _AccessMode>
{
public:
{}
private:
{
while (true)
{
for (volatile uint32_t i = 0; i < 300000; i++)
{}
{
stk::hw::CriticalSection::ScopedLock __cs;
}
}
}
};
{
kernel.Initialize();
kernel.AddTask(&task_red);
kernel.AddTask(&task_org);
kernel.AddTask(&task_green);
kernel.AddTask(&task_blue);
kernel.Start();
}
static bool led_state[LED_MAX]
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.
Namespace of STK package.
PlatformArmCortexM PlatformDefault
Default platform implementation.
@ KERNEL_TICKLESS
Tickless mode. To use this mode STK_TICKLESS_IDLE must be defined to 1 in stk_config....
@ KERNEL_STATIC
All tasks are static and can not exit.
SwitchStrategySmoothWeightedRoundRobinT< false > SwitchStrategySWRR
Shorthand alias for SwitchStrategySmoothWeightedRoundRobin.
Concrete implementation of IKernel.
Partial implementation of the user task with a compile-time scheduling weight. Use when the kernel is...
void Run()
Entry point of the user task.
static constexpr Id GREEN
static constexpr Id ORANGE
static void InitAll(bool init_state)
LedTaskT< stk::ACCESS_PRIVILEGED > LedTask