一、void CanTp_Init(const CanTp_ConfigType *CfgPtr)
This function initializes the CanTp module.
1、初始化CanTp_CfgPtr=CanTp_Config,具体结构类型在后面解释。
2、将CanTp_SubState初始化为CANTP_IDLE状态
3、将CanTp_TxConfirmationChannel初始化为CANTP_INVALID_CHANNEL
4、设置CanTp_MainState为CANTP_ON
二、void CanTp_Shutdown(void)
This function is called to shutdown the CanTp module.
1、检查CanTp_MainState是否为CANTP_ON,否则会报错,在没有初始化的情况下是不允许调用CanTp_Shutdown的。
2、将CanTp_MainState初始化为CANTP_OFF状态
3、和初始化相同,将CanTp_SubState初始化为CANTP_IDLE状态,将CanTp_TxConfirmationChannel初始化为CANTP_INVALID_CHANNEL,清空CanTp的配置指针。
三、void CanTp_MainFunction(void)
CanTp scheduled functions which is called by the BSW sheduler in a cyclic interval defined by
AUTOSAR CanTp模块代码记录-1
于 2023-03-08 23:53:12 首次发布