123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- #ifndef OSIF_H
- #define OSIF_H
- #ifdef __cplusplus
- extern "C"{
- #endif
- #include "OsIf_Internal.h"
- #include "OsIf_Cfg.h"
- #define OSIF_VENDOR_ID 43
- #define OSIF_AR_RELEASE_MAJOR_VERSION 4
- #define OSIF_AR_RELEASE_MINOR_VERSION 4
- #define OSIF_AR_RELEASE_REVISION_VERSION 0
- #define OSIF_SW_MAJOR_VERSION 1
- #define OSIF_SW_MINOR_VERSION 0
- #define OSIF_SW_PATCH_VERSION 0
- #if (OSIF_VENDOR_ID != OSIF_INTERNAL_VENDOR_ID)
- #error "OsIf.h and OsIf_Internal.h have different vendor ids"
- #endif
- #if ((OSIF_AR_RELEASE_MAJOR_VERSION != OSIF_INTERNAL_AR_RELEASE_MAJOR_VERSION) || \
- (OSIF_AR_RELEASE_MINOR_VERSION != OSIF_INTERNAL_AR_RELEASE_MINOR_VERSION) || \
- (OSIF_AR_RELEASE_REVISION_VERSION != OSIF_INTERNAL_AR_RELEASE_REVISION_VERSION))
- #error "AUTOSAR Version Numbers of OsIf.h and OsIf_Internal.h are different"
- #endif
- #if ((OSIF_SW_MAJOR_VERSION != OSIF_INTERNAL_SW_MAJOR_VERSION) || \
- (OSIF_SW_MINOR_VERSION != OSIF_INTERNAL_SW_MINOR_VERSION) || \
- (OSIF_SW_PATCH_VERSION != OSIF_INTERNAL_SW_PATCH_VERSION) \
- )
- #error "Software Version Numbers of OsIf.h and OsIf_Internal.h are different"
- #endif
- #if (OSIF_VENDOR_ID != OSIF_CFG_VENDOR_ID)
- #error "OsIf.h and OsIf_Cfg.h have different vendor ids"
- #endif
- #if ((OSIF_AR_RELEASE_MAJOR_VERSION != OSIF_CFG_AR_RELEASE_MAJOR_VERSION) || \
- (OSIF_AR_RELEASE_MINOR_VERSION != OSIF_CFG_AR_RELEASE_MINOR_VERSION) || \
- (OSIF_AR_RELEASE_REVISION_VERSION != OSIF_CFG_AR_RELEASE_REVISION_VERSION))
- #error "AUTOSAR Version Numbers of OsIf.h and OsIf_Cfg.h are different"
- #endif
- #if ((OSIF_SW_MAJOR_VERSION != OSIF_CFG_SW_MAJOR_VERSION) || \
- (OSIF_SW_MINOR_VERSION != OSIF_CFG_SW_MINOR_VERSION) || \
- (OSIF_SW_PATCH_VERSION != OSIF_CFG_SW_PATCH_VERSION) \
- )
- #error "Software Version Numbers of OsIf.h and OsIf_Cfg.h are different"
- #endif
- typedef enum
- {
- OSIF_COUNTER_DUMMY,
- #if (OSIF_USE_SYSTEM_TIMER == STD_ON)
- OSIF_COUNTER_SYSTEM,
- #endif
- #if (OSIF_USE_CUSTOM_TIMER == STD_ON)
- OSIF_COUNTER_CUSTOM
- #endif
- } OsIf_CounterType;
- #define BASE_START_SEC_CODE
- #include "Base_MemMap.h"
- void OsIf_Init(const void* Config);
- uint32 OsIf_GetCounter(OsIf_CounterType SelectedCounter);
- uint32 OsIf_GetElapsed(uint32 * const CurrentRef, OsIf_CounterType SelectedCounter);
- void OsIf_SetTimerFrequency(uint32 Freq, OsIf_CounterType SelectedCounter);
- uint32 OsIf_MicrosToTicks(uint32 Micros, OsIf_CounterType SelectedCounter);
- #define BASE_STOP_SEC_CODE
- #include "Base_MemMap.h"
- #ifdef __cplusplus
- }
- #endif
- #endif
|