Go to the source code of this file.
Defines | |
#define | Wait_semaphore(a) while(!(a)) (a) = FALSE |
_____ I N C L U D E S ____________________________________________________ | |
#define | TASK_DUMMY 0x00 |
_____ M A C R O S ________________________________________________________ Definition of Task ID. | |
#define | TASK_0 0x01 |
#define | TASK_1 0x02 |
#define | TASK_2 0x04 |
#define | TASK_3 0x08 |
#define | TASK_4 0x10 |
#define | TASK_5 0x20 |
#define | TASK_6 0x40 |
#define | TASK_7 0x80 |
#define | ALL_TASK (TASK_0|TASK_1|TASK_2|TASK_3|TASK_4|TASK_5|TASK_6|TASK_7) |
#define | SCHEDULER_CUSTOM 0 |
End Task ID. | |
#define | SCHEDULER_TIMED 1 |
#define | SCHEDULER_TASK 2 |
#define | SCHEDULER_FREE 3 |
#define | Scheduler_call_next_task() |
#define | Scheduler_new_schedule() |
#define | Scheduler_call_next_init() |
Functions | |
void | scheduler_init (void) |
_____ D E C L A R A T I O N ______________________________________________ | |
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 |
_____ D E F I N I T I O N ________________________________________________ |
Definition in file scheduler.h.
#define Wait_semaphore | ( | a | ) | while(!(a)) (a) = FALSE |
_____ I N C L U D E S ____________________________________________________
Definition at line 57 of file scheduler.h.
#define TASK_DUMMY 0x00 |
_____ M A C R O S ________________________________________________________ Definition of Task ID.
This ID is used to properly send the event to a specific task. Mind, it will be possible to send an event to many task by TASK_1 | TASK_0. The name of the define can be changed by another define. That customization should be done in the file mail_evt.h
Definition at line 66 of file scheduler.h.
#define TASK_0 0x01 |
Definition at line 67 of file scheduler.h.
#define TASK_1 0x02 |
Definition at line 68 of file scheduler.h.
#define TASK_2 0x04 |
Definition at line 69 of file scheduler.h.
#define TASK_3 0x08 |
Definition at line 70 of file scheduler.h.
#define TASK_4 0x10 |
Definition at line 71 of file scheduler.h.
#define TASK_5 0x20 |
Definition at line 72 of file scheduler.h.
#define TASK_6 0x40 |
Definition at line 73 of file scheduler.h.
#define TASK_7 0x80 |
Definition at line 74 of file scheduler.h.
#define ALL_TASK (TASK_0|TASK_1|TASK_2|TASK_3|TASK_4|TASK_5|TASK_6|TASK_7) |
Definition at line 77 of file scheduler.h.
#define SCHEDULER_CUSTOM 0 |
#define SCHEDULER_TIMED 1 |
Definition at line 82 of file scheduler.h.
#define SCHEDULER_TASK 2 |
Definition at line 83 of file scheduler.h.
#define SCHEDULER_FREE 3 |
Definition at line 84 of file scheduler.h.
#define Scheduler_call_next_task | ( | ) |
#define Scheduler_new_schedule | ( | ) |
#define Scheduler_call_next_init | ( | ) |
void scheduler_init | ( | void | ) |
_____ D E C L A R A T I O N ______________________________________________
_____ 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 80 of file scheduler.c.
References Scheduler_call_next_init, Scheduler_task_1_init, and Scheduler_task_2_init.
00081 { 00082 #ifdef Scheduler_time_init 00083 Scheduler_time_init(); 00084 #endif 00085 #ifdef TOKEN_MODE 00086 token = TOKEN_FREE; 00087 #endif 00088 #ifdef Scheduler_task_1_init 00089 Scheduler_task_1_init(); 00090 Scheduler_call_next_init(); 00091 #endif 00092 #ifdef Scheduler_task_2_init 00093 Scheduler_task_2_init(); 00094 Scheduler_call_next_init(); 00095 #endif 00096 #ifdef Scheduler_task_3_init 00097 Scheduler_task_3_init(); 00098 Scheduler_call_next_init(); 00099 #endif 00100 #ifdef Scheduler_task_4_init 00101 Scheduler_task_4_init(); 00102 Scheduler_call_next_init(); 00103 #endif 00104 #ifdef Scheduler_task_5_init 00105 Scheduler_task_5_init(); 00106 Scheduler_call_next_init(); 00107 #endif 00108 #ifdef Scheduler_task_6_init 00109 Scheduler_task_6_init(); 00110 Scheduler_call_next_init(); 00111 #endif 00112 #ifdef Scheduler_task_7_init 00113 Scheduler_task_7_init(); 00114 Scheduler_call_next_init(); 00115 #endif 00116 #ifdef Scheduler_task_8_init 00117 Scheduler_task_8_init(); 00118 Scheduler_call_next_init(); 00119 #endif 00120 #ifdef Scheduler_task_9_init 00121 Scheduler_task_9_init(); 00122 Scheduler_call_next_init(); 00123 #endif 00124 #ifdef Scheduler_task_10_init 00125 Scheduler_task_10_init(); 00126 Scheduler_call_next_init(); 00127 #endif 00128 #ifdef Scheduler_task_11_init 00129 Scheduler_task_11_init(); 00130 Scheduler_call_next_init(); 00131 #endif 00132 Scheduler_reset_tick_flag(); 00133 }
void scheduler_tasks | ( | void | ) |
Task execution scheduler.
:none |
Definition at line 141 of file scheduler.c.
References Scheduler_call_next_task, scheduler_empty_fct(), Scheduler_new_schedule, Scheduler_task_1, and Scheduler_task_2.
00142 { 00143 // To avoid uncalled segment warning if the empty function is not used 00144 scheduler_empty_fct(); 00145 00146 for(;;) 00147 { 00148 Scheduler_new_schedule(); 00149 #ifdef Scheduler_task_1 00150 Scheduler_task_1(); 00151 Scheduler_call_next_task(); 00152 #endif 00153 #ifdef Scheduler_task_2 00154 Scheduler_task_2(); 00155 Scheduler_call_next_task(); 00156 #endif 00157 #ifdef Scheduler_task_3 00158 Scheduler_task_3(); 00159 Scheduler_call_next_task(); 00160 #endif 00161 #ifdef Scheduler_task_4 00162 Scheduler_task_4(); 00163 Scheduler_call_next_task(); 00164 #endif 00165 #ifdef Scheduler_task_5 00166 Scheduler_task_5(); 00167 Scheduler_call_next_task(); 00168 #endif 00169 #ifdef Scheduler_task_6 00170 Scheduler_task_6(); 00171 Scheduler_call_next_task(); 00172 #endif 00173 #ifdef Scheduler_task_7 00174 Scheduler_task_7(); 00175 Scheduler_call_next_task(); 00176 #endif 00177 #ifdef Scheduler_task_8 00178 Scheduler_task_8(); 00179 Scheduler_call_next_task(); 00180 #endif 00181 #ifdef Scheduler_task_9 00182 Scheduler_task_9(); 00183 Scheduler_call_next_task(); 00184 #endif 00185 #ifdef Scheduler_task_10 00186 Scheduler_task_10(); 00187 Scheduler_call_next_task(); 00188 #endif 00189 #ifdef Scheduler_task_11 00190 Scheduler_task_11(); 00191 Scheduler_call_next_task(); 00192 #endif 00193 } 00194 }
void scheduler | ( | void | ) |
Init & run the scheduler.
:none |
Definition at line 202 of file scheduler.c.
References scheduler_init(), and scheduler_tasks().
00203 { 00204 scheduler_init(); 00205 scheduler_tasks(); 00206 }
void scheduler_empty_fct | ( | void | ) |
Do nothing Avoid uncalled segment warning if the empty function is not used.
:none |
Definition at line 216 of file scheduler.c.
_____ 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 59 of file scheduler.c.