diff --git a/Core/Src/freertos.c b/Core/Src/freertos.c index 717e310..b405193 100644 --- a/Core/Src/freertos.c +++ b/Core/Src/freertos.c @@ -26,7 +26,10 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ - +#include "common_cfg.h" +#ifdef MEM_POOL_TOTAL_SIZE +#include "common.h" +#endif /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -58,7 +61,7 @@ const osThreadAttr_t defaultTask_attributes = { /* Private function prototypes -----------------------------------------------*/ /* USER CODE BEGIN FunctionPrototypes */ - +void Myprint_Init(void); /* USER CODE END FunctionPrototypes */ void StartDefaultTask(void *argument); @@ -133,6 +136,14 @@ void MX_FREERTOS_Init(void) { /* USER CODE BEGIN RTOS_THREADS */ /* add threads, ... */ +#ifdef MEM_POOL_TOTAL_SIZE + void W25QXX_Init(void); + W25QXX_Init(); + RD_INIT(); +#ifdef USE_PRINT + Myprint_Init(); +#endif +#endif MyTask_Init(); Drv_InterfaceInit(); /* USER CODE END RTOS_THREADS */ diff --git a/Core/Src/main.c b/Core/Src/main.c index 66fa85c..4fccd15 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -32,10 +32,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ -#include "common_cfg.h" -#ifdef MEM_POOL_TOTAL_SIZE -#include "common.h" -#endif + /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -64,7 +61,7 @@ void SystemClock_Config(void); static void MPU_Config(void); void MX_FREERTOS_Init(void); /* USER CODE BEGIN PFP */ -void Myprint_Init(void); + /* USER CODE END PFP */ /* Private user code ---------------------------------------------------------*/ @@ -129,14 +126,7 @@ int main(void) MX_LPUART1_UART_Init(); MX_ADC2_Init(); /* USER CODE BEGIN 2 */ -#ifdef MEM_POOL_TOTAL_SIZE - void W25QXX_Init(void); - W25QXX_Init(); - RD_INIT(); -#ifdef USE_PRINT - Myprint_Init(); -#endif -#endif + /* USER CODE END 2 */ /* Init scheduler */