Select one of the symbols to view example projects that use it.
 
Outline
Includes
#include "app_tx_freertos.h"
Private includes
Private typedef
Private define
Private macro
Private variables
LEDThread
Private function prototypes
Global user code
App_TX_FreeRTOS_Init()
tx_application_define(void *)
Private user code
LEDThread_Entry(void *)
Files
loading (3/5)...
SourceVuSTM32 Libraries and SamplesTx_FreeRTOS_WrapperSrc/app_tx_freertos.c
 
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file app_tx_freertos.c * @author MCD Application Team * @brief ThreadX FreeRTOS Wrapper applicative file ****************************************************************************** * @attention * * Copyright (c) 2021 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "app_tx_freertos.h" Includes /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ Private includes /* Private typedef -----------------------------------------------------------*/ /* USER CODE BEGIN PTD */ /* USER CODE END PTD */ Private typedef /* Private define ------------------------------------------------------------*/ /* USER CODE BEGIN PD */ /* USER CODE END PD */ Private define /* Private macro -------------------------------------------------------------*/ /* USER CODE BEGIN PM */ /* USER CODE END PM */ Private macro /* Private variables ---------------------------------------------------------*/ /* USER CODE BEGIN PV */ TaskHandle_t LEDThread; /* USER CODE END PV */ Private variables /* Private function prototypes -----------------------------------------------*/ /* USER CODE BEGIN PFP */ static void LEDThread_Entry(void *argument); /* USER CODE END PFP */ Private function prototypes /* Global user code ---------------------------------------------------------*/ /* USER CODE BEGIN Global user code */ /* USER CODE END Global user code */ /** * @brief Application ThreadX with FreeRTOS Wrapper Initialization. * @param memory_ptr: memory pointer * @retval int *//* ... */ UINT App_TX_FreeRTOS_Init(void) { UINT ret = TX_SUCCESS; /* USER CODE BEGIN App_TX_FreeRTOS_Init */ tx_kernel_enter(); /* USER CODE END App_TX_FreeRTOS_Init */ return ret; }{ ... } /** * @brief Define the initial system. * @param first_unused_memory : Pointer to the first unused memory * @retval None *//* ... */ VOID tx_application_define(VOID *first_unused_memory) { /* USER CODE BEGIN tx_application_define */ /* Initialize the adaptation layer with 64KiB of internal heap.*/ if(tx_freertos_init() != TX_SUCCESS) { Error_Handler(); }if (tx_freertos_init() != TX_SUCCESS) { ... } /* Create LEDThread. */ if (xTaskCreate(LEDThread_Entry, "LED Thread", APP_STACK_SIZE, NULL, LED_THREAD_PRIO, &LEDThread) != pdPASS) { Error_Handler(); }if (xTaskCreate(LEDThread_Entry, "LED Thread", APP_STACK_SIZE, NULL, LED_THREAD_PRIO, &LEDThread) != pdPASS) { ... } /* USER CODE END tx_application_define */ }{ ... } Global user code/* Private user code ---------------------------------------------------------*/ /* USER CODE BEGIN Private user code */ /* USER CODE END Private user code */ /* USER CODE BEGIN 1 */ /** * @brief Function implementing the LEDThread thread. * @param argument: Not used * @retval None *//* ... */ void LEDThread_Entry(void *argument) { (void) argument; /* Infinite loop */ while(1) { BSP_LED_Toggle(LED_GREEN); /* Delay for 500ms */ vTaskDelay(500); }while (1) { ... } }{ ... } /* USER CODE END 1 */Private user code
Details