1 /* 2 * Copyright 2022 NXP 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef STM_IP_CFG_H 8 #define STM_IP_CFG_H 9 /** 10 * @file Stm_Ip_Cfg.h 11 * 12 * @addtogroup stm_ip Stm IPL 13 * 14 * @{ 15 */ 16 #ifdef __cplusplus 17 extern "C"{ 18 #endif 19 20 /*================================================================================================== 21 * INCLUDE FILES 22 * 1) system and project includes 23 * 2) needed interfaces from external units 24 * 3) internal and external interfaces from this unit 25 ==================================================================================================*/ 26 #include "Stm_Ip_Init_PBcfg.h" 27 /*================================================================================================== 28 * SOURCE FILE VERSION INFORMATION 29 ==================================================================================================*/ 30 #define STM_IP_VENDOR_ID_CFG 43 31 #define STM_IP_AR_RELEASE_MAJOR_VERSION_CFG 4 32 #define STM_IP_AR_RELEASE_MINOR_VERSION_CFG 7 33 #define STM_IP_AR_RELEASE_REVISION_VERSION_CFG 0 34 #define STM_IP_SW_MAJOR_VERSION_CFG 0 35 #define STM_IP_SW_MINOR_VERSION_CFG 9 36 #define STM_IP_SW_PATCH_VERSION_CFG 0 37 38 /*================================================================================================== 39 * FILE VERSION CHECKS 40 ==================================================================================================*/ 41 #if (STM_IP_VENDOR_ID_CFG != STM_IP_VENDOR_ID_INIT_PBCFG_H) 42 #error "Stm_Ip_Cfg.h and Stm_Ip_INIT_PBcfg.h have different vendor ids" 43 #endif 44 /* Check if this header file and header file are of the same Autosar version */ 45 #if ((STM_IP_AR_RELEASE_MAJOR_VERSION_CFG != STM_IP_AR_RELEASE_MAJOR_VERSION_INIT_PBCFG_H) || \ 46 (STM_IP_AR_RELEASE_MINOR_VERSION_CFG != STM_IP_AR_RELEASE_MINOR_VERSION_INIT_PBCFG_H) || \ 47 (STM_IP_AR_RELEASE_REVISION_VERSION_CFG != STM_IP_AR_RELEASE_REVISION_VERSION_INIT_PBCFG_H) \ 48 ) 49 #error "AutoSar Version Numbers of Stm_Ip_Cfg.h and Stm_Ip_INIT_PBcfg.h are different" 50 #endif 51 /* Check if this header file and header file are of the same Software version */ 52 #if ((STM_IP_SW_MAJOR_VERSION_CFG != STM_IP_SW_MAJOR_VERSION_INIT_PBCFG_H) || \ 53 (STM_IP_SW_MINOR_VERSION_CFG != STM_IP_SW_MINOR_VERSION_INIT_PBCFG_H) || \ 54 (STM_IP_SW_PATCH_VERSION_CFG != STM_IP_SW_PATCH_VERSION_INIT_PBCFG_H) \ 55 ) 56 #error "Software Version Numbers of Stm_Ip_Cfg.h and Stm_Ip_INIT_PBcfg.h are different" 57 #endif 58 /*================================================================================================== 59 * CONSTANTS 60 ==================================================================================================*/ 61 62 /*================================================================================================== 63 * DEFINES AND MACROS 64 ==================================================================================================*/ 65 /** 66 * @brief Dev error detect switch 67 */ 68 #define STM_IP_DEV_ERROR_DETECT (STD_OFF) 69 /*================================================================================================*/ 70 /** 71 * @brief STM_IP_CHANGE_NEXT_TIMEOUT_VALUE switch 72 * @details Enable/disable support for changing timeout value during timer running 73 */ 74 #define STM_IP_CHANGE_NEXT_TIMEOUT_VALUE (STD_OFF) 75 /*================================================================================================*/ 76 #define STM_IP_PREDEFTIMER_FUNCTIONALITY_API (STD_OFF) 77 /*================================================================================================*/ 78 /** 79 * @brief STM_IP_ABSOLUTE_COUTNING_API switch 80 * @details Enable/disable support for absolute compare value 81 */ 82 #define STM_IP_ABSOLUTE_COUNTING_API (STD_ON) 83 /*================================================================================================*/ 84 85 /** 86 * @brief STM_IP_ENABLE_USER_MODE_SUPPORT switch 87 * @details Enable/disable support usermode.If this parameter has been configured to TRUE the GPT driver code can be executed from both supervisor and user mode. 88 */ 89 #define STM_IP_ENABLE_USER_MODE_SUPPORT (STD_OFF) 90 91 #ifndef MCAL_ENABLE_USER_MODE_SUPPORT 92 #ifdef STM_IP_ENABLE_USER_MODE_SUPPORT 93 #if (STD_ON == STM_IP_ENABLE_USER_MODE_SUPPORT) 94 #error MCAL_ENABLE_USER_MODE_SUPPORT is not enabled. For running Gpt in user mode the MCAL_ENABLE_USER_MODE_SUPPORT needs to be defined. 95 #endif /* (STD_ON == STM_IP_ENABLE_USER_MODE_SUPPORT) */ 96 #endif /* ifndef MCAL_ENABLE_USER_MODE_SUPPORT */ 97 #endif /* ifdef MCAL_ENABLE_USER_MODE_SUPPORT*/ 98 /*================================================================================================== 99 * ENUMS 100 ==================================================================================================*/ 101 102 /*================================================================================================== 103 * STRUCTURES AND OTHER TYPEDEFS 104 ==================================================================================================*/ 105 106 /*================================================================================================== 107 * GLOBAL VARIABLE DECLARATIONS 108 ==================================================================================================*/ 109 110 /*================================================================================================== 111 * FUNCTION PROTOTYPES 112 ==================================================================================================*/ 113 114 #ifdef __cplusplus 115 } 116 #endif 117 /** @} */ 118 119 #endif /* STM_IP_CFG_H */ 120