#ifndef _CAN_USER_H_ #define _CAN_USER_H_ #include "RTE.h" #include "Application.h" #include "Components.h" /****************************************************************************** Bus-off ******************************************************************************/ #define RSCAN0_BUS_STABLE 0x00U #define RSCAN0_BUS_OFF_LV1 0x01U #define RSCAN0_BUS_OFF_LV2 0x02U #define RSCAN00_BUS_LIMP 0x03U /****************************************************************************** Bus-off ******************************************************************************/ #define RSCAN0_BUS_OFF_LV1_RECOVERY_TIME 90U #define RSCAN0_BUS_OFF_LV2_RECOVERY_TIME 1000U typedef struct { uint8_t Status; uint8_t Timer; uint8_t Cnt; uint8_t ReportDTCCnt; } RSCAN0BusoffMonitorStruct; extern void Can_Tx_Apply_Buff(void); extern void Can_RX_Apply_Buff(void); extern void Can_BusOff_Recover(uint8_t deltaTime); extern void COM_CAN_Init(void); extern void Can_Init(void); extern void Can_Rx_Cak(CanTxRxMsg *Msg); extern void Busoff(void); extern uint8_t COM_APP_Process(st_CAN_Msg *Msg); extern void Can_Write(st_CAN_Msg *Msg); #endif