1 /*
2  * Copyright 2021-2022 NXP
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef CLOCK_IP_TRUSTEDFUNCTIONS_H
8 #define CLOCK_IP_TRUSTEDFUNCTIONS_H
9 
10 /**
11 *   @file    Clock_Ip_TrustedFunctions.h
12 *   @version    0.9.0
13 *
14 *   @brief   CLOCK IP type header file.
15 *   @details CLOCK IP type header file.
16 
17 *   @addtogroup CLOCK_DRIVER Clock Ip Driver
18 *   @{
19 */
20 
21 #if defined(__cplusplus)
22 extern "C"{
23 #endif
24 /*==================================================================================================
25 *                                          INCLUDE FILES
26 * 1) system and project includes
27 * 2) needed interfaces from external units
28 * 3) internal and external interfaces from this unit
29 ==================================================================================================*/
30 #include "StandardTypes.h"
31 #include "Clock_Ip_Types.h"
32 #include "Clock_Ip_Specific.h"
33 /*==================================================================================================
34                                SOURCE FILE VERSION INFORMATION
35 ==================================================================================================*/
36 #define CLOCK_IP_TRUSTEDFUNCTIONS_VENDOR_ID                       43
37 #define CLOCK_IP_TRUSTEDFUNCTIONS_AR_RELEASE_MAJOR_VERSION        4
38 #define CLOCK_IP_TRUSTEDFUNCTIONS_AR_RELEASE_MINOR_VERSION        7
39 #define CLOCK_IP_TRUSTEDFUNCTIONS_AR_RELEASE_REVISION_VERSION     0
40 #define CLOCK_IP_TRUSTEDFUNCTIONS_SW_MAJOR_VERSION                0
41 #define CLOCK_IP_TRUSTEDFUNCTIONS_SW_MINOR_VERSION                9
42 #define CLOCK_IP_TRUSTEDFUNCTIONS_SW_PATCH_VERSION                0
43 
44 /*==================================================================================================
45                                       FILE VERSION CHECKS
46 ==================================================================================================*/
47 #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
48 /* Check if Clock_Ip_TrustedFunctions.h file and StandardTypes.h file are of the same Autosar version */
49 #if ((CLOCK_IP_TRUSTEDFUNCTIONS_AR_RELEASE_MAJOR_VERSION    != STD_AR_RELEASE_MAJOR_VERSION) || \
50      (CLOCK_IP_TRUSTEDFUNCTIONS_AR_RELEASE_MINOR_VERSION    != STD_AR_RELEASE_MINOR_VERSION))
51     #error "AutoSar Version Numbers of Clock_Ip_TrustedFunctions.h and StandardTypes.h are different"
52 #endif
53 #endif
54 
55 /* Check if Clock_Ip_TrustedFunctions.h file and Clock_Ip_Types.h file have same versions */
56 #if (CLOCK_IP_TRUSTEDFUNCTIONS_VENDOR_ID  != CLOCK_IP_TYPES_VENDOR_ID)
57     #error "Clock_Ip_TrustedFunctions.h and Clock_Ip_Types.h have different vendor IDs"
58 #endif
59 
60 /* Check if Clock_Ip_TrustedFunctions.h file and Clock_Ip_Types.h file are of the same Autosar version */
61 #if ((CLOCK_IP_TRUSTEDFUNCTIONS_AR_RELEASE_MAJOR_VERSION    != CLOCK_IP_TYPES_AR_RELEASE_MAJOR_VERSION) || \
62      (CLOCK_IP_TRUSTEDFUNCTIONS_AR_RELEASE_MINOR_VERSION    != CLOCK_IP_TYPES_AR_RELEASE_MINOR_VERSION) || \
63      (CLOCK_IP_TRUSTEDFUNCTIONS_AR_RELEASE_REVISION_VERSION != CLOCK_IP_TYPES_AR_RELEASE_REVISION_VERSION))
64     #error "AutoSar Version Numbers of Clock_Ip_TrustedFunctions.h and Clock_Ip_Types.h are different"
65 #endif
66 
67 /* Check if Clock_Ip_TrustedFunctions.h file and Clock_Ip_Types.h file are of the same Software version */
68 #if ((CLOCK_IP_TRUSTEDFUNCTIONS_SW_MAJOR_VERSION != CLOCK_IP_TYPES_SW_MAJOR_VERSION) || \
69      (CLOCK_IP_TRUSTEDFUNCTIONS_SW_MINOR_VERSION != CLOCK_IP_TYPES_SW_MINOR_VERSION) || \
70      (CLOCK_IP_TRUSTEDFUNCTIONS_SW_PATCH_VERSION != CLOCK_IP_TYPES_SW_PATCH_VERSION))
71     #error "Software Version Numbers of Clock_Ip_TrustedFunctions.h and Clock_Ip_Types.h are different"
72 #endif
73 
74 
75 /* Check if Clock_Ip_TrustedFunctions.h file and Clock_Ip_Specific.h file have same versions */
76 #if (CLOCK_IP_TRUSTEDFUNCTIONS_VENDOR_ID  != CLOCK_IP_SPECIFIC_VENDOR_ID)
77     #error "Clock_Ip_TrustedFunctions.h and Clock_Ip_Specific.h have different vendor IDs"
78 #endif
79 
80 /* Check if Clock_Ip_TrustedFunctions.h file and Clock_Ip_Specific.h file are of the same Autosar version */
81 #if ((CLOCK_IP_TRUSTEDFUNCTIONS_AR_RELEASE_MAJOR_VERSION    != CLOCK_IP_SPECIFIC_AR_RELEASE_MAJOR_VERSION) || \
82      (CLOCK_IP_TRUSTEDFUNCTIONS_AR_RELEASE_MINOR_VERSION    != CLOCK_IP_SPECIFIC_AR_RELEASE_MINOR_VERSION) || \
83      (CLOCK_IP_TRUSTEDFUNCTIONS_AR_RELEASE_REVISION_VERSION != CLOCK_IP_SPECIFIC_AR_RELEASE_REVISION_VERSION))
84     #error "AutoSar Version Numbers of Clock_Ip_TrustedFunctions.h and Clock_Ip_Specific.h are different"
85 #endif
86 
87 /* Check if Clock_Ip_TrustedFunctions.h file and Clock_Ip_Specific.h file are of the same Software version */
88 #if ((CLOCK_IP_TRUSTEDFUNCTIONS_SW_MAJOR_VERSION != CLOCK_IP_SPECIFIC_SW_MAJOR_VERSION) || \
89      (CLOCK_IP_TRUSTEDFUNCTIONS_SW_MINOR_VERSION != CLOCK_IP_SPECIFIC_SW_MINOR_VERSION) || \
90      (CLOCK_IP_TRUSTEDFUNCTIONS_SW_PATCH_VERSION != CLOCK_IP_SPECIFIC_SW_PATCH_VERSION))
91     #error "Software Version Numbers of Clock_Ip_TrustedFunctions.h and Clock_Ip_Specific.h are different"
92 #endif
93 
94 
95 /*==================================================================================================
96 *                                            CONSTANTS
97 ==================================================================================================*/
98 
99 /*==================================================================================================
100 *                                       DEFINES AND MACROS
101 ==================================================================================================*/
102 
103 /*==================================================================================================
104 *                                              ENUMS
105 ==================================================================================================*/
106 
107 /*==================================================================================================
108 *                                  STRUCTURES AND OTHER TYPEDEFS
109 ==================================================================================================*/
110 
111 /*==================================================================================================
112 *                                  GLOBAL VARIABLE DECLARATIONS
113 ==================================================================================================*/
114 
115 /*==================================================================================================
116 *                                       FUNCTION PROTOTYPES
117 ==================================================================================================*/
118 /* Clock start rom section code */
119 #define MCU_START_SEC_CODE_AC
120 #include "Mcu_MemMap.h"
121 
122 #if (defined(CLOCK_IP_ENABLE_USER_MODE_SUPPORT))
123   #if (STD_ON == CLOCK_IP_ENABLE_USER_MODE_SUPPORT)
124 
125 #ifdef CLOCK_IP_HAS_RAM_WAIT_STATES
126 /**
127  * @brief        Set Ram waitstate value base on core_clk
128  *
129  * @param        None
130  * @return       None
131  *
132  */
133 extern void SRAMC_SetRamIWS(void);
134 #endif
135 
136 #ifdef CLOCK_IP_MC_ME_AE_GS_S_SYSCLK
137 /**
138  * @brief        Reset configuration for MC_ME_AE_GS_S_SYSCLK
139  *
140  * @param        Config - pointer to configuration of MC_ME_AE selector
141  * @return       None
142  *
143  */
144 extern void Clock_Ip_ResetMcMeAeGssSysclk_TrustedCall(Clock_Ip_SelectorConfigType const *Config);
145 /**
146  * @brief        Set configuration for MC_ME_AE_GS_S_SYSCLK
147  *
148  * @param        Config - pointer to configuration of MC_ME_AE selector
149  * @return       None
150  *
151  */
152 extern void Clock_Ip_SetMcMeAeGssSysclk_TrustedCall(Clock_Ip_SelectorConfigType const *Config);
153 #endif
154 
155 
156   #endif
157 #endif /* CLOCK_IP_ENABLE_USER_MODE_SUPPORT */
158 
159 
160 /* Clock stop rom section code */
161 #define MCU_STOP_SEC_CODE_AC
162 #include "Mcu_MemMap.h"
163 
164 
165 
166 #if defined(__cplusplus)
167 }
168 #endif /* __cplusplus*/
169 
170 /*! @}*/
171 
172 #endif /* CLOCK_IP_TRUSTEDFUNCTIONS_H */
173 
174 
175