123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228 |
- #ifndef CMP_IP_H
- #define CMP_IP_H
- #ifdef __cplusplus
- extern "C"{
- #endif
- #include "Cmp_Ip_Types.h"
- #include "Cmp_Ip_Cfg.h"
- #include "OsIf.h"
- #define CMP_IP_VENDOR_ID 43
- #define CMP_IP_AR_RELEASE_MAJOR_VERSION 4
- #define CMP_IP_AR_RELEASE_MINOR_VERSION 4
- #define CMP_IP_AR_RELEASE_REVISION_VERSION 0
- #define CMP_IP_SW_MAJOR_VERSION 1
- #define CMP_IP_SW_MINOR_VERSION 0
- #define CMP_IP_SW_PATCH_VERSION 0
- #if (CMP_IP_VENDOR_ID != CMP_IP_TYPES_VENDOR_ID)
- #error "Cmp_Ip.h and Cmp_Ip_Types.h have different vendor IDs"
- #endif
- #if ((CMP_IP_AR_RELEASE_MAJOR_VERSION != CMP_IP_TYPES_AR_RELEASE_MAJOR_VERSION) || \
- (CMP_IP_AR_RELEASE_MINOR_VERSION != CMP_IP_TYPES_AR_RELEASE_MINOR_VERSION) || \
- (CMP_IP_AR_RELEASE_REVISION_VERSION != CMP_IP_TYPES_AR_RELEASE_REVISION_VERSION))
- #error "AutoSar Version Numbers of Cmp_Ip.h and Cmp_Ip_Types.h are different"
- #endif
- #if ((CMP_IP_SW_MAJOR_VERSION != CMP_IP_TYPES_SW_MAJOR_VERSION) || \
- (CMP_IP_SW_MINOR_VERSION != CMP_IP_TYPES_SW_MINOR_VERSION) || \
- (CMP_IP_SW_PATCH_VERSION != CMP_IP_TYPES_SW_PATCH_VERSION))
- #error "Software Version Numbers of Cmp_Ip.h and Cmp_Ip_Types.h are different"
- #endif
- #if (CMP_IP_VENDOR_ID != CMP_IP_CFG_VENDOR_ID)
- #error "Cmp_Ip.h and Cmp_Ip_Cfg.h have different vendor IDs"
- #endif
- #if ((CMP_IP_AR_RELEASE_MAJOR_VERSION != CMP_IP_CFG_AR_RELEASE_MAJOR_VERSION) || \
- (CMP_IP_AR_RELEASE_MINOR_VERSION != CMP_IP_CFG_AR_RELEASE_MINOR_VERSION) || \
- (CMP_IP_AR_RELEASE_REVISION_VERSION != CMP_IP_CFG_AR_RELEASE_REVISION_VERSION))
- #error "AutoSar Version Numbers of Cmp_Ip.h and Cmp_Ip_Cfg.h are different"
- #endif
- #if ((CMP_IP_SW_MAJOR_VERSION != CMP_IP_CFG_SW_MAJOR_VERSION) || \
- (CMP_IP_SW_MINOR_VERSION != CMP_IP_CFG_SW_MINOR_VERSION) || \
- (CMP_IP_SW_PATCH_VERSION != CMP_IP_CFG_SW_PATCH_VERSION))
- #error "Software Version Numbers of Cmp_Ip.h and Cmp_Ip_Cfg.h are different"
- #endif
- #if (defined CMP_CONFIG_EXT)
- #define ICU_START_SEC_CONFIG_DATA_UNSPECIFIED
- #include "Icu_MemMap.h"
- CMP_CONFIG_EXT
- #define ICU_STOP_SEC_CONFIG_DATA_UNSPECIFIED
- #include "Icu_MemMap.h"
- #endif
- #define ICU_START_SEC_CODE
- #include "Icu_MemMap.h"
- Cmp_Ip_StatusType Cmp_Ip_Init(uint8 instance, const Cmp_Ip_ConfigType* userConfig);
- Cmp_Ip_StatusType Cmp_Ip_Deinit(uint8 instance);
- void Cmp_Ip_EnableNotification(uint8 instance);
- void Cmp_Ip_DisableNotification(uint8 instance);
- void Cmp_Ip_SetInterruptActivation(uint8 instance, Cmp_Ip_OutputInterruptTriggerType Edge);
- void Cmp_Ip_EnableInterrupt(uint8 instance);
- void Cmp_Ip_DisableInterrupt(uint8 instance);
- #if (CMP_ICU_GET_INPUT_STATE_API == STD_ON)
- boolean Cmp_Ip_GetStatus(uint8 instance);
- #endif
- #if (defined(ICU_CMP_0_ISR_USED))
- ISR(CMP_0_ISR);
- #endif
- #if (defined(ICU_CMP_1_ISR_USED))
- ISR(CMP_1_ISR);
- #endif
- #if (defined(ICU_CMP_2_ISR_USED))
- ISR(CMP_2_ISR);
- #endif
- #define ICU_STOP_SEC_CODE
- #include "Icu_MemMap.h"
- #ifdef __cplusplus
- }
- #endif
- #endif
|