123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287 |
- #ifndef LPIT_GPT_IP_H
- #define LPIT_GPT_IP_H
- #ifdef __cplusplus
- extern "C"{
- #endif
- #include "LPit_Gpt_Ip_Types.h"
- #include "LPit_Gpt_Ip_Cfg.h"
- #include "OsIf.h"
- #include "Mcal.h"
- #include "SchM_Gpt.h"
- #if LPIT_GPT_IP_DEV_ERROR_DETECT == STD_ON
- #include "Devassert.h"
- #endif
- #if (LPIT_GPT_IP_ENABLE_USER_MODE_SUPPORT == STD_ON)
- #include "Reg_eSys.h"
- #endif
- #define LPIT_GPT_IP_VENDOR_ID 43
- #define LPIT_GPT_IP_AR_RELEASE_MAJOR_VERSION 4
- #define LPIT_GPT_IP_AR_RELEASE_MINOR_VERSION 4
- #define LPIT_GPT_IP_AR_RELEASE_REVISION_VERSION 0
- #define LPIT_GPT_IP_SW_MAJOR_VERSION 1
- #define LPIT_GPT_IP_SW_MINOR_VERSION 0
- #define LPIT_GPT_IP_SW_PATCH_VERSION 0
- #if (LPIT_GPT_IP_VENDOR_ID != LPIT_GPT_IP_TYPES_VENDOR_ID)
- #error "LPit_Gpt_Ip.h and LPit_Gpt_Ip_Types.h have different vendor ids"
- #endif
- #if ((LPIT_GPT_IP_AR_RELEASE_MAJOR_VERSION != LPIT_GPT_IP_TYPES_AR_RELEASE_MAJOR_VERSION) || \
- (LPIT_GPT_IP_AR_RELEASE_MINOR_VERSION != LPIT_GPT_IP_TYPES_AR_RELEASE_MINOR_VERSION) || \
- (LPIT_GPT_IP_AR_RELEASE_REVISION_VERSION != LPIT_GPT_IP_TYPES_AR_RELEASE_REVISION_VERSION) \
- )
- #error "AutoSar Version Numbers of LPit_Gpt_Ip.h and LPit_Gpt_Ip_Types.h are different"
- #endif
- #if ((LPIT_GPT_IP_SW_MAJOR_VERSION != LPIT_GPT_IP_TYPES_SW_MAJOR_VERSION) || \
- (LPIT_GPT_IP_SW_MINOR_VERSION != LPIT_GPT_IP_TYPES_SW_MINOR_VERSION) || \
- (LPIT_GPT_IP_SW_PATCH_VERSION != LPIT_GPT_IP_TYPES_SW_PATCH_VERSION) \
- )
- #error "Software Version Numbers of LPit_Gpt_Ip.h and LPit_Gpt_Ip_Types.h are different"
- #endif
- #if (LPIT_GPT_IP_VENDOR_ID != LPIT_GPT_IP_VENDOR_ID_CFG)
- #error "LPit_Gpt_ip.h and LPit_Gpt_Ip_Cfg.h have different vendor ids"
- #endif
- #if ((LPIT_GPT_IP_AR_RELEASE_MAJOR_VERSION != LPIT_GPT_IP_AR_RELEASE_MAJOR_VERSION_CFG) || \
- (LPIT_GPT_IP_AR_RELEASE_MINOR_VERSION != LPIT_GPT_IP_AR_RELEASE_MINOR_VERSION_CFG) || \
- (LPIT_GPT_IP_AR_RELEASE_REVISION_VERSION != LPIT_GPT_IP_AR_RELEASE_REVISION_VERSION_CFG) \
- )
- #error "AutoSar Version Numbers of LPit_Gpt_Ip.h and LPit_Gpt_Ip_Cfg.h are different"
- #endif
- #if ((LPIT_GPT_IP_SW_MAJOR_VERSION != LPIT_GPT_IP_SW_MAJOR_VERSION_CFG) || \
- (LPIT_GPT_IP_SW_MINOR_VERSION != LPIT_GPT_IP_SW_MINOR_VERSION_CFG) || \
- (LPIT_GPT_IP_SW_PATCH_VERSION != LPIT_GPT_IP_SW_PATCH_VERSION_CFG) \
- )
- #error "Software Version Numbers of LPit_Gpt_Ip.h and LPit_Gpt_Ip_Cfg.h are different"
- #endif
- #if (LPIT_GPT_IP_ENABLE_USER_MODE_SUPPORT == STD_ON)
- #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
- #if ((LPIT_GPT_IP_AR_RELEASE_MAJOR_VERSION != REG_ESYS_AR_RELEASE_MAJOR_VERSION) || \
- (LPIT_GPT_IP_AR_RELEASE_MINOR_VERSION != REG_ESYS_AR_RELEASE_MINOR_VERSION))
- #error "AutoSar Version Numbers of LPit_Gpt_Ip.h and Reg_eSys.h are different"
- #endif
- #endif
- #endif
- #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
- #if ((LPIT_GPT_IP_AR_RELEASE_MAJOR_VERSION != SCHM_GPT_AR_RELEASE_MAJOR_VERSION) || \
- (LPIT_GPT_IP_AR_RELEASE_MINOR_VERSION != SCHM_GPT_AR_RELEASE_MINOR_VERSION))
- #error "AutoSar Version Numbers of LPit_Gpt_Ip.h and SchM_Gpt.h are different"
- #endif
-
- #if ((LPIT_GPT_IP_AR_RELEASE_MAJOR_VERSION != OSIF_AR_RELEASE_MAJOR_VERSION) || \
- (LPIT_GPT_IP_AR_RELEASE_MINOR_VERSION != OSIF_AR_RELEASE_MINOR_VERSION))
- #error "AutoSar Version Numbers of LPit_Gpt_Ip.h and OsIf.h are different"
- #endif
- #endif
- #if LPIT_GPT_IP_DEV_ERROR_DETECT == STD_ON
- #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
- #if ((LPIT_GPT_IP_AR_RELEASE_MAJOR_VERSION != DEVASSERT_AR_RELEASE_MAJOR_VERSION) || \
- (LPIT_GPT_IP_AR_RELEASE_MINOR_VERSION != DEVASSERT_AR_RELEASE_MINOR_VERSION))
- #error "AutoSar Version Numbers of LPit_Gpt_Ip.h and Devassert.h are different"
- #endif
- #endif
- #endif
- #if (LPIT_GPT_IP_USED == STD_ON)
- #define LPIT_MAX_VALUE (uint32)(0xFFFFFFFFuL)
- #define LPIT_MSR_TIF_GPT_MASK (uint32)0x1U
- #define LPIT_MIER_TIE_GPT_MASK (uint32)0x1U
- #define GPT_START_SEC_CODE
- #include "Gpt_MemMap.h"
- uint32 Lpit_Gpt_Ip_GetCurrentTimervalue(uint8 instance, uint8 channel);
- uint32 Lpit_Gpt_Ip_GetTimerValue(uint8 instance, uint8 channel);
- uint32 Lpit_Gpt_Ip_GetInterruptFlagTimerChannels(uint8 instance, uint8 channel);
- uint32 Lpit_Gpt_Ip_GetTimerInterruptEnable(uint8 instance, uint8 channel);
- extern LPIT_Type * const LPitGptBase[LPIT_INSTANCE_COUNT];
- void Lpit_Gpt_Ip_Init(uint8 instance, const Lpit_Gpt_Ip_InstanceConfigType *config);
- void Lpit_Gpt_Ip_InitChannel(uint8 instance, const Lpit_Gpt_Ip_ChannelConfigType *configChannel);
- void Lpit_Gpt_Ip_Deinit(uint8 instance);
- void Lpit_Gpt_Ip_StartTimer(uint8 instance, uint8 channel, uint32 countValue);
- void Lpit_Gpt_Ip_StopTimer(uint8 instance, uint8 channel);
- void Lpit_Gpt_Ip_EnableChInterrupt(uint8 instance, uint8 channel);
- void Lpit_Gpt_Ip_DisableChInterrupt(uint8 instance, uint8 channel);
- #if (LPIT_GPT_IP_CHAIN_MODE == STD_ON)
- Lpit_Gpt_Ip_StatusType Lpit_Gpt_Ip_ChainMode(uint8 instance, uint8 channel, boolean enable);
- #endif
- #define GPT_STOP_SEC_CODE
- #include "Gpt_MemMap.h"
- #endif
- #ifdef __cplusplus
- }
- #endif
- #endif
|