1 /* 2 * Copyright 2023 NXP 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 /** 8 * @file OsIf_Cfg.h 9 * @version 3.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 "S32K344_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 3 41 #define OSIF_CFG_SW_MINOR_VERSION 0 42 #define OSIF_CFG_SW_PATCH_VERSION 0 43 44 /*================================================================================================== 45 * FILE VERSION CHECKS 46 ==================================================================================================*/ 47 /* Checks against OsIf_ArchCfg.h */ 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 #if ((OSIF_CFG_AR_RELEASE_MAJOR_VERSION != OSIF_ARCHCFG_AR_RELEASE_MAJOR_VERSION) || \ 52 (OSIF_CFG_AR_RELEASE_MINOR_VERSION != OSIF_ARCHCFG_AR_RELEASE_MINOR_VERSION) || \ 53 (OSIF_CFG_AR_RELEASE_REVISION_VERSION != OSIF_ARCHCFG_AR_RELEASE_REVISION_VERSION)) 54 #error "AUTOSAR Version Numbers of OsIf_Cfg.h and OsIf_ArchCfg.h are different" 55 #endif 56 #if ((OSIF_CFG_SW_MAJOR_VERSION != OSIF_ARCHCFG_SW_MAJOR_VERSION) || \ 57 (OSIF_CFG_SW_MINOR_VERSION != OSIF_ARCHCFG_SW_MINOR_VERSION) || \ 58 (OSIF_CFG_SW_PATCH_VERSION != OSIF_ARCHCFG_SW_PATCH_VERSION)) 59 #error "Software Version Numbers of OsIf_Cfg.h and OsIf_ArchCfg.h are different" 60 #endif 61 62 /* Checks against StandardTypes.h */ 63 #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK 64 #if ((OSIF_CFG_AR_RELEASE_MAJOR_VERSION != STD_AR_RELEASE_MAJOR_VERSION) || \ 65 (OSIF_CFG_AR_RELEASE_MINOR_VERSION != STD_AR_RELEASE_MINOR_VERSION)) 66 #error "AutoSar Version Numbers of OsIf_Cfg.h and StandardTypes.h are different" 67 #endif 68 #endif 69 /*================================================================================================== 70 * CONSTANTS 71 ==================================================================================================*/ 72 73 /*================================================================================================== 74 * DEFINES AND MACROS 75 ==================================================================================================*/ 76 /* General OSIF configuration */ 77 #define OSIF_MODULE_ID (255U) 78 79 #define OSIF_DRIVER_INSTANCE (0U) 80 81 #define OSIF_ENABLE_USER_MODE_SUPPORT (STD_OFF) 82 83 #ifndef MCAL_ENABLE_USER_MODE_SUPPORT 84 #if (STD_ON == OSIF_ENABLE_USER_MODE_SUPPORT) 85 #error MCAL_ENABLE_USER_MODE_SUPPORT is not enabled. For running OsIf in user mode, MCAL_ENABLE_USER_MODE_SUPPORT needs to be defined. 86 #endif /* (STD_ON == OSIF_ENABLE_USER_MODE_SUPPORT */ 87 #endif /* ifndef MCAL_ENABLE_USER_MODE_SUPPORT */ 88 89 #define OSIF_ENABLE_MULTICORE_SUPPORT (STD_OFF) 90 91 #define OSIF_MAX_COREIDX_SUPPORTED (1U) 92 93 #define OSIF_DEV_ERROR_DETECT (STD_OFF) 94 95 #define USING_OS_ZEPHYR 96 97 #define OSIF_USE_SYSTEM_TIMER (STD_ON) 98 99 #define OSIF_USE_CUSTOM_TIMER (STD_OFF) 100 101 /* Autosar OS Specific */ 102 103 /* Baremetal Specific */ 104 #if (MCAL_PLATFORM_ARM == MCAL_ARM_MARCH) 105 #define OSIF_USE_SYSTICK (STD_ON) 106 #else 107 #define OSIF_USE_GENERICTIMER (STD_ON) 108 #endif 109 110 /*================================================================================================== 111 * ENUMS 112 ==================================================================================================*/ 113 114 /*================================================================================================== 115 * STRUCTURES AND OTHER TYPEDEFS 116 ==================================================================================================*/ 117 118 /*================================================================================================== 119 * GLOBAL VARIABLE DECLARATIONS 120 ==================================================================================================*/ 121 122 /*================================================================================================== 123 GLOBAL CONSTANTS 124 ==================================================================================================*/ 125 126 /*================================================================================================== 127 * FUNCTION PROTOTYPES 128 ==================================================================================================*/ 129 130 131 #ifdef __cplusplus 132 } 133 #endif /* __cplusplus */ 134 #endif /* OSIF_CFG_H */ 135 /** @} */ 136