Commit 0b9b575e authored by 陈家乐's avatar 陈家乐

🐞 fix:代码评审问题:部分结构体成员未初始化,已更改

parent 9a6afa98
......@@ -35,6 +35,10 @@ void Can_Init(void)
*/
void Can_RX_Apply_Buff(void)
{
CAN_RecvMsg.DLC = 8;
    CAN_RecvMsg.Data = {0,0,0,0,0,0,0,0};
    CAN_RecvMsg.OverWriteConfig = 0;
CAN_RecvMsg.Id = 0x101;
CAN_RecvMsg.IDE = CAN_Id_Standard;
CAN_RecvMsg.CacheType = CAN_CacheType_Rx_NoMask;
......@@ -245,6 +249,10 @@ void CAN_TX_Init(void)
memset(pTXBuff, 0, sizeof(pTXBuff));
CAN_CH0_CanMsgTxOp.CanMsg = (st_CAN_SendOperation *)pTXBuff;
CAN_CH0_CanMsgTxOp.st_CAN_SendAttribute = CAN_CH0_CANSendAttr;
    CAN_CH0_CanMsgTxOp.Total_Msg = CAN_CH0_ID_SEND_TOTAL;
    CAN_CH0_CanMsgTxOp.Can_Write = COM_APP_Process;
    CAN_CH0_CanMsgTxOp.u8CAN_TX_ENABLE = CAN_N_TX_Disable;
Can_TX_BuffInit(&CAN_CH0_CanMsgTxOp, CAN_CH0_CANSendAttr, CAN_CH0_ID_SEND_TOTAL, COM_APP_Process);
CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Disable);
......
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