Task scheduler library  1.0
Arduino library for simply executing tasks in parallel
Task_scheduler.h
Go to the documentation of this file.
1 
32 #ifndef TASK_SCHEDULER_H
33 #define TASK_SCHEDULER_H
34 
35 
36 #include <Arduino.h>
37 
38 
39 #pragma GCC optimize ("O2")
40 
41 
42 #define MAX_TASK_CNT 5
43 
44 typedef void (*Task)(void);
45 
46 
47 
55 void Scheduler_Init(void);
56 
57 
58 
78 bool Scheduler_Task_Add(Task func, int16_t period, int16_t delay = 0);
79 
80 
81 
92 bool Scheduler_Task_Remove(Task func);
93 
94 
95 
113 bool Scheduler_Task_Delay(Task func, int16_t delay);
114 
115 
116 
127 bool Scheduler_Task_Start(Task func);
128 
129 
130 
141 bool Scheduler_Task_Pause(Task func);
142 
143 
144 
152 void Scheduler_Start(void);
153 
154 
155 
163 void Scheduler_Pause(void);
164 
165 #endif // TASK_SCHEDULER_H
void Scheduler_Pause(void)
Pause the task scheduler.
bool Scheduler_Task_Delay(Task func, int16_t delay)
Delay execution of a task.
void Scheduler_Init(void)
Initialize and reset the tasks library.
bool Scheduler_Task_Pause(Task func)
Deactivate a task in the scheduler.
void Scheduler_Start(void)
Start the task scheduler.
bool Scheduler_Task_Add(Task func, int16_t period, int16_t delay=0)
Add a task to the task scheduler.
void(* Task)(void)
Example prototype for a function than can be executed as a task.
bool Scheduler_Task_Remove(Task func)
Remove a task from the task scheduler.
bool Scheduler_Task_Start(Task func)
Activate a task in the scheduler.