99 lines
3.0 KiB
C
Raw Normal View History

2023-05-05 11:53:54 +08:00
/* @ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>@<40>ַ<EFBFBD><D6B7>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>ȥ<EFBFBD><C8A5> */
#ifndef CANTP_H
#define CANTP_H
/******************************************************************************
* Description: : Include File Section
******************************************************************************/
#include "CanSm.h"
#include "CanTp_Cfg.h"
/******************************************************************************
* Description: : Macro Description Section
******************************************************************************/
/******************************************************************************
* Description: : Structure Type Declaration Section
******************************************************************************/
typedef enum
{
CeCanTp_e_Empty = 0,
CeCanTp_e_Full = 1,
CeCanTp_e_SF_Full = 2,
}TeCanTp_e_RxBufferSts;
typedef enum
{
CeCanTp_e_Physical=0,
CeCanTp_e_Functional,
}TeCanTp_e_AddrMethod;
typedef enum
{
CeCanTp_e_Idel = 0,
CeCanTp_e_SF_Get,
CeCanTp_e_MF_FFGet,
CeCanTp_e_MF_CFTakein,
CeCanTp_e_MF_Get,
CeCanTp_e_Answer,
}TeCanTp_e_TpSts;
typedef enum
{
CeCanTp_e_TX_Idel = 0,
CeCanTp_e_TX_FCWaiting,
CeCanTp_e_TX_FCGet,
CeCanTp_e_TX_CFGaving,
}TeCanTp_e_MFTxSts;
typedef enum
{
CeCanTp_e_As = 0,
CeCanTp_e_Bs,
CeCanTp_e_Cs,
CeCanTp_e_Ar,
CeCanTp_e_Br,
CeCanTp_e_Cr,
}TeCanTp_e_MFTimerSwitch;
typedef enum
{
CeCanTp_e_Tx_Idle = 0,
CeCanTp_e_Tx_Busy,
}TeCanTp_e_TxSts;
typedef enum
{
CeCanTp_e_Tx_Succeed = 0,
CeCanTp_e_Tx_Wrong,
}TeCanTp_e_TxResult;
typedef enum
{
CeCanTp_e_S3_Start = 0,
CeCanTp_e_S3_Stop,
}TeCanTp_e_S3TimerSts;
/******************************************************************************
* Description: : Global Variable Declaration Section
******************************************************************************/
/******************************************************************************
* Description: : Global Function Prototype Declaration
******************************************************************************/
extern uint8 GetCanTp_u_S3Sts(void);/* <20><>ȡS3 */
extern void MngCanTp_MainFunction(void);/* <20><><EFBFBD><EFBFBD><EFBFBD>Ⱥ<EFBFBD><C8BA><EFBFBD> */
extern void InitCanTp_Parameter(void);/* <20><>ʼ<EFBFBD><CABC> */
extern TeCanTp_e_TxResult SetCanTp_TxBuffer(uint16 LeCanTp_p_DL, const uint8 LeCanTp_p_DataAddr[]);/* <20><><EFBFBD>ͺ<EFBFBD><CDBA><EFBFBD> */
extern TeCanTp_e_TxResult SetCanTp_Tx_78Neg(uint16 LeCanTp_p_DL , const uint8 LeCanTp_p_DataAddr[]);
extern void RxIndicationCanTP_AddrFunc_Message(CanIf_HwHandleType LeCanTp_e_Hrh, CanIf_CanIdType LeCanTp_e_CanId,CanIf_CanDlcType LeCanTp_e_CanDlc, const CanIf_CanDataType LeCanTp_e_CanSduPtr[]);/* <20><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD> */
extern void RxIndicationCanTP_AddrPhy_Message(CanIf_HwHandleType LeCanTp_e_Hrh, CanIf_CanIdType LeCanTp_e_CanId,CanIf_CanDlcType LeCanTp_e_CanDlc,const CanIf_CanDataType LeCanTp_e_CanSduPtr[]);/* <20><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD> */
extern TeCanTp_e_RxBufferSts GetCanTp_e_RxBufferSts(uint8* LeCanTp_p_AddrMethod , uint16* LeCanTp_p_DL , uint8** LeCanTp_p_DataAddr);/* <20>ϲ<EFBFBD><CFB2><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>յ<EFBFBD><D5B5>ñ<EFBFBD><C3B1><EFBFBD> */
#endif