|
PIC24 Support Libraries
|
Go to the source code of this file.
Macros | |
| #define | ESOS_USER_FLAG_0 |
| #define | ESOS_USER_FLAG_1 |
| #define | ESOS_USER_FLAG_2 |
| #define | ESOS_USER_FLAG_3 |
| #define | ESOS_USER_FLAG_4 |
| #define | ESOS_USER_FLAG_5 |
| #define | ESOS_USER_FLAG_6 |
| #define | ESOS_USER_FLAG_7 |
| #define | ESOS_USER_FLAG_8 |
| #define | ESOS_USER_FLAG_9 |
| #define | ESOS_USER_FLAG_A |
| #define | ESOS_USER_FLAG_B |
| #define | ESOS_USER_FLAG_C |
| #define | ESOS_USER_FLAG_D |
| #define | ESOS_USER_FLAG_E |
| #define | ESOS_USER_FLAG_F |
| #define | ESOS_USER_TIMER(timername) |
| #define | esos_GetSystemTick() |
| #define | esos_GetNumberRegisteredTasks() |
| #define | esos_GetFutureSystemTick(deltaT) |
| #define | esos_SetUserFlag(mask) |
| #define | esos_ClearUserFlag(mask) |
| #define | esos_IsUserFlagSet(mask) |
| #define | esos_IsUserFlagClear(mask) |
| #define | esos_GetNumberRunningTimers() |
| #define | esos_IsTimerRunning(hndl) |
Typedefs | |
| typedef int | main_t |
| typedef uint8 | ESOS_TMR_HANDLE |
Functions | |
| void | user_init (void) |
| ESOS_TASK_HANDLE | esos_GetFreeChildTaskStruct () |
| uint32 | esos_GetRandomUint32 () |
| ESOS_TMR_HANDLE | esos_RegisterTimer (void(*pfnTmrFcn)(void), uint32 u32_period) |
| uint8 | esos_UnregisterTimer (ESOS_TMR_HANDLE hnd_timer) |
| ESOS_TMR_HANDLE | esos_GetTimerHandle (void(*pfnTmrFcn)(void)) |
| uint8 | esos_ChangeTimerPeriod (ESOS_TMR_HANDLE hnd_timer, uint32 u32_period) |
Embedded Systems Operating System (ESOS)
Definition in file esos.h.
| #define esos_ClearUserFlag | ( | mask) |
Clears bits in the global user flags provided by ESOS
| mask | An uint16 value composed of the OR-ed user mask flag masks, where each flag in the OR will be cleared |
| #define esos_GetFutureSystemTick | ( | deltaT) |
Returns the system tick value of a future time
| deltaT | the number of ticks in the future you'd like the system tick value for |
| #define esos_GetNumberRegisteredTasks | ( | ) |
Get the current number of user task registered with the ESOS scheduler.
| #define esos_GetNumberRunningTimers | ( | ) |
Get the current number of user software timers registers (running) in the ESOS timer services
Definition at line 391 of file esos.h.
Referenced by esos_GetTimerHandle(), and esos_RegisterTimer().
| #define esos_GetSystemTick | ( | ) |
Get the current value of the ESOS system tick counter In the current implementation of ESOS, a tick equal 1.0ms. Therefore, the value returned by this function is approximately equal to the number of milliseconds since the since was last reset.
| #define esos_IsTimerRunning | ( | hndl) |
Determines if the software timer represented by the handle is currently running
| hndl | The ESOS_TMR_HANDLE of a software timer |
| TRUE | if the timer is currently running |
| FALSE | if the timer is not currently running |
Definition at line 404 of file esos.h.
Referenced by esos_ChangeTimerPeriod(), esos_GetTimerHandle(), esos_RegisterTimer(), and esos_UnregisterTimer().
| #define esos_IsUserFlagClear | ( | mask) |
Queries whether the global user flags provided by ESOS are clear
| mask | An uint16 value composed of the OR-ed user mask flag masks, where each flag in the OR will be checked for being clear |
| TRUE | if at least one of the flags is clear |
| FALSE | if none of the flags are clear |
| #define esos_IsUserFlagSet | ( | mask) |
Queries whether the global user flags provided by ESOS are set
| mask | An uint16 value composed of the OR-ed user mask flag masks, where each flag in the OR will be checked for being set |
| TRUE | if at least one of the flags is set |
| FALSE | if none of the flags are set |
| #define esos_SetUserFlag | ( | mask) |
Sets bits in the global user flags provided by ESOS
| mask | An uint16 value composed of the OR-ed user mask flag masks, where each flag in the OR will be set |
Definition at line 308 of file esos.h.
Referenced by user_init().
| #define ESOS_USER_FLAG_0 |
| #define ESOS_USER_FLAG_1 |
| #define ESOS_USER_FLAG_2 |
| #define ESOS_USER_FLAG_3 |
| #define ESOS_USER_FLAG_4 |
| #define ESOS_USER_FLAG_5 |
| #define ESOS_USER_FLAG_6 |
| #define ESOS_USER_FLAG_7 |
| #define ESOS_USER_FLAG_8 |
| #define ESOS_USER_FLAG_9 |
| #define ESOS_USER_FLAG_A |
| #define ESOS_USER_FLAG_B |
| #define ESOS_USER_FLAG_C |
| #define ESOS_USER_FLAG_D |
| #define ESOS_USER_FLAG_E |
| #define ESOS_USER_FLAG_F |
| #define ESOS_USER_TIMER | ( | timername) |
Declaration of an user-defined timer callback (for ESOS timer services)
This macro is used to declare a user-timer. All timers using ESOS timer services must be declared with this macro.
| timername | The name of the software timer to create. |
| typedef uint8 ESOS_TMR_HANDLE |
Handle to a software timer in the ESOS timer service.
| typedef int main_t |
| uint8 esos_ChangeTimerPeriod | ( | ESOS_TMR_HANDLE | hnd_timer, |
| uint32 | 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 | ( | ) |
| uint32 esos_GetRandomUint32 | ( | void | ) |
Returns a 31-bit pseudo-random number generated by the Park-Miller algorithm.
| 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_TMR_HANDLE esos_RegisterTimer | ( | void(*)(void) | timername, |
| uint32 | 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 |
Definition at line 302 of file esos.c.
Referenced by user_init().
| uint8 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 |
| void user_init | ( | void | ) |
User-provided function to initialize user's hardware configuration register user tasks.
Definition at line 191 of file app_childtask.c.
1.8.4