#include "config.h"
#include "scheduler.h"
Go to the source code of this file.
Defines | |
#define | _SCHEDULER_C_ |
_____ I N C L U D E S ____________________________________________________ | |
Functions | |
void | scheduler_init (void) |
_____ D E C L A R A T I O N ______________________________________________ Scheduler initialization | |
void | scheduler_tasks (void) |
Task execution scheduler. | |
void | scheduler (void) |
Init & run the scheduler. | |
void | scheduler_empty_fct (void) |
Do nothing Avoid uncalled segment warning if the empty function is not used. | |
Variables | |
bit | scheduler_tick_flag |
_____ M A C R O S ________________________________________________________ _____ D E F I N I T I O N ________________________________________________ |
Supported devices: ATmega32U4
Definition in file scheduler.c.
#define _SCHEDULER_C_ |
_____ I N C L U D E S ____________________________________________________
Definition at line 49 of file scheduler.c.
void scheduler_init | ( | void | ) |
_____ D E C L A R A T I O N ______________________________________________ Scheduler initialization
_____ D E C L A R A T I O N ______________________________________________
Task_x_init() and Task_x_fct() are defined in config.h
:none |
Definition at line 79 of file scheduler.c.
Referenced by scheduler().
00080 { 00081 #ifdef Scheduler_time_init 00082 Scheduler_time_init(); 00083 #endif 00084 #ifdef TOKEN_MODE 00085 token = TOKEN_FREE; 00086 #endif 00087 #ifdef Scheduler_task_1_init 00088 Scheduler_task_1_init(); 00089 Scheduler_call_next_init(); 00090 #endif 00091 #ifdef Scheduler_task_2_init 00092 Scheduler_task_2_init(); 00093 Scheduler_call_next_init(); 00094 #endif 00095 #ifdef Scheduler_task_3_init 00096 Scheduler_task_3_init(); 00097 Scheduler_call_next_init(); 00098 #endif 00099 #ifdef Scheduler_task_4_init 00100 Scheduler_task_4_init(); 00101 Scheduler_call_next_init(); 00102 #endif 00103 #ifdef Scheduler_task_5_init 00104 Scheduler_task_5_init(); 00105 Scheduler_call_next_init(); 00106 #endif 00107 #ifdef Scheduler_task_6_init 00108 Scheduler_task_6_init(); 00109 Scheduler_call_next_init(); 00110 #endif 00111 #ifdef Scheduler_task_7_init 00112 Scheduler_task_7_init(); 00113 Scheduler_call_next_init(); 00114 #endif 00115 #ifdef Scheduler_task_8_init 00116 Scheduler_task_8_init(); 00117 Scheduler_call_next_init(); 00118 #endif 00119 #ifdef Scheduler_task_9_init 00120 Scheduler_task_9_init(); 00121 Scheduler_call_next_init(); 00122 #endif 00123 #ifdef Scheduler_task_10_init 00124 Scheduler_task_10_init(); 00125 Scheduler_call_next_init(); 00126 #endif 00127 #ifdef Scheduler_task_11_init 00128 Scheduler_task_11_init(); 00129 Scheduler_call_next_init(); 00130 #endif 00131 Scheduler_reset_tick_flag(); 00132 }
void scheduler_tasks | ( | void | ) |
Task execution scheduler.
:none |
Definition at line 140 of file scheduler.c.
Referenced by scheduler().
00141 { 00142 // To avoid uncalled segment warning if the empty function is not used 00143 scheduler_empty_fct(); 00144 00145 for(;;) 00146 { 00147 Scheduler_new_schedule(); 00148 #ifdef Scheduler_task_1 00149 Scheduler_task_1(); 00150 Scheduler_call_next_task(); 00151 #endif 00152 #ifdef Scheduler_task_2 00153 Scheduler_task_2(); 00154 Scheduler_call_next_task(); 00155 #endif 00156 #ifdef Scheduler_task_3 00157 Scheduler_task_3(); 00158 Scheduler_call_next_task(); 00159 #endif 00160 #ifdef Scheduler_task_4 00161 Scheduler_task_4(); 00162 Scheduler_call_next_task(); 00163 #endif 00164 #ifdef Scheduler_task_5 00165 Scheduler_task_5(); 00166 Scheduler_call_next_task(); 00167 #endif 00168 #ifdef Scheduler_task_6 00169 Scheduler_task_6(); 00170 Scheduler_call_next_task(); 00171 #endif 00172 #ifdef Scheduler_task_7 00173 Scheduler_task_7(); 00174 Scheduler_call_next_task(); 00175 #endif 00176 #ifdef Scheduler_task_8 00177 Scheduler_task_8(); 00178 Scheduler_call_next_task(); 00179 #endif 00180 #ifdef Scheduler_task_9 00181 Scheduler_task_9(); 00182 Scheduler_call_next_task(); 00183 #endif 00184 #ifdef Scheduler_task_10 00185 Scheduler_task_10(); 00186 Scheduler_call_next_task(); 00187 #endif 00188 #ifdef Scheduler_task_11 00189 Scheduler_task_11(); 00190 Scheduler_call_next_task(); 00191 #endif 00192 } 00193 }
void scheduler | ( | void | ) |
Init & run the scheduler.
:none |
Definition at line 201 of file scheduler.c.
Referenced by main().
00202 { 00203 scheduler_init(); 00204 scheduler_tasks(); 00205 }
void scheduler_empty_fct | ( | void | ) |
Do nothing Avoid uncalled segment warning if the empty function is not used.
:none |
Definition at line 215 of file scheduler.c.
Referenced by scheduler_tasks().
_____ M A C R O S ________________________________________________________ _____ D E F I N I T I O N ________________________________________________
_____ D E F I N I T I O N ________________________________________________
When SCHEDULER_TYPE != SCHEDULER_FREE, this flag control task calls.
Definition at line 58 of file scheduler.c.