Commit a4232d53 authored by 张金硕's avatar 张金硕

feat:新增off到on时清串口发送buffer

parent faec2a26
...@@ -131,6 +131,7 @@ static void Power_IG_ON_Init(void) ...@@ -131,6 +131,7 @@ static void Power_IG_ON_Init(void)
Fuel_KL15_Init(); Fuel_KL15_Init();
//RTE_GPIO_Set_Level(Blacklight_PWM, 1); //RTE_GPIO_Set_Level(Blacklight_PWM, 1);
FaultCode_Init(); FaultCode_Init();
mwAmt630hUartSendDatainit();
AMT630H_Animation_IGON(); AMT630H_Animation_IGON();
// Amt630hInit(); // Amt630hInit();
AMT630H_GUI_SELFCHECK_STS_INIT(); AMT630H_GUI_SELFCHECK_STS_INIT();
......
...@@ -321,6 +321,15 @@ void mwAmt630hUartSendIsr(void) ...@@ -321,6 +321,15 @@ void mwAmt630hUartSendIsr(void)
mwAmt630hSerialSendValid = 0; mwAmt630hSerialSendValid = 0;
} }
} }
void mwAmt630hUartSendDatainit(void)
{
memset(mwAmt630hSerialSendBuffer,00,sizeof(mwAmt630hSerialSendBuffer));
mwAmt630hSerialDataIndex = 0;
mwAmt630hSerialSendCnts = 0;
mwAmt630hSerialSendFillCnts = 0;
mwAmt630hSerialSendValid = 0;
}
/* /*
Data:要发送数据的指针, Data:要发送数据的指针,
请确认是全局变量的指针,且指向的数据在发送完成之前不会被改变。 请确认是全局变量的指针,且指向的数据在发送完成之前不会被改变。
......
...@@ -59,5 +59,6 @@ extern uint32_t RTE_UART_Init(UART_Channel_en_t enUARTCh, UART_Channel_Config_st ...@@ -59,5 +59,6 @@ extern uint32_t RTE_UART_Init(UART_Channel_en_t enUARTCh, UART_Channel_Config_st
extern void RTE_UART_Sleep_Init(UART_Channel_en_t enUARTCh); extern void RTE_UART_Sleep_Init(UART_Channel_en_t enUARTCh);
extern void mwAmt630hUartSendData(uint8_t *data, uint32_t length); extern void mwAmt630hUartSendData(uint8_t *data, uint32_t length);
extern void mwAmt630hUartSendIsr(void); extern void mwAmt630hUartSendIsr(void);
extern void mwAmt630hUartSendDatainit(void);
#endif #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