2024-07-07 16:42:04 +08:00

90 lines
3.4 KiB
C

/**------------------历史版本信息-------------------------------------------------------
** 修 改 人:
** 版 本:
** 日 期:
** 描 述: 初始版本
**-------------------------------------------------------------------------------------*/
#define DI __DI
#define EI __EI
#define HALT __halt
#define NOP __nop
#define STOP __stop
#define BRK __brk
#include "CanIf_Cfg.h"
#include "CanTp.h"
#include "CanSm.h"
/***************************************************************************************/
const CanIf_ConfigType SeCanIf_t_Config =
{
CANIF_CFG_MAX_RX_HANDLE, /* eMaxRxPDUHandle; Number of Rx PDUs */
CANIF_CFG_MAX_TX_HANDLE, /* eMaxTxPDUHandle; Number of Tx PDUs */
CANIF_CFG_MAX_CONTROLLER /* eMaxController; Number of Controllers */
};
/***************************************************************************************/
/* CanIf Rx Config
/*********************************************************/
const CanIf_CanRxConfigTabeType SeCanIf_t_CanRxConfigTabe[CANIF_CFG_MAX_RX_HANDLE] =
{
/*CAN ID*/ /*CAN DLC*/ /*ControllerID*/ /*RxIndication Fct*/
{CANTP_ADDR_PHY_REQ, 8, 0, (CanIf_RxIndicationType)&RxIndicationCanTP_AddrPhy_Message/*&RxIndicationCanTP_Message*/, (CanIf_RxErrorType)COM_NULL_PTR/*&RxErrorCanTP_Message*/ },
{CANTP_ADDR_FUNC_REQ, 8, 0, (CanIf_RxIndicationType)&RxIndicationCanTP_AddrFunc_Message/*&RxIndicationCanTP_Message*/, (CanIf_RxErrorType)COM_NULL_PTR/*&RxErrorCanTP_Message*/ },
};
/***************************************************************************************/
/* CanIf Tx Config
/***************************************************************************************/
const CanIf_CanTxConfigTabeType SeCanIf_t_CanTxConfigTabe[CANIF_CFG_MAX_TX_HANDLE] =
{
/*CAN ID*/ /*CAN DLC*/ /*ControllerID*/ /*eCanTxCycleOffset*/ /*eSignalFilterMode*/ /*eCanTxMode*/ /*eEventCnt*/ /*eEventCycle*/ /*eCanTxCycle*/ /*eCanIf_TxConfirmationFct*/ /*eCanIf_TxErrorFct*/ /*eQueuedIndex*/
{CANTP_RESP_CANID, 8, 0, 0, SIGNAL_FILTER_ALWAYS, TX_MODE_EVENT, 1, 100, 0, COM_NULL_PTR, COM_NULL_PTR, 3 }
};
/****************************************************************************************
@函数名称 : void DisableCanIf_Interrupt(void)
@参数 : void
@返回值 : void
@描述 :
@最后编辑时间 : 2015/04/11
@版本 : V1.0
@备注 :
*****************************************************************************************/
void DisableCanIf_Interrupt(void)
{
//SetMcu_InterruptDisable();
DI();
}
/****************************************************************************************
@函数名称 : void EnableCanIf_Interrupt(void)
@参数 : void
@返回值 : void
@描述 :
@最后编辑时间 : 2015/04/11
@版本 : V1.0
@备注 :
*****************************************************************************************/
void EnableCanIf_Interrupt(void)
{
//SetMcu_InterruptEnable();
EI();
}