Commit 74f41343 authored by 李延凯's avatar 李延凯

feat: 添加按键功能, 进入630H升级MCU模式

parent caacdc92
#include "Key_user.h"
#include "Components.h"
#include "UDS_ISO14229_Services.h"
__align(4)
......@@ -27,6 +27,8 @@ void Key_Operation_Left(Key_Event_en_t enKeyEvent)//选择
case KEY_EVENT_LONG_PRESS_3: //5s
break;
case KEY_EVENT_LONG_PRESS_4: //10s
/* 进入630H升级MCU模式 */
Get_Into_630H_Update_MCU_Mode();
break;
case KEY_EVENT_OFF_TO_ON:
break;
......
......@@ -1556,3 +1556,13 @@ void DIAG_InitParameter(void)
RANDOM = 1573;
Services27_01_Requested = 0;
}
void Get_Into_630H_Update_MCU_Mode(void)
{
Write_App_InValid(Flag_App_OTAStatus);
for (i = 0; i < 250; ++i)
{
__NOP();
}
__NVIC_SystemReset();
}
......@@ -399,4 +399,6 @@ void Data_Read_DiagPara(void);
void DFlash_init(void);
void Data_Read_DiagPara(void);
extern void Get_Into_630H_Update_MCU_Mode(void);
#endif
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