1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| #ifndef OS_TASK_H
| #define OS_TASK_H
| #include <stdio.h>
| #ifdef __cplusplus
| extern "C"
| {
| #endif
|
| typedef void (*TASK_FUNC)(void *);
| typedef void (*GETTICK_t)(void);
|
| typedef struct _OS_TASK_MSG
| {
| TASK_FUNC func;
| int cycle_tick;
| int work_tick;
| int cur_tick;
| void *par;
| } OS_TASK_MSG;
|
| int InitOSTaskQueue(OS_TASK_MSG *p_task, int cnt);
| int OSTaskCreate(TASK_FUNC func, int tick, int work_tick, void *par);
| void OSSchedule(GETTICK_t GetTick);
| void OS_GetTick(void);
|
| extern volatile int OS_Init_time_cnt;
| #ifdef __cplusplus
| }
| #endif
|
| #endif
|
|