1 /* 2 * Copyright 2020-2023 NXP 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 /* Prevention from multiple including the same header */ 8 #ifndef LCU_IP_DEVASSERT_H_ 9 #define LCU_IP_DEVASSERT_H_ 10 11 /** 12 * @file Lcu_Ip_Devassert.h 13 * 14 * @version 3.0.0 15 * 16 * @brief AUTOSAR Mcl - Lcu Ip driver header file. 17 * @details 18 * 19 * @addtogroup LCU_IP_DRIVER LCU IP Driver 20 * @{ 21 */ 22 23 #ifdef __cplusplus 24 extern "C"{ 25 #endif 26 27 /*================================================================================================== 28 * INCLUDE FILES 29 * 1) system and project includes 30 * 2) needed interfaces from external units 31 * 3) internal and external interfaces from this unit 32 ==================================================================================================*/ 33 #include "Lcu_Ip_Types.h" 34 35 /*================================================================================================== 36 SOURCE FILE VERSION INFORMATION 37 ==================================================================================================*/ 38 #define LCU_IP_DEVASSERT_VENDOR_ID 43 39 #define LCU_IP_DEVASSERT_AR_RELEASE_MAJOR_VERSION 4 40 #define LCU_IP_DEVASSERT_AR_RELEASE_MINOR_VERSION 7 41 #define LCU_IP_DEVASSERT_AR_RELEASE_REVISION_VERSION 0 42 #define LCU_IP_DEVASSERT_SW_MAJOR_VERSION 3 43 #define LCU_IP_DEVASSERT_SW_MINOR_VERSION 0 44 #define LCU_IP_DEVASSERT_SW_PATCH_VERSION 0 45 46 /*================================================================================================== 47 FILE VERSION CHECKS 48 ==================================================================================================*/ 49 /* Check if header file and Lcu_Ip_Types.h file are of the same vendor */ 50 #if (LCU_IP_DEVASSERT_VENDOR_ID != LCU_IP_TYPES_VENDOR_ID) 51 #error "Lcu_Ip_Devassert.h and Lcu_Ip_Types.h have different vendor ids" 52 #endif 53 54 /* Check if header file and Lcu_Ip_Types.h file are of the same Autosar version */ 55 #if ((LCU_IP_DEVASSERT_AR_RELEASE_MAJOR_VERSION != LCU_IP_TYPES_AR_RELEASE_MAJOR_VERSION) || \ 56 (LCU_IP_DEVASSERT_AR_RELEASE_MINOR_VERSION != LCU_IP_TYPES_AR_RELEASE_MINOR_VERSION) || \ 57 (LCU_IP_DEVASSERT_AR_RELEASE_REVISION_VERSION != LCU_IP_TYPES_AR_RELEASE_REVISION_VERSION) \ 58 ) 59 #error "AutoSar Version Numbers of Lcu_Ip_Devassert.h and Lcu_Ip_Types.h are different" 60 #endif 61 62 /* Check if header file and Lcu_Ip_Types.h file are of the same Software version */ 63 #if ((LCU_IP_DEVASSERT_SW_MAJOR_VERSION != LCU_IP_TYPES_SW_MAJOR_VERSION) || \ 64 (LCU_IP_DEVASSERT_SW_MINOR_VERSION != LCU_IP_TYPES_SW_MINOR_VERSION) || \ 65 (LCU_IP_DEVASSERT_SW_PATCH_VERSION != LCU_IP_TYPES_SW_PATCH_VERSION) \ 66 ) 67 #error "Software Version Numbers of Lcu_Ip_Devassert.h and Lcu_Ip_Types.h are different" 68 #endif 69 70 #if (STD_ON == LCU_IP_IS_AVAILABLE) 71 /*================================================================================================== 72 * CONSTANTS 73 ==================================================================================================*/ 74 75 /*================================================================================================== 76 * DEFINES AND MACROS 77 ==================================================================================================*/ 78 79 /*================================================================================================== 80 * ENUMS 81 ==================================================================================================*/ 82 83 /*================================================================================================== 84 * STRUCTURES AND OTHER TYPEDEFS 85 ==================================================================================================*/ 86 #if (STD_ON == LCU_IP_DEV_ERROR_DETECT) 87 88 #define MCL_START_SEC_CODE 89 #include "Mcl_MemMap.h" 90 91 /* Implement default assert macro */ Lcu_Ip_DevAssert(volatile boolean x)92static inline void Lcu_Ip_DevAssert(volatile boolean x) 93 { 94 if(x) { } else { ASM_KEYWORD("BKPT #0"); for(;;) {} } 95 } 96 97 #define MCL_STOP_SEC_CODE 98 #include "Mcl_MemMap.h" 99 100 #define LCU_IP_DEV_ASSERT(x) Lcu_Ip_DevAssert(x) 101 102 #else 103 /* Assert macro does nothing */ 104 #define LCU_IP_DEV_ASSERT(x) ((void)0) 105 106 #endif /* #if (STD_ON == LCU_IP_DEV_ERROR_DETECT) */ 107 108 /*================================================================================================== 109 * GLOBAL VARIABLE DECLARATIONS 110 ==================================================================================================*/ 111 112 /*================================================================================================== 113 * FUNCTION PROTOTYPES 114 ==================================================================================================*/ 115 #endif /* #if (STD_ON == LCU_IP_IS_AVAILABLE) */ 116 117 #ifdef __cplusplus 118 } 119 #endif 120 121 /** @} */ 122 123 #endif /* #ifndef LCU_IP_DEVASSERT_H_ */ 124 125 /*================================================================================================== 126 * END OF FILE 127 ==================================================================================================*/ 128