2024-05-22 23:21:15 +08:00

95 lines
5.1 KiB
C

/**------------------历史版本信息-------------------------------------------------------
** 修 改 人: fengshulin
** 版 本: V1.0
** 日 期: 2015/03/12
** 描 述: 初始版本
**-------------------------------------------------------------------------------------*/
#pragma DI
#pragma EI
#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*/ /*RxIndication Fct*/
//{0x519, 5, 0, (CanIf_RxIndicationType)COM_NULL_PTR/*&RxIndicationCom_Message*/, (CanIf_RxErrorType)COM_NULL_PTR/*&RxErrorCom_Message*/ },
//{0x280, 8, 0, (CanIf_RxIndicationType)COM_NULL_PTR/*&RxIndicationCom_Message*/, (CanIf_RxErrorType)COM_NULL_PTR/*&RxErrorCom_Message*/ },
//{0x516, 8, 0, (CanIf_RxIndicationType)COM_NULL_PTR/*&RxIndicationCom_Message*/, (CanIf_RxErrorType)COM_NULL_PTR/*&RxErrorCom_Message*/ },
//{0x392, 8, 0, (CanIf_RxIndicationType)COM_NULL_PTR/*&RxIndicationCom_Message*/, (CanIf_RxErrorType)COM_NULL_PTR/*&RxErrorCom_Message*/ },
//{0x2C0, 7, 0, (CanIf_RxIndicationType)COM_NULL_PTR/*&RxIndicationCom_Message*/, (CanIf_RxErrorType)COM_NULL_PTR/*&RxErrorCom_Message*/ },
//{0x600, 8, 0, (CanIf_RxIndicationType)COM_NULL_PTR/*&RxIndicationCanNM_Message*/, (CanIf_RxErrorType)COM_NULL_PTR/*&RxErrorCanNM_Message*/ },
{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*/
//{0x4F1, 8, 0, 0, SIGNAL_FILTER_ALWAYS, TX_MODE_EVENT, 1, 100, 0, (CanIf_TxConfirmationType)COM_NULL_PTR/*&TxConfirmationCom_Message*/, COM_NULL_PTR, 0 },
//{0x51A, 8, 0, 0, SIGNAL_FILTER_ALWAYS, TX_MODE_MIXED, 1, 100, 100, (CanIf_TxConfirmationType)COM_NULL_PTR/*&TxConfirmationCom_Message*/, COM_NULL_PTR, 1 },
//{0x620, 2, 0, 0, SIGNAL_FILTER_ALWAYS, TX_MODE_EVENT, 1, 100, 0, COM_NULL_PTR, COM_NULL_PTR, 2 },
{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();
}