加入更新操作

This commit is contained in:
不吃油炸鸡
2025-10-20 20:17:00 +08:00
parent fd97d8c577
commit fd27d5f9d8
2 changed files with 6 additions and 3 deletions

View File

@@ -84,7 +84,7 @@ void HardwareInitTask(void *argument)
// system settings from eeprom // system settings from eeprom
if(!EEPROM_Init_Check()) { if(!EEPROM_Init_Check()) {
Sys_Setting_Get(); EEPROM_SysSetting_Get();
} }
// FUSB CC pin dis connect // FUSB CC pin dis connect

View File

@@ -3,6 +3,7 @@
#include "user_TasksInit.h" #include "user_TasksInit.h"
#include "user_MessageTask.h" #include "user_MessageTask.h"
#include "usart.h" #include "usart.h"
#include "BL24C02.h"
/* Private typedef -----------------------------------------------------------*/ /* Private typedef -----------------------------------------------------------*/
@@ -30,11 +31,13 @@ void MessageTask(void *argument)
if(strcmp((const char *)uart_receive_buf, "update\r\n") == 0) { if(strcmp((const char *)uart_receive_buf, "update\r\n") == 0) {
// send response // send response
printf("start update\r\n"); printf("start update\r\n");
// jump to bootloader EEPROM_UpdateCommand_Write(true);
HAL_Delay(100);
// reset
NVIC_SystemReset();
} else { } else {
// do nothing // do nothing
} }
} }
osDelay(500); osDelay(500);
} }