39 #define TASK_ID_NONE -1
41 #define E_SCHD_INVTASKID ( E_SCHD + 0x01 )
42 #define E_SCHD_INVTASKID_DESCR "Invalid task ID"
59 #ifndef SCHD_TRACE_LOAD
62 bool _schdRegister(
SchdTaskF task,
bool priority,
int * taskId,
const char * fName);
63 #define schdRegister(TASK, PRIORITY, TASKID) \
64 _schdRegister(TASK, PRIORITY, TASKID, #TASK)
146 #ifdef SCHD_TRACE_LOAD
147 void schdShowTraces();
148 void schdResetTraces();
void schdRunPeriodic(int taskId, int interval)
Schedule a task to run periodically.
void schdRunForever()
Invoked in the main, starts the scheduler.
bool schdRegister(SchdTaskF task, bool priority, int *taskId)
Register a task with the scheduler.
bool schdTasksPending()
Checks if there are any tasks pending.
void(* SchdTaskF)()
Task function typedef.
void schdStop(int taskId)
Stop a scheduled task.
void schdRun(int taskId)
Run a task 'now'.
void schdRunDelay(int taskId, int interval)
Schedule a task to run after a delay.
void schdRunIRQ(int taskId)
Schedule a task from an IRQ.
bool schdAddIdleTask(SchdTaskF idleTask)
Adds an idle task, the task which is executed when there is nothing else to do.
void schdSetEnable(int taskId, bool enabled)
Enable of disable a task.