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
| #include "main.h"
| #include "os_task.h"
|
| static void GPIO_FunctionTestTask(void *p)
| {
| *p;
| HAL_GPIO_TogglePin(EXT_END_GPIO_Port, EXT_END_Pin);
| }
|
| int main(void)
| {
| OS_TASK_MSG task_queue[16] = {0};
| InitOSTaskQueue(task_queue, 16);
| /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
| HAL_Init();
| /* Configure the system clock */
| SystemClock_Config();
|
| /* Initialize all configured peripherals */
| MX_GPIO_Init();
| MX_CAN1_Init();
| MX_ADC1_Init();
| MX_CRC_Init();
| MX_I2C1_Init();
| MX_I2C2_Init();
| MX_TIM1_Init();
| MX_DMA_Init();
| MX_TIM15_Init();
|
| OSTaskCreate(GPIO_FunctionTestTask, 1, 1, NULL);
|
| OSSchedule(&OS_GetTick);
| while (1)
| {
| ;
| }
| }
|
|