123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497 |
- #ifndef PORT_H
- #define PORT_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "StandardTypes.h"
- #include "Port_Cfg.h"
- #include "Port_Ipw.h"
- #include "Mcal.h"
- #define PORT_VENDOR_ID_H 43
- #define PORT_MODULE_ID 124
- #define PORT_AR_RELEASE_MAJOR_VERSION_H 4
- #define PORT_AR_RELEASE_MINOR_VERSION_H 4
- #define PORT_AR_RELEASE_REVISION_VERSION_H 0
- #define PORT_SW_MAJOR_VERSION_H 1
- #define PORT_SW_MINOR_VERSION_H 0
- #define PORT_SW_PATCH_VERSION_H 0
- #if (PORT_VENDOR_ID_H != PORT_VENDOR_ID_CFG_H)
- #error "Port.h and Port_Cfg.h have different vendor ids"
- #endif
- #if ((PORT_AR_RELEASE_MAJOR_VERSION_H != PORT_AR_RELEASE_MAJOR_VERSION_CFG_H) || \
- (PORT_AR_RELEASE_MINOR_VERSION_H != PORT_AR_RELEASE_MINOR_VERSION_CFG_H) || \
- (PORT_AR_RELEASE_REVISION_VERSION_H != PORT_AR_RELEASE_REVISION_VERSION_CFG_H) \
- )
- #error "AutoSar Version Numbers of Port.h and Port_Cfg.h are different"
- #endif
- #if ((PORT_SW_MAJOR_VERSION_H != PORT_SW_MAJOR_VERSION_CFG_H) || \
- (PORT_SW_MINOR_VERSION_H != PORT_SW_MINOR_VERSION_CFG_H) || \
- (PORT_SW_PATCH_VERSION_H != PORT_SW_PATCH_VERSION_CFG_H) \
- )
- #error "Software Version Numbers of Port.h and Port_Cfg.h are different"
- #endif
- #if (PORT_VENDOR_ID_H != PORT_VENDOR_ID_IPW_H)
- #error "Port.h and Port_Ipw.h have different vendor ids"
- #endif
- #if ((PORT_AR_RELEASE_MAJOR_VERSION_H != PORT_AR_RELEASE_MAJOR_VERSION_IPW_H) || \
- (PORT_AR_RELEASE_MINOR_VERSION_H != PORT_AR_RELEASE_MINOR_VERSION_IPW_H) || \
- (PORT_AR_RELEASE_REVISION_VERSION_H != PORT_AR_RELEASE_REVISION_VERSION_IPW_H) \
- )
- #error "AutoSar Version Numbers of Port.h and Port_Ipw.h are different"
- #endif
- #if ((PORT_SW_MAJOR_VERSION_H != PORT_SW_MAJOR_VERSION_IPW_H) || \
- (PORT_SW_MINOR_VERSION_H != PORT_SW_MINOR_VERSION_IPW_H) || \
- (PORT_SW_PATCH_VERSION_H != PORT_SW_PATCH_VERSION_IPW_H) \
- )
- #error "Software Version Numbers of Port.h and Port_Ipw.h are different"
- #endif
- #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
-
- #if ((PORT_AR_RELEASE_MAJOR_VERSION_H != STD_AR_RELEASE_MAJOR_VERSION) || \
- (PORT_AR_RELEASE_MINOR_VERSION_H != STD_AR_RELEASE_MINOR_VERSION) \
- )
- #error "AutoSar Version Numbers of Port.h and StandardTypes.h are different"
- #endif
-
- #if ((PORT_AR_RELEASE_MAJOR_VERSION_H != MCAL_AR_RELEASE_MAJOR_VERSION) || \
- (PORT_AR_RELEASE_MINOR_VERSION_H != MCAL_AR_RELEASE_MINOR_VERSION) \
- )
- #error "AutoSar Version Numbers of Port.h and Mcal.h are different"
- #endif
- #endif
- #define PORT_E_PARAM_CONFIG ((uint8)0xF0)
- #define PORT_INSTANCE_ID ((uint8)0x0)
- #define PORT_INIT_ID ((uint8)0x00)
- #define PORT_SETPINDIRECTION_ID ((uint8)0x01)
- #define PORT_REFRESHPINDIRECTION_ID ((uint8)0x02)
- #define PORT_GETVERSIONINFO_ID ((uint8)0x03)
- #define PORT_SETPINMODE_ID ((uint8)0x04)
- #define PORT_SETASUNUSEDPIN_ID ((uint8)0x05)
- #define PORT_SETASUSEDPIN_ID ((uint8)0x06)
- #define PORT_RESETPINMODE_ID ((uint8)0x07)
- #ifdef PORT_SET_2_PINS_DIRECTION_API
- #if (STD_ON == PORT_SET_2_PINS_DIRECTION_API)
- #define PORT_SET2PINSDIRECTION_ID ((uint8)0x08)
- #endif
- #endif
- #define PORT_E_PARAM_PIN ((uint8)0x0A)
- #define PORT_E_DIRECTION_UNCHANGEABLE ((uint8)0x0B)
- #define PORT_E_INIT_FAILED ((uint8)0x0C)
- #define PORT_E_PARAM_INVALID_MODE ((uint8)0x0D)
- #define PORT_E_MODE_UNCHANGEABLE ((uint8)0x0E)
- #define PORT_E_UNINIT ((uint8)0x0F)
- #define PORT_E_PARAM_POINTER ((uint8)0x10)
- #define PORT_START_SEC_CONFIG_DATA_UNSPECIFIED
- #include "Port_MemMap.h"
- PORT_CONFIG_EXT
- #define PORT_STOP_SEC_CONFIG_DATA_UNSPECIFIED
- #include "Port_MemMap.h"
- #define PORT_START_SEC_CODE
- #include "Port_MemMap.h"
- void Port_Init
- (
- const Port_ConfigType * ConfigPtr
- );
- #if (STD_ON == PORT_SET_PIN_DIRECTION_API)
- void Port_SetPinDirection
- (
- Port_PinType Pin,
- Port_PinDirectionType Direction
- );
- #endif
- #ifdef PORT_SET_2_PINS_DIRECTION_API
- #if (STD_ON == PORT_SET_2_PINS_DIRECTION_API)
- void Port_Set2PinsDirection
- (
- Port_PinType Pin1,
- Port_PinType Pin2,
- Port_PinDirectionType Direction
- );
- #endif
- #endif
- #if (STD_ON == PORT_SET_PIN_MODE_API)
- void Port_SetPinMode
- (
- Port_PinType Pin,
- Port_PinModeType Mode
- );
- #endif
- #if (STD_ON == PORT_VERSION_INFO_API)
- void Port_GetVersionInfo
- (
- Std_VersionInfoType * versioninfo
- );
- #endif
- void Port_RefreshPortDirection(void);
- #ifdef PORT_SET_AS_UNUSED_PIN_API
- #if (STD_ON == PORT_SET_AS_UNUSED_PIN_API)
- void Port_SetAsUnusedPin
- (
- Port_PinType Pin
- );
- void Port_SetAsUsedPin
- (
- Port_PinType Pin
- );
- #endif
- #endif
- #ifdef PORT_RESET_PIN_MODE_API
- #if (STD_ON == PORT_RESET_PIN_MODE_API)
- void Port_ResetPinMode
- (
- Port_PinType Pin
- );
- #endif
- #endif
- #define PORT_STOP_SEC_CODE
- #include "Port_MemMap.h"
- #ifdef __cplusplus
- }
- #endif
- #endif
|