加入更新操作

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
if(!EEPROM_Init_Check()) {
Sys_Setting_Get();
EEPROM_SysSetting_Get();
}
// FUSB CC pin dis connect

View File

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