forked from achamaikin/CCSModuleSW30Web
Send one-way Linux reboot notification (v1.0.39)
This commit is contained in:
1 parent
3b04e532af
commit
4f33a19387
7 files changed
+8836
-8821
No files matched your search
+10
-2
@@ -138,8 +138,16 @@ static void StopButtonControl(void){
|
||||
CONN.connControl = CMD_FORCE_UNLOCK;
|
||||
}
|
||||
if(hold_time > 40000){
|
||||
SC_SendPacket(NULL, 0, RESP_SUCCESS);
|
||||
while(huart2.gState == HAL_UART_STATE_BUSY_TX);
|
||||
SC_SendPacket(NULL, 0, EVENT_HOST_REBOOT);
|
||||
{
|
||||
uint32_t t0 = HAL_GetTick();
|
||||
while(huart2.gState == HAL_UART_STATE_BUSY_TX){
|
||||
if((HAL_GetTick() - t0) > 50u){
|
||||
(void)HAL_UART_AbortTransmit(&huart2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
HAL_Delay(10);
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user