From 2def67cdb823a74f496a8149b1a07c0c394fc5eb Mon Sep 17 00:00:00 2001 From: tianjialong Date: Thu, 16 Mar 2023 17:13:16 +0800 Subject: [PATCH] update --- Src/freertos.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Src/freertos.c b/Src/freertos.c index 209328f..74079d8 100644 --- a/Src/freertos.c +++ b/Src/freertos.c @@ -157,7 +157,13 @@ void MX_FREERTOS_Init(void) { void StartDefaultTask(void const * argument) { /* init code for LWIP */ - MX_LWIP_Init(); + if (config_get()->obtaining_ip_mode == OBTAINING_IP_MODE_STATIC){ + MX_LWIP_STATIC_Init(); + }else if (config_get()->obtaining_ip_mode == OBTAINING_IP_MODE_DHCP){ + MX_LWIP_Init(); + }else{ + printf("lwip error\r\n"); + } /* USER CODE BEGIN StartDefaultTask */ osThreadDef(mainTask, StartMainTask, osPriorityNormal, 0, 1024); mainTaskHandle = osThreadCreate(osThread(mainTask), NULL);