123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315 |
- #ifndef LPTMR_GPT_IP_H
- #define LPTMR_GPT_IP_H
- #ifdef __cplusplus
- extern "C"{
- #endif
- #include "Lptmr_Gpt_Ip_Types.h"
- #include "Lptmr_Gpt_Ip_Cfg.h"
- #include "OsIf.h"
- #include "Mcal.h"
- #include "SchM_Gpt.h"
- #if LPTMR_GPT_IP_DEV_ERROR_DETECT == STD_ON
- #include "Devassert.h"
- #endif
- #if (LPTMR_GPT_IP_ENABLE_USER_MODE_SUPPORT == STD_ON)
- #include "Reg_eSys.h"
- #endif
- #define LPTMR_GPT_IP_VENDOR_ID 43
- #define LPTMR_GPT_IP_AR_RELEASE_MAJOR_VERSION 4
- #define LPTMR_GPT_IP_AR_RELEASE_MINOR_VERSION 4
- #define LPTMR_GPT_IP_AR_RELEASE_REVISION_VERSION 0
- #define LPTMR_GPT_IP_SW_MAJOR_VERSION 1
- #define LPTMR_GPT_IP_SW_MINOR_VERSION 0
- #define LPTMR_GPT_IP_SW_PATCH_VERSION 0
- #if (LPTMR_GPT_IP_VENDOR_ID != LPTMR_GPT_IP_TYPES_VENDOR_ID)
- #error "Lptmr_Gpt_Ip.h and Lptmr_Gpt_Ip_Types.h have different vendor ids"
- #endif
- #if ((LPTMR_GPT_IP_AR_RELEASE_MAJOR_VERSION != LPTMR_GPT_IP_TYPES_AR_RELEASE_MAJOR_VERSION) || \
- (LPTMR_GPT_IP_AR_RELEASE_MINOR_VERSION != LPTMR_GPT_IP_TYPES_AR_RELEASE_MINOR_VERSION) || \
- (LPTMR_GPT_IP_AR_RELEASE_REVISION_VERSION != LPTMR_GPT_IP_TYPES_AR_RELEASE_REVISION_VERSION) \
- )
- #error "AutoSar Version Numbers of Lptmr_Gpt_Ip.h and Lptmr_Gpt_Ip_Types.h are different"
- #endif
- #if ((LPTMR_GPT_IP_SW_MAJOR_VERSION != LPTMR_GPT_IP_TYPES_SW_MAJOR_VERSION) || \
- (LPTMR_GPT_IP_SW_MINOR_VERSION != LPTMR_GPT_IP_TYPES_SW_MINOR_VERSION) || \
- (LPTMR_GPT_IP_SW_PATCH_VERSION != LPTMR_GPT_IP_TYPES_SW_PATCH_VERSION) \
- )
- #error "Software Version Numbers of Lptmr_Gpt_Ip.h and Lptmr_Gpt_Ip_Types.h are different"
- #endif
- #if (LPTMR_GPT_IP_VENDOR_ID != LPTMR_GPT_IP_VENDOR_ID_CFG)
- #error "Lptmr_Gpt_Ip.h and Lptmr_Gpt_Ip_Cfg.h have different vendor ids"
- #endif
- #if ((LPTMR_GPT_IP_AR_RELEASE_MAJOR_VERSION != LPTMR_GPT_IP_AR_RELEASE_MAJOR_VERSION_CFG) || \
- (LPTMR_GPT_IP_AR_RELEASE_MINOR_VERSION != LPTMR_GPT_IP_AR_RELEASE_MINOR_VERSION_CFG) || \
- (LPTMR_GPT_IP_AR_RELEASE_REVISION_VERSION != LPTMR_GPT_IP_AR_RELEASE_REVISION_VERSION_CFG) \
- )
- #error "AutoSar Version Numbers of Lptmr_Gpt_Ip.h and Lptmr_Gpt_Ip_Cfg.h are different"
- #endif
- #if ((LPTMR_GPT_IP_SW_MAJOR_VERSION != LPTMR_GPT_IP_SW_MAJOR_VERSION_CFG) || \
- (LPTMR_GPT_IP_SW_MINOR_VERSION != LPTMR_GPT_IP_SW_MINOR_VERSION_CFG) || \
- (LPTMR_GPT_IP_SW_PATCH_VERSION != LPTMR_GPT_IP_SW_PATCH_VERSION_CFG) \
- )
- #error "Software Version Numbers of Lptmr_Gpt_Ip.h and Lptmr_Gpt_Ip_Cfg.h are different"
- #endif
- #if (LPTMR_GPT_IP_ENABLE_USER_MODE_SUPPORT == STD_ON)
- #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
- #if ((LPTMR_GPT_IP_AR_RELEASE_MAJOR_VERSION != REG_ESYS_AR_RELEASE_MAJOR_VERSION) || \
- (LPTMR_GPT_IP_AR_RELEASE_MINOR_VERSION != REG_ESYS_AR_RELEASE_MINOR_VERSION))
- #error "AutoSar Version Numbers of Lptmr_Gpt_Ip.h and Reg_eSys.h are different"
- #endif
- #endif
- #endif
- #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
- #if ((LPTMR_GPT_IP_AR_RELEASE_MAJOR_VERSION != SCHM_GPT_AR_RELEASE_MAJOR_VERSION) || \
- (LPTMR_GPT_IP_AR_RELEASE_MINOR_VERSION != SCHM_GPT_AR_RELEASE_MINOR_VERSION))
- #error "AutoSar Version Numbers of Lptmr_Gpt_Ip.h and SchM_Gpt.h are different"
- #endif
-
- #if ((LPTMR_GPT_IP_AR_RELEASE_MAJOR_VERSION != OSIF_AR_RELEASE_MAJOR_VERSION) || \
- (LPTMR_GPT_IP_AR_RELEASE_MINOR_VERSION != OSIF_AR_RELEASE_MINOR_VERSION))
- #error "AutoSar Version Numbers of Lptmr_Gpt_Ip.h and OsIf.h are different"
- #endif
- #endif
- #if LPTMR_GPT_IP_DEV_ERROR_DETECT == STD_ON
- #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
- #if ((LPTMR_GPT_IP_AR_RELEASE_MAJOR_VERSION != DEVASSERT_AR_RELEASE_MAJOR_VERSION) || \
- (LPTMR_GPT_IP_AR_RELEASE_MINOR_VERSION != DEVASSERT_AR_RELEASE_MINOR_VERSION))
- #error "AutoSar Version Numbers of Lptmr_Gpt_Ip.h and Devassert.h are different"
- #endif
- #endif
- #endif
- #if (LPTMR_GPT_IP_USED == STD_ON)
- #define LPTMR_GPT_IP_TM_MODE ((uint32)(0x00))
- extern LPTMR_Type * const lptmrGptBase[LPTMR_INSTANCE_COUNT];
- uint32 Lptmr_Gpt_Ip_GetCompareValue(uint8 instance);
- boolean Lptmr_Gpt_Ip_GetCmpFlagState(uint8 instance);
- uint32 Lptmr_Gpt_Ip_GetCntValue(uint8 instance);
- void Lptmr_Gpt_Ip_WriteCounterValue(uint8 instance, uint16 value);
- #define GPT_START_SEC_CODE
- #include "Gpt_MemMap.h"
- void Lptmr_Gpt_Ip_Init(uint8 instance, const Lptmr_Gpt_Ip_ConfigType *config);
- void Lptmr_Gpt_Ip_DeInit(uint8 instance);
- void Lptmr_Gpt_Ip_StartTimer(uint8 instance, uint16 value);
- void Lptmr_Gpt_Ip_StopTimer(uint8 instance);
- void Lptmr_Gpt_Ip_EnableInterrupt(uint8 instance);
- Lptmr_Gpt_Ip_StatusType Lptmr_Gpt_Ip_SetCompareValue(uint8 instance,
- uint16 compareValue);
- void Lptmr_Gpt_Ip_DisableInterrupt(uint8 instance);
- #if (LPTMR_GPT_IP_SET_CLOCK_MODE == STD_ON)
- void Lptmr_Gpt_Ip_SetClockMode(uint8 instance, Lptmr_Gpt_Ip_ClockModeType clockMode);
- #endif
- #define GPT_STOP_SEC_CODE
- #include "Gpt_MemMap.h"
- #ifdef __cplusplus
- }
- #endif
- #endif
- #endif
|