|
SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
SuperTinyKernel RTOS via Infineon abstraction-rtos API example program. More...
#include <stdio.h>#include <stdint.h>#include <stdbool.h>#include "cyabs_rtos.h"#include "cyabs_rtos_stk.h"#include "RTE_Components.h"#include "stk_config.h"Go to the source code of this file.
Classes | |
| struct | phases_t |
Macros | |
| #define | STACK_SIZE 1024U /* bytes, per thread (>= CY_RTOS_MIN_STACK_SIZE) */ |
| #define | APP_PRIORITY CY_RTOS_PRIORITY_NORMAL /* all threads share one priority */ |
| #define | FLAG_PHASE_A 0x0001UL /* wake-up bit of thread phaseA */ |
| #define | FLAG_PHASE_B 0x0002UL /* wake-up bit of thread phaseB */ |
| #define | FLAG_PHASE_C 0x0004UL /* wake-up bit of thread phaseC */ |
| #define | FLAG_PHASE_D 0x0008UL /* wake-up bit of thread phaseD */ |
| #define | FLAG_CLOCK 0x0100UL /* wake-up bit of thread clock */ |
| #define | APP_CHECK(call) |
| #define | STACK_DECL(name) |
Functions | |
| static uint8_t stack_app_main[1024U] | __attribute__ ((aligned(16))) |
| void | Switch_On (unsigned char led) |
| void | Switch_Off (unsigned char led) |
| static void | wait_flag (uint32_t flag) |
| void | signal_func (uint32_t next_flag) |
| void | phaseA (cy_thread_arg_t argument) |
| void | phaseB (cy_thread_arg_t argument) |
| void | phaseC (cy_thread_arg_t argument) |
| void | phaseD (cy_thread_arg_t argument) |
| void | clock_thread (cy_thread_arg_t argument) |
| void | app_main (cy_thread_arg_t argument) |
| static void | app_init (void) |
| void | app_run () |
Variables | |
| cy_thread_t | tid_app_main |
| cy_thread_t | tid_phaseA |
| cy_thread_t | tid_phaseB |
| cy_thread_t | tid_phaseC |
| cy_thread_t | tid_phaseD |
| cy_thread_t | tid_clock |
| cy_event_t | g_flags |
| struct phases_t | g_phases |
SuperTinyKernel RTOS via Infineon abstraction-rtos API example program.
Definition in file blinky_c-cyabs_rtos/example.c.
| #define APP_CHECK | ( | call | ) |
Definition at line 50 of file blinky_c-cyabs_rtos/example.c.
Referenced by app_init(), and app_main().
| #define APP_PRIORITY CY_RTOS_PRIORITY_NORMAL /* all threads share one priority */ |
Definition at line 41 of file blinky_c-cyabs_rtos/example.c.
Referenced by app_init(), app_main(), app_main(), and tx_application_define().
| #define FLAG_CLOCK 0x0100UL /* wake-up bit of thread clock */ |
Definition at line 47 of file blinky_c-cyabs_rtos/example.c.
Referenced by clock_thread(), clock_thread(), signal_func(), and signal_func().
| #define FLAG_PHASE_A 0x0001UL /* wake-up bit of thread phaseA */ |
Definition at line 43 of file blinky_c-cyabs_rtos/example.c.
Referenced by app_main(), app_main(), phaseA(), phaseA(), phaseD(), and phaseD().
| #define FLAG_PHASE_B 0x0002UL /* wake-up bit of thread phaseB */ |
Definition at line 44 of file blinky_c-cyabs_rtos/example.c.
| #define FLAG_PHASE_C 0x0004UL /* wake-up bit of thread phaseC */ |
Definition at line 45 of file blinky_c-cyabs_rtos/example.c.
| #define FLAG_PHASE_D 0x0008UL /* wake-up bit of thread phaseD */ |
Definition at line 46 of file blinky_c-cyabs_rtos/example.c.
| #define STACK_DECL | ( | name | ) |
Definition at line 63 of file blinky_c-cyabs_rtos/example.c.
| #define STACK_SIZE 1024U /* bytes, per thread (>= CY_RTOS_MIN_STACK_SIZE) */ |
Definition at line 40 of file blinky_c-cyabs_rtos/example.c.
Referenced by app_init(), app_main(), app_main(), RunExample(), STK_DEFINE_STACK_POOL(), and tx_application_define().
|
static |
References phaseA(), phaseB(), phaseC(), phaseD(), stack_app_main, stack_clock, stack_phaseA, stack_phaseB, stack_phaseC, and stack_phaseD.
|
static |
Definition at line 215 of file blinky_c-cyabs_rtos/example.c.
References APP_CHECK, app_main(), APP_PRIORITY, cy_rtos_event_init(), cy_rtos_thread_create(), g_flags, stack_app_main, STACK_SIZE, and tid_app_main.
Referenced by app_run(), and cy_rtos_stk_kernel_enter().
| void app_main | ( | cy_thread_arg_t | argument | ) |
Definition at line 189 of file blinky_c-cyabs_rtos/example.c.
References APP_CHECK, APP_PRIORITY, clock_thread(), cy_rtos_event_setbits(), CY_RTOS_NEVER_TIMEOUT, cy_rtos_thread_create(), cy_rtos_thread_wait_notification(), FLAG_PHASE_A, g_flags, phaseA(), phaseB(), phaseC(), phaseD(), stack_clock, stack_phaseA, stack_phaseB, stack_phaseC, stack_phaseD, STACK_SIZE, tid_clock, tid_phaseA, tid_phaseB, tid_phaseC, and tid_phaseD.
| void app_run | ( | ) |
Definition at line 224 of file blinky_c-cyabs_rtos/example.c.
References app_init(), cy_rtos_stk_kernel_enter(), and Led_InitAll().
| void clock_thread | ( | cy_thread_arg_t | argument | ) |
Definition at line 178 of file blinky_c-cyabs_rtos/example.c.
References cy_rtos_delay_milliseconds(), FLAG_CLOCK, and wait_flag().
Referenced by app_main(), and app_main().
| void phaseA | ( | cy_thread_arg_t | argument | ) |
Definition at line 118 of file blinky_c-cyabs_rtos/example.c.
References FLAG_PHASE_A, FLAG_PHASE_B, g_phases, signal_func(), Switch_Off(), Switch_On(), and wait_flag().
| void phaseB | ( | cy_thread_arg_t | argument | ) |
Definition at line 133 of file blinky_c-cyabs_rtos/example.c.
References FLAG_PHASE_B, FLAG_PHASE_C, g_phases, signal_func(), Switch_Off(), Switch_On(), and wait_flag().
| void phaseC | ( | cy_thread_arg_t | argument | ) |
Definition at line 148 of file blinky_c-cyabs_rtos/example.c.
References FLAG_PHASE_C, FLAG_PHASE_D, g_phases, signal_func(), Switch_Off(), Switch_On(), and wait_flag().
| void phaseD | ( | cy_thread_arg_t | argument | ) |
Definition at line 163 of file blinky_c-cyabs_rtos/example.c.
References FLAG_PHASE_A, FLAG_PHASE_D, g_phases, signal_func(), Switch_Off(), Switch_On(), and wait_flag().
| void signal_func | ( | uint32_t | next_flag | ) |
Definition at line 106 of file blinky_c-cyabs_rtos/example.c.
References cy_rtos_delay_milliseconds(), cy_rtos_event_setbits(), FLAG_CLOCK, and g_flags.
| void Switch_Off | ( | unsigned char | led | ) |
Definition at line 89 of file blinky_c-cyabs_rtos/example.c.
References Led_Set().
| void Switch_On | ( | unsigned char | led | ) |
Definition at line 81 of file blinky_c-cyabs_rtos/example.c.
References Led_Set().
|
static |
Definition at line 97 of file blinky_c-cyabs_rtos/example.c.
References cy_rtos_event_waitbits(), CY_RTOS_NEVER_TIMEOUT, and g_flags.
Referenced by clock_thread(), clock_thread(), phaseA(), phaseA(), phaseB(), phaseB(), phaseC(), phaseC(), phaseD(), and phaseD().
| cy_event_t g_flags |
Definition at line 60 of file blinky_c-cyabs_rtos/example.c.
Referenced by app_init(), app_main(), app_main(), signal_func(), signal_func(), tx_application_define(), wait_flag(), and wait_flag().
| struct phases_t g_phases |
| cy_thread_t tid_app_main |
Definition at line 53 of file blinky_c-cyabs_rtos/example.c.
Referenced by app_init(), and tx_application_define().
| cy_thread_t tid_clock |
Definition at line 58 of file blinky_c-cyabs_rtos/example.c.
| cy_thread_t tid_phaseA |
Definition at line 54 of file blinky_c-cyabs_rtos/example.c.
| cy_thread_t tid_phaseB |
Definition at line 55 of file blinky_c-cyabs_rtos/example.c.
| cy_thread_t tid_phaseC |
Definition at line 56 of file blinky_c-cyabs_rtos/example.c.
| cy_thread_t tid_phaseD |
Definition at line 57 of file blinky_c-cyabs_rtos/example.c.