Bar Logo Dual Active Bridge Development Board (Part-No. )
 
Content
     
Loading...
Searching...
No Matches
os_scheduler.h
1
2//=======================================================================================================
3// @file os_scheduler_1ms.h
4//
5// @brief contains the main scheduler that calls all the tasks that need to be called regularly
6//
7// @note put your application specific tasks that need to be called regularly into main_tasks.c
8// @note call the Init function in your main.c
9// @note call the OS_Scheduler_Run in your main loop or call the RunForever-Function in your main.c
10//
11// @version v1.0
12// @date 2019-08-02
13// @author M52409
14//
15//=======================================================================================================
16
17
18#ifndef _OS_SCHEDULER_H_
19#define _OS_SCHEDULER_H_
20
21
22#ifdef __cplusplus // Provide C++ Compatibility
23 extern "C" {
24#endif
25
26
27//=======================================================================================================
28// @brief Initializes Scheduler
29// @note call this function in your main routine before calling the RunForever function
30//=======================================================================================================
31extern void OS_Scheduler_Init(void);
32
33//=======================================================================================================
34// @brief Scheduler function for calling all the Tasks regularly ( 1ms, 10ms, 100ms, 1s )
35// @note call this function in your main loop in main.c after calling the Init-function
36// if you have nothing else to call in your main loop then you can call the function
37// Main_Scheduler_RunForever() instead.
38// please consider that the timing of the calls are dependent on the duration of the last call
39// the resulting jitter therefore depends on the timing of the calls before
40//=======================================================================================================
41extern void OS_Scheduler_RunOnce(void);
42
43//=======================================================================================================
44// @brief Scheduler function for calling all the Tasks regularly ( 1ms, 10ms, 100ms, 1s )
45// @note call this function as last function in main.c after calling the Init-function
46// please consider that the timing of the calls are dependent on the duration of the last call
47// the resulting jitter therefore depends on the timing of the calls before
48//=======================================================================================================
49extern void OS_Scheduler_RunForever(void);
50
51//=======================================================================================================
52// The following extern Tasks_... functions should be placed in the file main/main_tasks.c
53// call OS_Scheduler_Run() in the main loop or call OS_Scheduler_RunForever() in main.c
54//=======================================================================================================
55extern void Tasks_100us(void);
56extern void Tasks_Realtime_100us(void);
57extern void Tasks_Realtime_1ms(void);
58extern void Tasks_1ms(void);
59extern void Tasks_10ms(void);
60extern void Tasks_100ms(void);
61extern void Tasks_1s(void);
62extern void Tasks_Background(void);
63extern void TMR1_CallBack(void);
64#ifdef __cplusplus // Provide C++ Compatibility
65 }
66#endif
67#endif // _OS_SCHEDULER_H_
void Tasks_10ms(void)
Tasks_10ms gets called every 10ms, put your things in it that need to be called regularly.
Definition main_tasks.c:127
void Tasks_1ms(void)
Tasks_1ms gets called every millisecond, put your things in it that need to be called regularly.
Definition main_tasks.c:115
void Tasks_Realtime_1ms(void)
Tasks_Realtime_1ms gets called directly from the timer interrupt every millisecond.
Definition main_tasks.c:90
void Tasks_100ms(void)
Tasks_100ms gets called every 100 ms, put your things in it that need to be called regularly.
Definition main_tasks.c:141
void Tasks_Background(void)
Tasks_Background gets called all the time when no other of the above tasks are being called.
Definition main_tasks.c:170
void Tasks_1s(void)
Tasks_1s gets called every second, put your things in it that need to be called regularly.
Definition main_tasks.c:155