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 79 of file scheduler.c.
References Scheduler_call_next_init, Scheduler_task_1_init, and Scheduler_task_2_init.
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.
References Scheduler_call_next_task, scheduler_empty_fct(), Scheduler_new_schedule, Scheduler_task_1, and Scheduler_task_2.
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.
References scheduler_init(), and scheduler_tasks().
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.
_____ 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.