Обновление

This commit is contained in:
cfif 2026-06-21 18:02:50 +03:00
parent 45cc19c660
commit a3e02531a2
1 changed files with 30 additions and 13 deletions

View File

@ -13,6 +13,33 @@
tCanPorts CAN_PORTS;
static void CAN0_ErrorInterrupt_CallBack(uint8_t u8CanIndex, FLEXCAN_ErrorInfoType *pErrorInfo) {
FLEXCAN_ClrErrorInfo(u8CanIndex, pErrorInfo);
PROCESS_UNUSED_VAR(u8CanIndex);
PROCESS_UNUSED_VAR(pErrorInfo);
}
uint32_t azz0 = 0;
static void CAN0_TxInterruptCallBackType(uint8_t u8CanIndex, uint8_t u8TxHandler) {
++azz0;
asm("nop");
}
static void CAN1_ErrorInterrupt_CallBack(uint8_t u8CanIndex, FLEXCAN_ErrorInfoType *pErrorInfo) {
FLEXCAN_ClrErrorInfo(u8CanIndex, pErrorInfo);
PROCESS_UNUSED_VAR(u8CanIndex);
PROCESS_UNUSED_VAR(pErrorInfo);
}
uint32_t azz1 = 0;
static void CAN1_TxInterruptCallBackType(uint8_t u8CanIndex, uint8_t u8TxHandler) {
++azz1;
asm("nop");
}
#if (CAN_DMA_EN == 1)
@ -33,12 +60,6 @@ static void DMA_TransferCompleteCallbackCan1(void) {
}
#else
static void CAN0_ErrorInterrupt_CallBack(uint8_t u8CanIndex, FLEXCAN_ErrorInfoType *pErrorInfo) {
FLEXCAN_ClrErrorInfo(u8CanIndex, pErrorInfo);
PROCESS_UNUSED_VAR(u8CanIndex);
PROCESS_UNUSED_VAR(pErrorInfo);
}
static void CAN0_RxInterrupt_CallBack(uint8_t u8CanIndex, FLEXCAN_RxMsgType *pRxCfg) {
CanSerialPortFrameIrqRxProcessingNO_DMA(CAN_PORTS.Can0_IO.env, pRxCfg);
}
@ -48,11 +69,7 @@ static void CAN0_RxFifoInterrupt_CallBack(uint8_t u8CanIndex, FLEXCAN_RxMsgType
}
static void CAN1_ErrorInterrupt_CallBack(uint8_t u8CanIndex, FLEXCAN_ErrorInfoType *pErrorInfo) {
FLEXCAN_ClrErrorInfo(u8CanIndex, pErrorInfo);
PROCESS_UNUSED_VAR(u8CanIndex);
PROCESS_UNUSED_VAR(pErrorInfo);
}
static void CAN1_RxInterrupt_CallBack(uint8_t u8CanIndex, FLEXCAN_RxMsgType *pRxCfg) {
CanSerialPortFrameIrqRxProcessingNO_DMA(CAN_PORTS.Can1_IO.env, pRxCfg);
@ -205,7 +222,7 @@ static bool vCanPort_InitCan0() {
FLEXCAN_BAUD_500K,
FLEXCAN_ID_STD,
0x55,
NULL,
CAN0_ErrorInterrupt_CallBack,
NULL,
NULL,
NULL,
@ -310,7 +327,7 @@ static bool vCanPort_InitCan1() {
FLEXCAN_BAUD_500K,
FLEXCAN_ID_STD,
0x55,
NULL,
CAN1_ErrorInterrupt_CallBack,
NULL,
NULL,
NULL,