48 #pragma GCC optimize ("O2") 54 #define MAX_TASK_CNT 8 55 #define PTR_NON_STATIC_METHOD(instance, method) [instance](){instance.method();} 62 typedef void (*
Task)(void);
108 bool Tasks_Add(
Task func, int16_t period, int16_t delay = 0);
void(* Task)(void)
Example prototype for a function than can be executed as a task.
void Tasks_Init(void)
Initialize timer and reset the tasks scheduler at first call.
bool Tasks_SetState(Task func, bool state)
Enable or disable the execution of a task.
bool Tasks_Add(Task func, int16_t period, int16_t delay=0)
Add a task to the task scheduler.
bool Tasks_Start_Task(Task func)
Activate a task in the scheduler.
bool Tasks_Delay(Task func, int16_t delay)
Delay execution of a task.
bool Tasks_Remove(Task func)
Remove a task from the task scheduler.
void Tasks_Pause(void)
Pause the task scheduler.
void Tasks_Clear(void)
Reset the tasks schedulder.
bool Tasks_Pause_Task(Task func)
Deactivate a task in the scheduler.
void Tasks_Start(void)
Start the task scheduler.