1 /* 2 * Copyright 2023 NXP 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 /** 8 * @file OsIf_Cfg.h 9 * @version 2.0.0 10 * 11 * 12 * @addtogroup OSIF_DRIVER 13 * @{ 14 */ 15 16 #ifndef OSIF_CFG_H 17 #define OSIF_CFG_H 18 19 #ifdef __cplusplus 20 extern "C"{ 21 #endif 22 23 /*================================================================================================== 24 INCLUDE FILES 25 1) system and project includes 26 2) needed interfaces from external units 27 3) internal and external interfaces from this unit 28 ==================================================================================================*/ 29 #include "OsIf_ArchCfg.h" 30 #include "StandardTypes.h" 31 32 #include "S32K146_SYSTICK.h" 33 /*================================================================================================== 34 * SOURCE FILE VERSION INFORMATION 35 ==================================================================================================*/ 36 #define OSIF_CFG_VENDOR_ID 43 37 #define OSIF_CFG_AR_RELEASE_MAJOR_VERSION 4 38 #define OSIF_CFG_AR_RELEASE_MINOR_VERSION 7 39 #define OSIF_CFG_AR_RELEASE_REVISION_VERSION 0 40 #define OSIF_CFG_SW_MAJOR_VERSION 2 41 #define OSIF_CFG_SW_MINOR_VERSION 0 42 #define OSIF_CFG_SW_PATCH_VERSION 0 43 44 /*================================================================================================== 45 * FILE VERSION CHECKS 46 ==================================================================================================*/ 47 /* Check if OsIf_Cfg.h file and OsIf_ArchCfg.h file are of the same vendor */ 48 #if (OSIF_CFG_VENDOR_ID != OSIF_ARCHCFG_VENDOR_ID) 49 #error "OsIf_Cfg.h and OsIf_ArchCfg.h have different vendor ids" 50 #endif 51 /* Check if OsIf_Cfg.h file and OsIf_ArchCfg.h file are of the same Autosar version */ 52 #if ((OSIF_CFG_AR_RELEASE_MAJOR_VERSION != OSIF_ARCHCFG_AR_RELEASE_MAJOR_VERSION) || \ 53 (OSIF_CFG_AR_RELEASE_MINOR_VERSION != OSIF_ARCHCFG_AR_RELEASE_MINOR_VERSION) || \ 54 (OSIF_CFG_AR_RELEASE_REVISION_VERSION != OSIF_ARCHCFG_AR_RELEASE_REVISION_VERSION)) 55 #error "AUTOSAR Version Numbers of OsIf_Cfg.h and OsIf_ArchCfg.h are different" 56 #endif 57 /* Check if OsIf_Cfg.h file and OsIf_ArchCfg.h file are of the same Software version */ 58 #if ((OSIF_CFG_SW_MAJOR_VERSION != OSIF_ARCHCFG_SW_MAJOR_VERSION) || \ 59 (OSIF_CFG_SW_MINOR_VERSION != OSIF_ARCHCFG_SW_MINOR_VERSION) || \ 60 (OSIF_CFG_SW_PATCH_VERSION != OSIF_ARCHCFG_SW_PATCH_VERSION)) 61 #error "Software Version Numbers of OsIf_Cfg.h and OsIf_ArchCfg.h are different" 62 #endif 63 64 /* Check if OsIf_Cfg.h file and StandardTypes.h file are of the same Autosar version */ 65 #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK 66 #if ((OSIF_CFG_AR_RELEASE_MAJOR_VERSION != STD_AR_RELEASE_MAJOR_VERSION) || \ 67 (OSIF_CFG_AR_RELEASE_MINOR_VERSION != STD_AR_RELEASE_MINOR_VERSION)) 68 #error "AutoSar Version Numbers of OsIf_Cfg.h and StandardTypes.h are different" 69 #endif 70 #endif /* DISABLE_MCAL_INTERMODULE_ASR_CHECK */ 71 /*================================================================================================== 72 * CONSTANTS 73 ==================================================================================================*/ 74 75 /*================================================================================================== 76 * DEFINES AND MACROS 77 ==================================================================================================*/ 78 /* General OSIF configuration */ 79 #define OSIF_MODULE_ID (255U) 80 81 #define OSIF_DRIVER_INSTANCE (255U) 82 83 #define OSIF_ENABLE_USER_MODE_SUPPORT (STD_OFF) 84 85 #ifndef MCAL_ENABLE_USER_MODE_SUPPORT 86 #if (STD_ON == OSIF_ENABLE_USER_MODE_SUPPORT) 87 #error MCAL_ENABLE_USER_MODE_SUPPORT is not enabled. For running OsIf in user mode, MCAL_ENABLE_USER_MODE_SUPPORT needs to be defined. 88 #endif /* (STD_ON == OSIF_ENABLE_USER_MODE_SUPPORT */ 89 #endif /* ifndef MCAL_ENABLE_USER_MODE_SUPPORT */ 90 91 #define OSIF_ENABLE_MULTICORE_SUPPORT (STD_OFF) 92 93 #define OSIF_MAX_COREIDX_SUPPORTED (1U) 94 95 #define OSIF_DEV_ERROR_DETECT (STD_OFF) 96 97 #define USING_OS_ZEPHYR 98 99 #define OSIF_USE_SYSTEM_TIMER (STD_OFF) 100 101 #define OSIF_USE_CUSTOM_TIMER (STD_OFF) 102 103 /* Autosar OS Specific */ 104 105 /* Baremetal Specific */ 106 107 /*================================================================================================== 108 * ENUMS 109 ==================================================================================================*/ 110 111 /*================================================================================================== 112 * STRUCTURES AND OTHER TYPEDEFS 113 ==================================================================================================*/ 114 115 /*================================================================================================== 116 * GLOBAL VARIABLE DECLARATIONS 117 ==================================================================================================*/ 118 119 /*================================================================================================== 120 GLOBAL CONSTANTS 121 ==================================================================================================*/ 122 123 /*================================================================================================== 124 * FUNCTION PROTOTYPES 125 ==================================================================================================*/ 126 127 128 #ifdef __cplusplus 129 } 130 #endif /* __cplusplus */ 131 #endif /* OSIF_CFG_H */ 132 /** @} */ 133 134