95 lines
5.1 KiB
C
Raw Normal View History

2023-05-05 11:53:54 +08:00
/**------------------<2D><>ʷ<EFBFBD><EFBFBD><E6B1BE>Ϣ-------------------------------------------------------
** <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>: fengshulin
** <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> V1.0
** <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>: 2015/03/12
** <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>: <EFBFBD><EFBFBD>ʼ<EFBFBD>
**-------------------------------------------------------------------------------------*/
#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 }
};
/****************************************************************************************
@<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : void DisableCanIf_Interrupt(void)
@<EFBFBD><EFBFBD><EFBFBD><EFBFBD> : void
@<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ : void
@<EFBFBD><EFBFBD><EFBFBD><EFBFBD> :
@<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD> : 2015/04/11
@<EFBFBD> : V1.0
@<EFBFBD><EFBFBD>ע :
*****************************************************************************************/
void DisableCanIf_Interrupt(void)
{
//SetMcu_InterruptDisable();
DI();
}
/****************************************************************************************
@<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : void EnableCanIf_Interrupt(void)
@<EFBFBD><EFBFBD><EFBFBD><EFBFBD> : void
@<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ : void
@<EFBFBD><EFBFBD><EFBFBD><EFBFBD> :
@<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD> : 2015/04/11
@<EFBFBD> : V1.0
@<EFBFBD><EFBFBD>ע :
*****************************************************************************************/
void EnableCanIf_Interrupt(void)
{
//SetMcu_InterruptEnable();
EI();
}