ESOS32
ESOSOn32-bitProcessors
|
Central code for Embedded Systems Operating System 32-bit (ESOS32) More...
#include "esos.h"
Go to the source code of this file.
Functions | |
ESOS_TASK_HANDLE | esos_RegisterTask (uint8_t(*taskname)(ESOS_TASK_HANDLE pstTask)) |
uint8_t | esos_UnregisterTask (uint8_t(*taskname)(ESOS_TASK_HANDLE pstTask)) |
ESOS_TASK_HANDLE | esos_GetTaskHandle (uint8_t(*taskname)(ESOS_TASK_HANDLE pstTask)) |
ESOS_TASK_HANDLE | esos_GetTaskHandleFromID (uint16_t u16_TaskID) |
ESOS_TASK_HANDLE | esos_GetFreeChildTaskStruct () |
uint8_t | esos_GetMaxNumberTasks (void) |
uint16_t | __esos_hasTickDurationPassed (uint32_t u32_startTick, uint32_t u32_period) |
void | __esos_tmrSvcsExecute (void) |
ESOS_TMR_HANDLE | esos_RegisterTimer (void(*timername)(void), uint32_t u32_period) |
uint8_t | esos_UnregisterTimer (ESOS_TMR_HANDLE hnd_timer) |
ESOS_TMR_HANDLE | esos_GetTimerHandle (void(*pfnTmrFcn)(void)) |
uint8_t | esos_ChangeTimerPeriod (ESOS_TMR_HANDLE hnd_timer, uint32_t u32_period) |
void | __esosInit (void) |
main_t | main (void) |
Variables | |
struct stTask | __astUserTaskPool [MAX_NUM_USER_TASKS] |
uint8_t | __au8UserTaskStructIndex [MAX_NUM_USER_TASKS] |
struct stTask | __astChildTaskPool [MAX_NUM_CHILD_TASKS] |
uint8_t | __u8UserTasksRegistered |
uint8_t | __u8ChildTasksRegistered |
uint16_t | __u16NumTasksEverCreated |
struct stTimer | __astTmrSvcs [MAX_NUM_TMRS] |
uint8_t | __esos_u8TmrSvcsRegistered |
uint32_t | __esos_u32TmrActiveFlags |
MAILBOX | __astMailbox [MAX_NUM_USER_TASKS] |
uint8_t | __au8_MBData [MAX_NUM_USER_TASKS][MAX_SIZE_TASK_MAILBOX] |
CBUFFER | __astCircularBuffers [MAX_NUM_USER_TASKS] |
uint32_t | __esos_u32UserFlags |
uint32_t | __esos_u32SystemFlags |
Central code for Embedded Systems Operating System 32-bit (ESOS32)
Definition in file esos.c.
uint8_t esos_ChangeTimerPeriod | ( | ESOS_TMR_HANDLE | hnd_timer, |
uint32_t | u32_period | ||
) |
Change a timer period.
hnd_timer | handle to timer whose period is to be changed |
u32_period | new period for timer selected by mask |
FALSE | if timer is not currently running |
TRUE | if timer period was changed |
ESOS_TASK_HANDLE esos_GetFreeChildTaskStruct | ( | ) |
uint8_t esos_GetMaxNumberTasks | ( | void | ) |
ESOS_TASK_HANDLE esos_GetTaskHandle | ( | uint8_t(*)(ESOS_TASK_HANDLE pstTask) | taskname | ) |
Find the (active) task handle for a given task function
taskname | name of task (argument to ESOS_USER_TASK declaration |
NULLPTR | if task is not found among the active tasks |
TaskHandle | the handle to the task function requested |
ESOS_TASK_HANDLE esos_GetTaskHandleFromID | ( | uint16_t | u16_TaskID | ) |
Find the (active) task handle for a given task function
u16_TaskID | name of task (argument to ESOS_USER_TASK declaration) |
NULLPTR | if task is not found among the active tasks |
TaskHandle | the handle to the task function requested |
ESOS_TMR_HANDLE esos_GetTimerHandle | ( | void(*)(void) | pfnTmrFcn | ) |
Finds the timer handle to the provided and ACTIVE timer function
pfnTmrFcn | pointer to timer function (will execute each time timer expires) |
ESOS_TMR_FAILURE | could not find the function in the active timer list |
timerHandle | handle to timer |
ESOS_TASK_HANDLE esos_RegisterTask | ( | uint8_t(*)(ESOS_TASK_HANDLE pstTask) | taskname | ) |
Adds a task to the scheduler. Task will start executing at the next opportunity. (almost immediately)
taskname | name of task (argument to ESOS_USER_TASK declaration |
NULLPTR | if no more tasks can execute at this time (scheduler is full) |
TaskHandle | the handle of the just registered and scheduled task |
ESOS_TMR_HANDLE esos_RegisterTimer | ( | void(*)(void) | timername, |
uint32_t | u32_period | ||
) |
Adds a timer to the ESOS timer service. Timer function will execute at its next opportunity. Timer functions must have void arguments and void returns.
timername | name under which timer was declared in ESOS_USER_TIMER. and contains the code to run when software timer expires |
u32_period | period of timer in system ticks (currently, milliseconds) |
ESOS_TMR_FAILURE | if no more timers can added at this time |
timerhandle | if timer service was registered |
uint8_t esos_UnregisterTask | ( | uint8_t(*)(ESOS_TASK_HANDLE pstTask) | taskname | ) |
Removes the task from the scheduler
taskname | name of task (argument to ESOS_USER_TASK declaration |
TRUE | if task was found in scheduler and removed |
FALSE | otherwise |
uint8_t esos_UnregisterTimer | ( | ESOS_TMR_HANDLE | hnd_timer | ) |
Removes a timer from the ESOS timer service.
hnd_timer | handle to timer to remove |
FALSE | if timer wasn't active in the first place |
TRUE | if timer was stopped and removed |