123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327 |
- #ifndef CAN_IPW_H
- #define CAN_IPW_H
- #ifdef __cplusplus
- extern "C"{
- #endif
- #include "FlexCAN_Ip.h"
- #include "Can_Flexcan_Types.h"
- #include "Can_Ipw_Cfg.h"
- #define CAN_IPW_VENDOR_ID_H 43
- #define CAN_IPW_MODULE_ID 80
- #define CAN_IPW_AR_RELEASE_MAJOR_VERSION_H 4
- #define CAN_IPW_AR_RELEASE_MINOR_VERSION_H 4
- #define CAN_IPW_AR_RELEASE_REVISION_VERSION_H 0
- #define CAN_IPW_SW_MAJOR_VERSION_H 1
- #define CAN_IPW_SW_MINOR_VERSION_H 0
- #define CAN_IPW_SW_PATCH_VERSION_H 0
- #if (CAN_IPW_VENDOR_ID_H != FLEXCAN_IP_VENDOR_ID_H)
- #error "Can_Ipw.h and FlexCAN_Ip.h have different vendor ids"
- #endif
- #if ((CAN_IPW_AR_RELEASE_MAJOR_VERSION_H != FLEXCAN_IP_AR_RELEASE_MAJOR_VERSION_H) || \
- (CAN_IPW_AR_RELEASE_MINOR_VERSION_H != FLEXCAN_IP_AR_RELEASE_MINOR_VERSION_H) || \
- (CAN_IPW_AR_RELEASE_REVISION_VERSION_H != FLEXCAN_IP_AR_RELEASE_REVISION_VERSION_H))
- #error "AutoSar Version Numbers of Can_Ipw.h and FlexCAN_Ip.h are different"
- #endif
- #if ((CAN_IPW_SW_MAJOR_VERSION_H != FLEXCAN_IP_SW_MAJOR_VERSION_H) || \
- (CAN_IPW_SW_MINOR_VERSION_H != FLEXCAN_IP_SW_MINOR_VERSION_H) || \
- (CAN_IPW_SW_PATCH_VERSION_H != FLEXCAN_IP_SW_PATCH_VERSION_H))
- #error "Software Version Numbers of Can_Ipw.h and FlexCAN_Ip.h are different"
- #endif
- #if (CAN_IPW_VENDOR_ID_H != CAN_IPW_CFG_VENDOR_ID)
- #error "Can_Ipw.h and Can_Ipw_Cfg.h have different vendor ids"
- #endif
- #if ((CAN_IPW_AR_RELEASE_MAJOR_VERSION_H != CAN_IPW_CFG_AR_RELEASE_MAJOR_VERSION) || \
- (CAN_IPW_AR_RELEASE_MINOR_VERSION_H != CAN_IPW_CFG_AR_RELEASE_MINOR_VERSION) || \
- (CAN_IPW_AR_RELEASE_REVISION_VERSION_H != CAN_IPW_CFG_AR_RELEASE_REVISION_VERSION))
- #error "AutoSar Version Numbers of Can_Ipw.h and Can_Ipw_Cfg.h are different"
- #endif
- #if ((CAN_IPW_SW_MAJOR_VERSION_H != CAN_IPW_CFG_SW_MAJOR_VERSION) || \
- (CAN_IPW_SW_MINOR_VERSION_H != CAN_IPW_CFG_SW_MINOR_VERSION) || \
- (CAN_IPW_SW_PATCH_VERSION_H != CAN_IPW_CFG_SW_PATCH_VERSION))
- #error "Software Version Numbers of Can_Ipw.h and Can_Ipw_Cfg.h are different"
- #endif
- #if (CAN_IPW_VENDOR_ID_H != CAN_FLEXCAN_TYPES_VENDOR_ID_H)
- #error "Can_Ipw.h and Can_Flexcan_Types.h have different vendor ids"
- #endif
- #if ((CAN_IPW_AR_RELEASE_MAJOR_VERSION_H != CAN_FLEXCAN_TYPES_AR_RELEASE_MAJOR_VERSION_H) || \
- (CAN_IPW_AR_RELEASE_MINOR_VERSION_H != CAN_FLEXCAN_TYPES_AR_RELEASE_MINOR_VERSION_H) || \
- (CAN_IPW_AR_RELEASE_REVISION_VERSION_H != CAN_FLEXCAN_TYPES_AR_RELEASE_REVISION_VERSION_H))
- #error "AutoSar Version Numbers of Can_Ipw.h and Can_Flexcan_Types.h are different"
- #endif
- #if ((CAN_IPW_SW_MAJOR_VERSION_H != CAN_FLEXCAN_TYPES_SW_MAJOR_VERSION_H) || \
- (CAN_IPW_SW_MINOR_VERSION_H != CAN_FLEXCAN_TYPES_SW_MINOR_VERSION_H) || \
- (CAN_IPW_SW_PATCH_VERSION_H != CAN_FLEXCAN_TYPES_SW_PATCH_VERSION_H))
- #error "Software Version Numbers of Can_Ipw.h and Can_Flexcan_Types.h are different"
- #endif
- #define Call_Can_FlexCan_Init(instance, status, Can_pControllerConfig) FlexCAN_Ip_Init(instance, status, Can_pControllerConfig)
- #define CAN_START_SEC_CODE
- #include "Can_MemMap.h"
- Std_ReturnType Can_Ipw_Init(const Can_ControllerConfigType * Can_pControllerConfig);
- Std_ReturnType Can_Ipw_InitRx(const Can_ControllerConfigType * Can_pController);
- void Can_Ipw_DeInit(const Can_ControllerConfigType * Can_pControllerConfig);
- #if (CAN_SET_BAUDRATE_API == STD_ON)
- Std_ReturnType Can_Ipw_SetBaudrate
- (
- const Can_ControllerConfigType * Can_pControllerConfig,
- uint16 BaudRateConfigID
- );
- #endif
- Std_ReturnType Can_Ipw_SetControllerToStartMode(const Can_ControllerConfigType * Can_pControllerConfig);
- Std_ReturnType Can_Ipw_SetControllerToStopMode(const Can_ControllerConfigType * Can_pControllerConfig);
- void Can_Ipw_DisableControllerInterrupts(const Can_ControllerConfigType * Can_pControllerConfig);
- void Can_Ipw_EnableControllerInterrupts(const Can_ControllerConfigType * Can_pControllerConfig);
- uint8 Can_Ipw_GetControllerErrorState(const Can_ControllerConfigType * Can_pControllerConfig);
- uint8 Can_Ipw_GetControllerRxErrorCounter(const Can_ControllerConfigType * Can_pControllerConfig);
- uint8 Can_Ipw_GetControllerTxErrorCounter(const Can_ControllerConfigType * Can_pControllerConfig);
- #if (CAN_LISTEN_ONLY_MODE == STD_ON)
- Std_ReturnType Can_Ipw_ListenOnlyMode(const Can_ControllerConfigType * Can_pControllerConfig, const Can_ListenOnlyType State);
- #endif
- Std_ReturnType Can_Ipw_Write
- (
- const Can_ControllerConfigType * Can_pControllerConfig,
- const Can_HwObjectConfigType * Can_pHwObjectConfig,
- const Can_PduType * PduInfo
- );
- #if (CAN_ABORT_MB_API == STD_ON)
-
- void Can_Ipw_AbortMb
- (
- const Can_ControllerConfigType * Can_pControllerConfig,
- const Can_HwObjectConfigType * Can_pHwObjectConfig
- );
- #endif
- #if (CAN_DUAL_CLOCK_MODE == STD_ON)
-
- void Can_Ipw_SetClockMode
- (
- const Can_ControllerConfigType * Can_pControllerConfig,
- uint16 Can_u16BaudrateID,
- Can_ClockModeType Can_eClkMode
- );
- #endif
- void Can_Ipw_MainFunction_Write
- (
- const Can_ControllerConfigType * Can_pControllerConfig,
- const Can_HwObjectConfigType * Can_pHwObjectConfig
- );
- void Can_Ipw_MainFunction_Read
- (
- const Can_ControllerConfigType * Can_pControllerConfig,
- const Can_HwObjectConfigType * Can_pHwObjectConfig
- );
- void Can_Ipw_MainFunction_BusOff(const Can_ControllerConfigType * Can_pControllerConfig);
- void Can_Ipw_MainFunction_Mode
- (
- const Can_ControllerConfigType * Can_pControllerConfig,
- Can_ControllerStateType * Can_pControllerState
- );
- #if (CAN_MB_INTERRUPT_SUPPORT == STD_ON)
-
- void Can_Ipw_ProcessTxMesgBuffer
- (
- const Can_ControllerConfigType * Can_pControllerConfig,
- const Can_HwObjectConfigType * Can_pHwObjectConfig,
- uint8 u8MbIdx
- );
-
- void Can_Ipw_ProcessRxMesgBuffer
- (
- const Can_ControllerConfigType * Can_pControllerConfig,
- const Can_HwObjectConfigType * Can_pHwObjectConfig,
- uint8 u8MbIdx
- );
- #if (CAN_ENHANCED_FIFO_ENABLED == STD_ON)
-
- void Can_Ipw_ProcessRxEnhance
- (
- const Can_ControllerConfigType * Can_pControllerConfig,
- const Can_HwObjectConfigType * Can_pHwObjectConfig,
- uint8 u8Event
- );
- #endif
- #if (FLEXCAN_IP_FEATURE_HAS_DMA_ENABLE == STD_ON)
- void Can_Ipw_ProcessRxLegacyDma
- (
- const Can_ControllerConfigType * Can_pControllerConfig,
- const Can_HwObjectConfigType * Can_pHwObjectConfig,
- uint8 u8Event
- );
- #endif
- #endif
- #if (CAN_PUBLIC_ICOM_SUPPORT == STD_ON)
- Std_ReturnType Can_Ipw_DeactivateIcomConfiguration(const Can_ControllerConfigType * Can_pControllerConfig);
- Std_ReturnType Can_Ipw_SetIcomConfiguration(const Can_ControllerConfigType * Can_pControllerConfig, const Can_IcomConfigsType * pIcomConfig);
- void Can_Ipw_ProcessPN(const Can_ControllerConfigType * Can_pControllerConfig, const Can_IcomConfigsType * pIcomConfig);
- #endif
- #define CAN_STOP_SEC_CODE
- #include "Can_MemMap.h"
- #ifdef __cplusplus
- }
- #endif
- #endif
|