-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtask_manager_wrapper.h
103 lines (77 loc) · 3.43 KB
/
task_manager_wrapper.h
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
* task_manager_wrapper.h
*
* Created on: 30 oct. 2018
* Author: Vincent
*/
#ifndef TASK_MANAGER_WRAPPER_H_
#define TASK_MANAGER_WRAPPER_H_
#ifndef EMPTY_MACRO
#define EMPTY_MACRO do {} while (0)
#endif
#define TASK_EVENT_1 (1 << 0)
#define TASK_EVENT_2 (1 << 1)
#define TASK_EVENT_3 (1 << 2)
#define TASK_EVENT_4 (1 << 3)
#define TASK_EVENT_5 (1 << 4)
#define TASK_EVENT_6 (1 << 5)
#define TASK_EVENT_7 (1 << 6)
#define TASK_EVENT_8 (1 << 7)
#define TASK_EVENT_LOCATION TASK_EVENT_1
#define TASK_EVENT_FEC_INFO TASK_EVENT_2
#define TASK_EVENT_FEC_POWER TASK_EVENT_3
#define TASK_EVENT_BOUCLE_RELEASE (TASK_EVENT_LOCATION | TASK_EVENT_FEC_INFO | TASK_EVENT_FEC_POWER)
#define TASK_EVENT_PERIPH_TRIGGER TASK_EVENT_3
#define TASK_EVENT_PERIPH_TWI_WAIT TASK_EVENT_6
#define TASK_EVENT_PERIPH_MS_WAIT TASK_EVENT_7
#define SYSVIEW_MAX_NOF_TASKS 10
#define TASK_BASE_NRF (36u)
#define BOUCLE_TASK (TASK_BASE_NRF + 0u)
#define PERIPH_TASK (TASK_BASE_NRF + 1u)
#define LCD_TASK (TASK_BASE_NRF + 2u)
#define SYSTEM_TASK (TASK_BASE_NRF + 3u)
#define TASK_BASE (512u)
#define TASK_RECV_EVENT (TASK_BASE + 0u)
#define I2cReadSensors (TASK_BASE + 1u)
#define SpiSendBuffer (TASK_BASE + 2u)
#define UART_TASK (TASK_BASE + 3u)
#define MainSegLoop (TASK_BASE + 4u)
#define SdAccess (TASK_BASE + 5u)
#define ComputeSegmentPerf (TASK_BASE + 6u)
#define ComputeZoom (TASK_BASE + 7u)
#define DisplayPoints (TASK_BASE + 8u)
#define DisplayMyself (TASK_BASE + 9u)
#define SaveUserPosition (TASK_BASE + 10u)
#define USB_VCOM_TASK (TASK_BASE + 11u)
#define SST_TASK (TASK_BASE + 12u)
#define I2cReadReg8 (TASK_BASE + 13u)
#define I2cReadRegN (TASK_BASE + 14u)
#define I2cMgmtReadMs (TASK_BASE + 15u)
#define I2cMgmtRead1 (TASK_BASE + 16u)
#define I2cMgmtRead2 (TASK_BASE + 17u)
#define Ls027Clear (TASK_BASE + 18u)
#define Ls027Cadrans (TASK_BASE + 19u)
#define Ls027Print (TASK_BASE + 20u)
#define LocatorTasks (TASK_BASE + 21u)
#define AntRFTasks (TASK_BASE + 22u)
#define GPSTasks (TASK_BASE + 23u)
#define VueRefresh (TASK_BASE + 24u)
#define SdFunction (TASK_BASE + 25u)
#define HalQspi (TASK_BASE + 26u)
#if defined(__cplusplus)
extern "C" {
#endif /* _cplusplus */
void segger_init(void);
void segger_sendTaskInfo(uint32_t TaskID, const char* sName, unsigned Prio, uint32_t StackBase, unsigned StackSize);
void sysview_task_void_enter(uint32_t);
void sysview_task_u32_enter(uint32_t, uint32_t);
void sysview_task_void_exit(uint32_t);
#if defined(__cplusplus)
}
#endif /* _cplusplus */
#ifdef TDD
#include "task_manager_wrapper_tdd.h"
#else
#include "task_manager_wrapper_arm.h"
#endif
#endif /* TASK_MANAGER_WRAPPER_H_ */