77 lines
2.9 KiB
C
77 lines
2.9 KiB
C
|
/*@处根据实际情况填写相关信息,将@字符以及这条提示语句去掉*/
|
||
|
#ifndef CANTP_CFG_H
|
||
|
#define CANTP_CFG_H
|
||
|
|
||
|
/******************************************************************************
|
||
|
* Description: : Include File Section
|
||
|
******************************************************************************/
|
||
|
#include "_Types.h"
|
||
|
#include "CanIf_Cfg.h"
|
||
|
|
||
|
/******************************************************************************
|
||
|
* Description: : Macro Description Section
|
||
|
******************************************************************************/
|
||
|
/*@define类型定义*/
|
||
|
#define CANTP_TASK 1
|
||
|
#define CANTP_MFLEN_MAX 1200 /* 多帧最大长度 */
|
||
|
|
||
|
#define LEFT_BOARD 0
|
||
|
#define RIGHT_BOARD 1
|
||
|
#define BOARD_CFG RIGHT_BOARD
|
||
|
|
||
|
#if BOARD_CFG == LEFT_BOARD
|
||
|
#define CANTP_ADDR_FUNC_REQ 0x7DF /* 诊断功能寻址 */
|
||
|
#define CANTP_ADDR_PHY_REQ 0x751 /* 诊断物理寻址 */
|
||
|
#define CANTP_RESP_CANID 0x759 /* 诊断反馈 */ //0x7AB
|
||
|
#else
|
||
|
#define CANTP_ADDR_FUNC_REQ 0x7DF /* 诊断功能寻址 */
|
||
|
#define CANTP_ADDR_PHY_REQ 0x752 /* 诊断物理寻址 */
|
||
|
#define CANTP_RESP_CANID 0x75A /* 诊断反馈 */ //0x7AB
|
||
|
#endif
|
||
|
|
||
|
#define CANTP_ADDRFUNC_MF_FORBID _FALSE
|
||
|
|
||
|
#define CANTP_RX_STMIN_DEFINE 0 /* STmin */
|
||
|
|
||
|
#define CANTP_AS_TIMEOUT_DEFINE 25u /* 25ms?*/
|
||
|
#define CANTP_BS_TIMEOUT_DEFINE 75u /* 75ms? */
|
||
|
|
||
|
#define CANTP_CS_TIMEOUT /*(N_Cs + N_As) < 0.9*N_Bs */
|
||
|
#define CANTP_AR_TIMEOUT 25u /* 25ms? */
|
||
|
|
||
|
#define CANTP_BR_TIMEOUT /* (N_Br + N_Ar) < 0.9*N_Cr */
|
||
|
#define CANTP_CR_TIMEOUT_DEFINE 150u /* 150ms */
|
||
|
|
||
|
#define CANTP_RESP_TIMEOUT 500u
|
||
|
|
||
|
#define CANTP_APP_RESP_TIMEOUT 500u /* APP响应时间 */
|
||
|
#define CANTP_APP_RESP_78NEG_DEFINE 5000u /* 78负相应 */
|
||
|
|
||
|
extern const unsigned char TP_DUMY;// = 0xAA ; /* TP空闲填充 */
|
||
|
extern const CanIf_CanIdType CANTP_ADDR_PHY_REQ_const ;
|
||
|
extern const CanIf_CanIdType CANTP_ADDR_FUNC_REQ_const ;
|
||
|
extern const CanIf_CanIdType CANTP_RESP_CANID_const ;
|
||
|
|
||
|
extern const uint8 CANTP_RX_STMIN;
|
||
|
extern const uint16 CANTP_BS_TIMEOUT;
|
||
|
extern const uint16 CANTP_CR_TIMEOUT;
|
||
|
extern const uint16 CANTP_APP_RESP_78NEG;
|
||
|
|
||
|
/******************************************************************************
|
||
|
* Description: : Structure Type Declaration Section
|
||
|
******************************************************************************/
|
||
|
/*@结构类型typedef定义*/
|
||
|
|
||
|
|
||
|
/******************************************************************************
|
||
|
* Description: : Global Variable Declaration Section
|
||
|
******************************************************************************/
|
||
|
/*@全局变量声明extern*/
|
||
|
|
||
|
/******************************************************************************
|
||
|
* Description: : Global Function Prototype Declaration
|
||
|
******************************************************************************/
|
||
|
/*@接口函数声明extern*/
|
||
|
|
||
|
#endif
|