Commit 1a023499 authored by 李茂军's avatar 李茂军

feat:升级时才开wifi

parent 204d45bf
......@@ -273,7 +273,7 @@ static void Protocol_UartHandle(const Protocol_Data_t *pData)//esp接收底板
{
Wifi_OTA_Request = 1;
printf("收到进入OTA指令 \r\n");
SwitchMode=1;
SwitchMode=0x5AA57AA7;
wifiServiceStart();
}
// }
......
......@@ -42,9 +42,10 @@ uint32_t Sys_1ms_Cnt;
#define SYS_RUN_TASK_1000MS (Sys_1ms_Cnt % 1000 == 5)
uint32_t testcnt;
TaskHandle_t wifi_service_hdl=NULL;
extern void Upgrade_BAT32A239_Task(void *arg);
void wifi_service_task(void *arg);
extern uint32_t SwitchMode;
static void Sys_Run_Tasks(void *arg)
{
......@@ -53,6 +54,8 @@ static void Sys_Run_Tasks(void *arg)
{
if(SwitchMode!=0)
{
xTaskCreatePinnedToCore(wifi_service_task, "wifi_service_task", 4096, NULL, 5, &wifi_service_hdl, 1);
xTaskCreatePinnedToCore(Upgrade_BAT32A239_Task, "Upgrade_BAT32A239_Task", 1024 * 4, NULL, 5, NULL, 1);
break;
}
if(Sys_1ms_Cnt < 499)
......@@ -128,11 +131,9 @@ static void Sys_Run_Tasks(void *arg)
vTaskDelete(NULL);
}
TaskHandle_t wifi_service_hdl=NULL;
extern uint32_t SwitchMode;
extern void wifiServiceStart(void);
extern void Upgrade_BAT32A239_Task(void *arg);
static void wifi_service_task(void *arg)
void wifi_service_task(void *arg)
{
while (1)
{
......@@ -161,8 +162,8 @@ void app_main(void)
printf("KL30 INIT OVER~~~~~~\r\n");
xTaskCreatePinnedToCore(Sys_Run_Tasks, "Sys_Run_Tasks", 4096, NULL, 3, Sys_Run_Taskshdl, 1);
xTaskCreatePinnedToCore(wifi_service_task, "wifi_service_task", 4096, NULL, 5, &wifi_service_hdl, 1);
xTaskCreatePinnedToCore(Upgrade_BAT32A239_Task, "Upgrade_BAT32A239_Task", 1024 * 4, NULL, 5, NULL, 1);
//xTaskCreatePinnedToCore(wifi_service_task, "wifi_service_task", 4096, NULL, 5, &wifi_service_hdl, 1);
//xTaskCreatePinnedToCore(Upgrade_BAT32A239_Task, "Upgrade_BAT32A239_Task", 1024 * 4, NULL, 5, NULL, 1);
}
......
......@@ -701,6 +701,8 @@ CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_CTRL_HLI=y
# end of Controller Options
# CONFIG_BT_HCI_LOG_DEBUG_EN is not set
# end of Bluetooth
# CONFIG_BLE_MESH is not set
......
......@@ -120,7 +120,7 @@ void wifi_service(void)
void wifiServiceStart(void)
{
if(wifi_service_info.status == WIFI_SERVICE_STOP)
//if(wifi_service_info.status == WIFI_SERVICE_STOP)
{
// 开启WiFi服务
wifi_service_info.status = WIFI_SERVICE_INIT;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment