Commit 0963d6d4 authored by hu's avatar hu

同步BOOT应用功能

parent 3d224831
...@@ -56,7 +56,7 @@ void Can_Init(void) ...@@ -56,7 +56,7 @@ void Can_Init(void)
CANLLCCh0Filter.stRSCANCh2.u32RSCANChEn = 1u; /*通道是否使能*/ CANLLCCh0Filter.stRSCANCh2.u32RSCANChEn = 1u; /*通道是否使能*/
CANLLCCh0Filter.stRSCANCh2.enRSCANChBps = RSCAN_Baud_Rate_500K; /*通道波特率*/ CANLLCCh0Filter.stRSCANCh2.enRSCANChBps = RSCAN_Baud_Rate_500K; /*通道波特率*/
CANLLCCh0Filter.stRSCANCh2.u32RSCANChRuleSize = CANFD0_CH2_RX_RULE_SIZE; /*通道接收规则条数*/ CANLLCCh0Filter.stRSCANCh2.u32RSCANChRuleSize = CANFD0_CH2_RX_RULE_SIZE; /*通道接收规则条数*/
CANLLCCh0Filter.stRSCANCh2.pfnRSCANConfirmCallBack = 0u; /*发送确认*/ CANLLCCh0Filter.stRSCANCh2.pfnRSCANConfirmCallBack = Can_Confirm2; /*发送确认*/
CANLLCCh0Filter.stRSCANCh2.pfnRSCANAbortConfirmCallBack = 0u; /*发送中止确认*/ CANLLCCh0Filter.stRSCANCh2.pfnRSCANAbortConfirmCallBack = 0u; /*发送中止确认*/
CANLLCCh0Filter.stRSCANCh2.pfnRSCANReadMsgCallBack = Can_Read_Msg2; /*接收完成*/ CANLLCCh0Filter.stRSCANCh2.pfnRSCANReadMsgCallBack = Can_Read_Msg2; /*接收完成*/
...@@ -194,6 +194,43 @@ void Can_Confirm(uint32_t Identifier, uint8_t TransferStatus) ...@@ -194,6 +194,43 @@ void Can_Confirm(uint32_t Identifier, uint8_t TransferStatus)
} }
} }
void Can_Confirm2(uint32_t Identifier, uint8_t TransferStatus)
{
switch (Identifier)
{
case RSCAN_CHANNEL_BUF_0: DoCAN_L_Data_Confirm(DIAG_ID_Tx, 1u);
break;
case RSCAN_CHANNEL_BUF_1: DoCAN_L_Data_Confirm(DIAG_ID_Tx, 1u);
break;
case RSCAN_CHANNEL_BUF_2: DoCAN_L_Data_Confirm(DIAG_ID_Tx, 1u);
break;
case RSCAN_CHANNEL_BUF_3:
break;
case RSCAN_CHANNEL_BUF_4:
break;
case RSCAN_CHANNEL_BUF_5:
break;
case RSCAN_CHANNEL_BUF_6:
break;
case RSCAN_CHANNEL_BUF_7:
break;
case RSCAN_CHANNEL_BUF_8:
break;
case RSCAN_CHANNEL_BUF_9:
break;
case RSCAN_CHANNEL_BUF_10:
break;
case RSCAN_CHANNEL_BUF_11:
break;
case RSCAN_CHANNEL_BUF_12:
break;
case RSCAN_CHANNEL_BUF_13:
break;
default :
break;
}
}
void CAN_BUSOFF_Recover(void) void CAN_BUSOFF_Recover(void)
{ {
......
...@@ -52,6 +52,7 @@ void Can_Sleep_Fun(void); ...@@ -52,6 +52,7 @@ void Can_Sleep_Fun(void);
void Can_SleepController_Fun(void); void Can_SleepController_Fun(void);
void Can_Wakeup_Fun(void); void Can_Wakeup_Fun(void);
void Can_Confirm(uint32_t Identifier, uint8_t TransferStatus); void Can_Confirm(uint32_t Identifier, uint8_t TransferStatus);
void Can_Confirm2(uint32_t Identifier, uint8_t TransferStatus);
void Can_Abort_All(void); void Can_Abort_All(void);
void Can_Uds_Abort(void); void Can_Uds_Abort(void);
#endif #endif
......
...@@ -264,6 +264,7 @@ void DoCAN_L_Data_Request ( uint32_t Identifier, uint8_t dlc, uint8_t Data[] ) ...@@ -264,6 +264,7 @@ void DoCAN_L_Data_Request ( uint32_t Identifier, uint8_t dlc, uint8_t Data[] )
Can_Write(&canMag); Can_Write(&canMag);
//RSCAN0_SendCH0_TxBuf0(LinkTxCtrl.Identifier, 8U, 1U, LinkTxCtrl.Data); //RSCAN0_SendCH0_TxBuf0(LinkTxCtrl.Identifier, 8U, 1U, LinkTxCtrl.Data);
//DoCAN_L_Data_Confirm(DIAG_ID_Tx, 1u);
#else #else
canMag.u8CANLEN = dlc; canMag.u8CANLEN = dlc;
......
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