|
SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
Blinky (C API): four LED tasks pass a baton to each other with EventFlags. More...
Go to the source code of this file.
Classes | |
| struct | TaskArg |
Enumerations | |
| enum | { STACK_SIZE = 256 } |
Functions | |
| STK_DEFINE_STACK_POOL (g_Stack, STK_C_KERNEL_MAX_TASKS, STACK_SIZE) | |
| void | TaskFunc (void *arg) |
| void | RunExample () |
Variables | |
| static const uint32_t | FLAGS_ALL [] |
| static stk_ef_mem_t | g_TaskFlagsMem |
| static stk_ef_t * | g_TaskFlags |
| static TaskArg | g_TaskArgs [LED_MAX] |
Blinky (C API): four LED tasks pass a baton to each other with EventFlags.
Definition in file blinky_c/example.c.
| anonymous enum |
| void RunExample | ( | void | ) |
Definition at line 80 of file blinky_c/example.c.
References FLAGS_ALL, g_TaskArgs, g_TaskFlags, g_TaskFlagsMem, LED_BLUE, LED_GREEN, Led_InitAll(), LED_MAX, LED_ORANGE, LED_RED, STACK_SIZE, STK_C_ASSERT, stk_ef_create(), STK_GET_STACK_FROM_POOL, stk_kernel_add_task(), stk_kernel_create(), stk_kernel_init(), stk_kernel_start(), STK_PERIODICITY_DEFAULT, stk_task_create_privileged(), and TaskFunc().
| STK_DEFINE_STACK_POOL | ( | g_Stack | , |
| STK_C_KERNEL_MAX_TASKS | , | ||
| STACK_SIZE | ) |
References STACK_SIZE, and STK_C_KERNEL_MAX_TASKS.
| void TaskFunc | ( | void * | arg | ) |
Definition at line 54 of file blinky_c/example.c.
References g_TaskFlags, Led_SwitchOnExclusive(), TaskArg::my_flag, TaskArg::next_flag, stk_critical_section_enter(), stk_critical_section_exit(), stk_ef_is_error(), STK_EF_OPT_WAIT_ANY, stk_ef_set(), stk_ef_wait(), stk_sleep_ms(), STK_WAIT_INFINITE, and TaskArg::task_id.
Referenced by RunExample().
|
static |
Definition at line 31 of file blinky_c/example.c.
Definition at line 52 of file blinky_c/example.c.
Referenced by RunExample().
|
static |
Definition at line 40 of file blinky_c/example.c.
|
static |
Definition at line 39 of file blinky_c/example.c.
Referenced by RunExample().