1 /*
2 * Copyright 2020-2023 NXP
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7 /**
8 * @file
9 *
10 * @addtogroup siul2_icu_ip SIUL2 IPL
11 * @{
12 */
13
14 #ifdef __cplusplus
15 extern "C"{
16 #endif
17
18 /*==================================================================================================
19 * INCLUDE FILES
20 * 1) system and project includes
21 * 2) needed interfaces from external units
22 * 3) internal and external interfaces from this unit
23 ==================================================================================================*/
24 #include "SchM_Icu.h"
25 #include "Std_Types.h"
26 #include "Siul2_Icu_Ip.h"
27 #include "Siul2_Icu_Ip_Irq.h"
28
29 /*==================================================================================================
30 * SOURCE FILE VERSION INFORMATION
31 ==================================================================================================*/
32 #define SIUL2_ICU_IRQ_VENDOR_ID_C 43
33 #define SIUL2_ICU_IRQ_AR_RELEASE_MAJOR_VERSION_C 4
34 #define SIUL2_ICU_IRQ_AR_RELEASE_MINOR_VERSION_C 7
35 #define SIUL2_ICU_IRQ_AR_RELEASE_REVISION_VERSION_C 0
36 #define SIUL2_ICU_IRQ_SW_MAJOR_VERSION_C 3
37 #define SIUL2_ICU_IRQ_SW_MINOR_VERSION_C 0
38 #define SIUL2_ICU_IRQ_SW_PATCH_VERSION_C 0
39
40 /*==================================================================================================
41 * FILE VERSION CHECKS
42 ==================================================================================================*/
43 #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
44 /* Check if header file and Std_Types.h file are of the same Autosar version */
45 #if ((SIUL2_ICU_IRQ_AR_RELEASE_MAJOR_VERSION_C != STD_AR_RELEASE_MAJOR_VERSION) || \
46 (SIUL2_ICU_IRQ_AR_RELEASE_MINOR_VERSION_C != STD_AR_RELEASE_MINOR_VERSION))
47 #error "AutoSar Version Numbers of Siul2_Icu_Ip_Irq.c and Std_Types.h are different"
48 #endif
49
50 /* Check if header file and SchM_Icu.h file are of the same Autosar version */
51 #if ((SIUL2_ICU_IRQ_AR_RELEASE_MAJOR_VERSION_C != SCHM_ICU_AR_RELEASE_MAJOR_VERSION) || \
52 (SIUL2_ICU_IRQ_AR_RELEASE_MINOR_VERSION_C != SCHM_ICU_AR_RELEASE_MINOR_VERSION))
53 #error "AutoSar Version Numbers of Siul2_Icu_Ip_Irq.c and SchM_Icu.h are different"
54 #endif
55 #endif
56
57 /* Check if source file and ICU header file are of the same vendor */
58 #if (SIUL2_ICU_IRQ_VENDOR_ID_C != SIUL2_ICU_IP_VENDOR_ID)
59 #error "Siul2_Icu_Ip_Irq.c and Siul2_Icu_Ip.h have different vendor IDs"
60 #endif
61 /* Check if source file and ICU header file are of the same AutoSar version */
62 #if ((SIUL2_ICU_IRQ_AR_RELEASE_MAJOR_VERSION_C != SIUL2_ICU_IP_AR_RELEASE_MAJOR_VERSION) || \
63 (SIUL2_ICU_IRQ_AR_RELEASE_MINOR_VERSION_C != SIUL2_ICU_IP_AR_RELEASE_MINOR_VERSION) || \
64 (SIUL2_ICU_IRQ_AR_RELEASE_REVISION_VERSION_C != SIUL2_ICU_IP_AR_RELEASE_REVISION_VERSION))
65 #error "AutoSar Version Numbers of Siul2_Icu_Ip_Irq.c and Siul2_Icu_Ip.h are different"
66 #endif
67 /* Check if source file and ICU header file are of the same Software version */
68 #if ((SIUL2_ICU_IRQ_SW_MAJOR_VERSION_C != SIUL2_ICU_IP_SW_MAJOR_VERSION) || \
69 (SIUL2_ICU_IRQ_SW_MINOR_VERSION_C != SIUL2_ICU_IP_SW_MINOR_VERSION) || \
70 (SIUL2_ICU_IRQ_SW_PATCH_VERSION_C != SIUL2_ICU_IP_SW_PATCH_VERSION))
71 #error "Software Version Numbers of Siul2_Icu_Ip_Irq.c and Siul2_Icu_Ip.h are different"
72 #endif
73
74 /* Check if source file and ICU header file are of the same vendor */
75 #if (SIUL2_ICU_IRQ_VENDOR_ID_C != SIUL2_ICU_IP_IRQ_VENDOR_ID)
76 #error "Siul2_Icu_Ip_Irq.c and Siul2_Icu_Ip_Irq.h have different vendor IDs"
77 #endif
78 /* Check if source file and ICU header file are of the same AutoSar version */
79 #if ((SIUL2_ICU_IRQ_AR_RELEASE_MAJOR_VERSION_C != SIUL2_ICU_IP_IRQ_AR_RELEASE_MAJOR_VERSION) || \
80 (SIUL2_ICU_IRQ_AR_RELEASE_MINOR_VERSION_C != SIUL2_ICU_IP_IRQ_AR_RELEASE_MINOR_VERSION) || \
81 (SIUL2_ICU_IRQ_AR_RELEASE_REVISION_VERSION_C != SIUL2_ICU_IP_IRQ_AR_RELEASE_REVISION_VERSION))
82 #error "AutoSar Version Numbers of Siul2_Icu_Ip_Irq.c and Siul2_Icu_Ip_Irq.h are different"
83 #endif
84 /* Check if source file and ICU header file are of the same Software version */
85 #if ((SIUL2_ICU_IRQ_SW_MAJOR_VERSION_C != SIUL2_ICU_IP_IRQ_SW_MAJOR_VERSION) || \
86 (SIUL2_ICU_IRQ_SW_MINOR_VERSION_C != SIUL2_ICU_IP_IRQ_SW_MINOR_VERSION) || \
87 (SIUL2_ICU_IRQ_SW_PATCH_VERSION_C != SIUL2_ICU_IP_IRQ_SW_PATCH_VERSION))
88 #error "Software Version Numbers of Siul2_Icu_Ip_Irq.c and Siul2_Icu_Ip_Irq.h are different"
89 #endif
90
91 /*==================================================================================================
92 * GLOBAL VARIABLE DECLARATIONS
93 ==================================================================================================*/
94 #if (STD_ON == SIUL2_ICU_IP_USED)
95
96 #define ICU_START_SEC_VAR_CLEARED_UNSPECIFIED
97 #include "Icu_MemMap.h"
98
99 extern Siul2_Icu_Ip_State Siul2_Icu_Ip_aChannelState[SIUL2_ICU_IP_NUM_OF_CHANNELS_USED];
100
101 #define ICU_STOP_SEC_VAR_CLEARED_UNSPECIFIED
102 #include "Icu_MemMap.h"
103
104 #define ICU_START_SEC_VAR_INIT_8
105 #include "Icu_MemMap.h"
106 /* This array stores the positions in the Siul2_Icu_Ip_aChannelState array of the configured Siul2 channels. */
107 extern uint8 Siul2_Icu_Ip_IndexInChState[SIUL2_ICU_IP_NUM_OF_INSTANCES][SIUL2_ICU_IP_NUM_OF_CHANNELS];
108 #define ICU_STOP_SEC_VAR_INIT_8
109 #include "Icu_MemMap.h"
110 /*==================================================================================================
111 * LOCAL FUNCTION PROTOTYPES
112 ==================================================================================================*/
113 #define ICU_START_SEC_CODE
114 #include "Icu_MemMap.h"
115
116 #if ( (defined SIUL2_0_ICU_EIRQ_SINGLE_INT) || (defined SIUL2_1_ICU_EIRQ_SINGLE_INT) || \
117 (defined SIUL2_4_ICU_EIRQ_SINGLE_INT) || (defined SIUL2_5_ICU_EIRQ_SINGLE_INT) || \
118 (defined SIUL2_AE_ICU_EIRQ_SINGLE_INT))
119 /**
120 * @brief
121 *
122 * @param instance
123 * @implements Siul2_Icu_Ip_ProcessSingleInterrupt_Activity
124 */
125 static inline void Siul2_Icu_Ip_ProcessSingleInterrupt(uint8 instance);
126 #endif
127
128 #if ((defined SIUL2_ICU_IRQ_CH_0_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_1_ISR_USED) \
129 || (defined SIUL2_ICU_IRQ_CH_2_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_3_ISR_USED) \
130 || (defined SIUL2_ICU_IRQ_CH_4_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_5_ISR_USED) \
131 || (defined SIUL2_ICU_IRQ_CH_6_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_7_ISR_USED) \
132 || (defined SIUL2_ICU_IRQ_CH_8_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_9_ISR_USED) \
133 || (defined SIUL2_ICU_IRQ_CH_10_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_11_ISR_USED) \
134 || (defined SIUL2_ICU_IRQ_CH_12_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_13_ISR_USED) \
135 || (defined SIUL2_ICU_IRQ_CH_14_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_15_ISR_USED) \
136 || (defined SIUL2_ICU_IRQ_CH_16_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_17_ISR_USED) \
137 || (defined SIUL2_ICU_IRQ_CH_18_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_19_ISR_USED) \
138 || (defined SIUL2_ICU_IRQ_CH_20_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_21_ISR_USED) \
139 || (defined SIUL2_ICU_IRQ_CH_22_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_23_ISR_USED) \
140 || (defined SIUL2_ICU_IRQ_CH_24_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_25_ISR_USED) \
141 || (defined SIUL2_ICU_IRQ_CH_26_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_27_ISR_USED) \
142 || (defined SIUL2_ICU_IRQ_CH_28_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_29_ISR_USED) \
143 || (defined SIUL2_ICU_IRQ_CH_30_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_31_ISR_USED))
144 static inline void Siul2_Icu_Ip_ProcessInterrupt(uint8 instance, uint8 firstHwChannel);
145 #endif
146
147 #if ((defined SIUL2_ICU_IRQ_CH_0_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_1_ISR_USED) \
148 || (defined SIUL2_ICU_IRQ_CH_2_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_3_ISR_USED) \
149 || (defined SIUL2_ICU_IRQ_CH_4_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_5_ISR_USED) \
150 || (defined SIUL2_ICU_IRQ_CH_6_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_7_ISR_USED) \
151 || (defined SIUL2_ICU_IRQ_CH_8_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_9_ISR_USED) \
152 || (defined SIUL2_ICU_IRQ_CH_10_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_11_ISR_USED) \
153 || (defined SIUL2_ICU_IRQ_CH_12_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_13_ISR_USED) \
154 || (defined SIUL2_ICU_IRQ_CH_14_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_15_ISR_USED) \
155 || (defined SIUL2_ICU_IRQ_CH_16_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_17_ISR_USED) \
156 || (defined SIUL2_ICU_IRQ_CH_18_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_19_ISR_USED) \
157 || (defined SIUL2_ICU_IRQ_CH_20_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_21_ISR_USED) \
158 || (defined SIUL2_ICU_IRQ_CH_22_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_23_ISR_USED) \
159 || (defined SIUL2_ICU_IRQ_CH_24_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_25_ISR_USED) \
160 || (defined SIUL2_ICU_IRQ_CH_26_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_27_ISR_USED) \
161 || (defined SIUL2_ICU_IRQ_CH_28_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_29_ISR_USED) \
162 || (defined SIUL2_ICU_IRQ_CH_30_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_31_ISR_USED) \
163 || (defined SIUL2_0_ICU_EIRQ_SINGLE_INT) || (defined SIUL2_1_ICU_EIRQ_SINGLE_INT) \
164 || (defined SIUL2_4_ICU_EIRQ_SINGLE_INT) || (defined SIUL2_5_ICU_EIRQ_SINGLE_INT) \
165 || (defined SIUL2_AE_ICU_EIRQ_SINGLE_INT))
166 /**
167 * @brief
168 *
169 * @param instance
170 * @param hwChannel
171 */
172 static inline void Siul2_Icu_Ip_ReportEvents(uint8 instance, uint8 hwChannel);
173 #endif
174 /*==================================================================================================
175 * LOCAL FUNCTIONS
176 ==================================================================================================*/
177 #if ( (defined SIUL2_0_ICU_EIRQ_SINGLE_INT) || (defined SIUL2_1_ICU_EIRQ_SINGLE_INT) || \
178 (defined SIUL2_4_ICU_EIRQ_SINGLE_INT) || (defined SIUL2_5_ICU_EIRQ_SINGLE_INT) || \
179 (defined SIUL2_AE_ICU_EIRQ_SINGLE_INT))
Siul2_Icu_Ip_ProcessSingleInterrupt(uint8 instance)180 static inline void Siul2_Icu_Ip_ProcessSingleInterrupt(uint8 instance)
181 {
182 uint8 u8IrqChannel = 0U;
183 uint32 u32RegIrqMask = 0U;
184 uint32 u32ChannelMask = 1U;
185 uint32 u32RegFlags = Siul2_Icu_Ip_pBase[instance]->DISR0;
186 uint32 u32RegIrqEn = Siul2_Icu_Ip_pBase[instance]->DIRER0;
187
188 /* Select which channels will be serviced - only the enabled irq ones*/
189 u32RegIrqMask = u32RegFlags & u32RegIrqEn;
190
191 for (u8IrqChannel = 0; u8IrqChannel < SIUL2_ICU_IP_NUM_OF_CHANNELS; u8IrqChannel++)
192 {
193 if (0x0U != (u32RegIrqMask & u32ChannelMask))
194 {
195 /* Clear pending interrupt serviced */
196 Siul2_Icu_Ip_pBase[instance]->DISR0 = u32RegFlags & u32ChannelMask;
197
198 Siul2_Icu_Ip_ReportEvents(instance, u8IrqChannel);
199 }
200 u32ChannelMask <<= (uint32)1U;
201 }
202 }
203 #endif /* All single interrupt cases. */
204
205 #if ((defined SIUL2_ICU_IRQ_CH_0_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_1_ISR_USED) \
206 || (defined SIUL2_ICU_IRQ_CH_2_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_3_ISR_USED) \
207 || (defined SIUL2_ICU_IRQ_CH_4_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_5_ISR_USED) \
208 || (defined SIUL2_ICU_IRQ_CH_6_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_7_ISR_USED) \
209 || (defined SIUL2_ICU_IRQ_CH_8_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_9_ISR_USED) \
210 || (defined SIUL2_ICU_IRQ_CH_10_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_11_ISR_USED) \
211 || (defined SIUL2_ICU_IRQ_CH_12_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_13_ISR_USED) \
212 || (defined SIUL2_ICU_IRQ_CH_14_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_15_ISR_USED) \
213 || (defined SIUL2_ICU_IRQ_CH_16_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_17_ISR_USED) \
214 || (defined SIUL2_ICU_IRQ_CH_18_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_19_ISR_USED) \
215 || (defined SIUL2_ICU_IRQ_CH_20_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_21_ISR_USED) \
216 || (defined SIUL2_ICU_IRQ_CH_22_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_23_ISR_USED) \
217 || (defined SIUL2_ICU_IRQ_CH_24_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_25_ISR_USED) \
218 || (defined SIUL2_ICU_IRQ_CH_26_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_27_ISR_USED) \
219 || (defined SIUL2_ICU_IRQ_CH_28_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_29_ISR_USED) \
220 || (defined SIUL2_ICU_IRQ_CH_30_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_31_ISR_USED))
221 /** @implements Siul2_Icu_Ip_ProcessInterrupt_Activity */
Siul2_Icu_Ip_ProcessInterrupt(uint8 instance,uint8 firstHwChannel)222 static inline void Siul2_Icu_Ip_ProcessInterrupt(uint8 instance, uint8 firstHwChannel)
223 {
224 uint8 u8IrqChannel;
225 uint32 u32RegIrqMask = (uint32)0xFFU << (uint32)firstHwChannel;
226 uint32 u32ChannelMask = (uint32)1U << (uint32)firstHwChannel;
227
228 uint32 u32RegFlags = (Siul2_Icu_Ip_pBase[instance])->DISR0;
229 uint32 u32RegIrqEn = (Siul2_Icu_Ip_pBase[instance])->DIRER0;
230
231 /* Select which channels will be serviced - only the enabled irq ones*/
232 u32RegIrqMask = u32RegFlags & u32RegIrqEn & u32RegIrqMask;
233
234 for (u8IrqChannel = (uint8)firstHwChannel; u8IrqChannel < (uint8)(firstHwChannel + 8U); u8IrqChannel++)
235 {
236 if (0x0U != (u32RegIrqMask & u32ChannelMask))
237 {
238 /* Clear pending interrupt serviced */
239 (Siul2_Icu_Ip_pBase[instance])->DISR0 = u32RegFlags & u32ChannelMask;
240
241 Siul2_Icu_Ip_ReportEvents(instance, u8IrqChannel);
242 }
243 u32ChannelMask <<= (uint32)1U;
244 }
245 }
246 #endif
247
248 #if ((defined SIUL2_ICU_IRQ_CH_0_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_1_ISR_USED) \
249 || (defined SIUL2_ICU_IRQ_CH_2_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_3_ISR_USED) \
250 || (defined SIUL2_ICU_IRQ_CH_4_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_5_ISR_USED) \
251 || (defined SIUL2_ICU_IRQ_CH_6_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_7_ISR_USED) \
252 || (defined SIUL2_ICU_IRQ_CH_8_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_9_ISR_USED) \
253 || (defined SIUL2_ICU_IRQ_CH_10_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_11_ISR_USED) \
254 || (defined SIUL2_ICU_IRQ_CH_12_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_13_ISR_USED) \
255 || (defined SIUL2_ICU_IRQ_CH_14_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_15_ISR_USED) \
256 || (defined SIUL2_ICU_IRQ_CH_16_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_17_ISR_USED) \
257 || (defined SIUL2_ICU_IRQ_CH_18_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_19_ISR_USED) \
258 || (defined SIUL2_ICU_IRQ_CH_20_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_21_ISR_USED) \
259 || (defined SIUL2_ICU_IRQ_CH_22_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_23_ISR_USED) \
260 || (defined SIUL2_ICU_IRQ_CH_24_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_25_ISR_USED) \
261 || (defined SIUL2_ICU_IRQ_CH_26_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_27_ISR_USED) \
262 || (defined SIUL2_ICU_IRQ_CH_28_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_29_ISR_USED) \
263 || (defined SIUL2_ICU_IRQ_CH_30_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_31_ISR_USED) \
264 || (defined SIUL2_0_ICU_EIRQ_SINGLE_INT) || (defined SIUL2_1_ICU_EIRQ_SINGLE_INT) \
265 || (defined SIUL2_4_ICU_EIRQ_SINGLE_INT) || (defined SIUL2_5_ICU_EIRQ_SINGLE_INT) \
266 || (defined SIUL2_AE_ICU_EIRQ_SINGLE_INT))
Siul2_Icu_Ip_ReportEvents(uint8 instance,uint8 hwChannel)267 static inline void Siul2_Icu_Ip_ReportEvents(uint8 instance, uint8 hwChannel)
268 {
269 uint8 u8ChIndex = Siul2_Icu_Ip_IndexInChState[instance][hwChannel];
270
271 /* Calling HLD Report Events for the logical channel. */
272 if (Siul2_Icu_Ip_aChannelState[u8ChIndex].callback != NULL_PTR)
273 {
274 Siul2_Icu_Ip_aChannelState[u8ChIndex].callback(Siul2_Icu_Ip_aChannelState[u8ChIndex].callbackParam, FALSE);
275 }
276 else
277 {
278 /* Calling Notification for the IPL channel. */
279 if ((NULL_PTR != Siul2_Icu_Ip_aChannelState[u8ChIndex].Siul2ChannelNotification) && \
280 ((boolean)TRUE == Siul2_Icu_Ip_aChannelState[u8ChIndex].notificationEnable))
281 {
282 Siul2_Icu_Ip_aChannelState[u8ChIndex].Siul2ChannelNotification();
283 }
284 }
285 }
286 #endif
287
288 /*==================================================================================================
289 * GLOBAL FUNCTIONS
290 ==================================================================================================*/
291 #if (defined(SIUL2_0_ICU_EIRQ_SINGLE_INT))
ISR(SIUL2_0_ICU_EIRQ_SINGLE_INT_HANDLER)292 ISR(SIUL2_0_ICU_EIRQ_SINGLE_INT_HANDLER)
293 {
294 /*calling process interrupt function of corresponding instance*/
295 Siul2_Icu_Ip_ProcessSingleInterrupt(0U);
296 }
297 #endif /* SIUL2_0_ICU_EIRQ_SINGLE_INT */
298
299 #if (defined(SIUL2_1_ICU_EIRQ_SINGLE_INT))
ISR(SIUL2_1_ICU_EIRQ_SINGLE_INT_HANDLER)300 ISR(SIUL2_1_ICU_EIRQ_SINGLE_INT_HANDLER)
301 {
302 /*calling process interrupt function of corresponding instance*/
303 Siul2_Icu_Ip_ProcessSingleInterrupt(1U);
304 }
305 #endif /* SIUL2_1_ICU_EIRQ_SINGLE_INT */
306
307 #if (defined(SIUL2_4_ICU_EIRQ_SINGLE_INT))
ISR(SIUL2_4_ICU_EIRQ_SINGLE_INT_HANDLER)308 ISR(SIUL2_4_ICU_EIRQ_SINGLE_INT_HANDLER)
309 {
310 /*calling process interrupt function of corresponding instance*/
311 Siul2_Icu_Ip_ProcessSingleInterrupt(4U);
312 }
313 #endif /* SIUL2_4_ICU_EIRQ_SINGLE_INT */
314
315 #if (defined(SIUL2_5_ICU_EIRQ_SINGLE_INT))
ISR(SIUL2_5_ICU_EIRQ_SINGLE_INT_HANDLER)316 ISR(SIUL2_5_ICU_EIRQ_SINGLE_INT_HANDLER)
317 {
318 /*calling process interrupt function of corresponding instance*/
319 Siul2_Icu_Ip_ProcessSingleInterrupt(5U);
320 }
321 #endif /* SIUL2_5_ICU_EIRQ_SINGLE_INT */
322
323 #if (defined(SIUL2_AE_ICU_EIRQ_SINGLE_INT))
ISR(SIUL2_AE_ICU_EIRQ_SINGLE_INT_HANDLER)324 ISR(SIUL2_AE_ICU_EIRQ_SINGLE_INT_HANDLER)
325 {
326 /*calling process interrupt function of corresponding instance*/
327 Siul2_Icu_Ip_ProcessSingleInterrupt(6U);
328 }
329 #endif /* SIUL2_AE_ICU_EIRQ_SINGLE_INT */
330
331 #if ((defined SIUL2_ICU_IRQ_CH_0_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_1_ISR_USED) ||\
332 (defined SIUL2_ICU_IRQ_CH_2_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_3_ISR_USED) ||\
333 (defined SIUL2_ICU_IRQ_CH_4_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_5_ISR_USED) ||\
334 (defined SIUL2_ICU_IRQ_CH_6_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_7_ISR_USED))
ISR(SIUL2_EXT_IRQ_0_7_ISR)335 ISR(SIUL2_EXT_IRQ_0_7_ISR)
336 {
337 /*implement IRQ for the instance 0*/
338 Siul2_Icu_Ip_ProcessInterrupt(0U, SIUL2_ICU_IRQ_0);
339 }
340 #endif /* IRQ 0 - 7 */
341
342 #if ((defined SIUL2_ICU_IRQ_CH_8_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_9_ISR_USED) ||\
343 (defined SIUL2_ICU_IRQ_CH_10_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_11_ISR_USED) ||\
344 (defined SIUL2_ICU_IRQ_CH_12_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_13_ISR_USED) ||\
345 (defined SIUL2_ICU_IRQ_CH_14_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_15_ISR_USED))
ISR(SIUL2_EXT_IRQ_8_15_ISR)346 ISR(SIUL2_EXT_IRQ_8_15_ISR)
347 {
348 /*implement IRQ for the instance 0*/
349 Siul2_Icu_Ip_ProcessInterrupt(0U, SIUL2_ICU_IRQ_8);
350 }
351 #endif /* IRQ 8 - 15 */
352
353 #if ((defined SIUL2_ICU_IRQ_CH_16_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_17_ISR_USED) || \
354 (defined SIUL2_ICU_IRQ_CH_18_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_19_ISR_USED) || \
355 (defined SIUL2_ICU_IRQ_CH_20_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_21_ISR_USED) || \
356 (defined SIUL2_ICU_IRQ_CH_22_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_23_ISR_USED))
ISR(SIUL2_EXT_IRQ_16_23_ISR)357 ISR(SIUL2_EXT_IRQ_16_23_ISR)
358 {
359 /*implement IRQ for the instance 0*/
360 Siul2_Icu_Ip_ProcessInterrupt(0U, SIUL2_ICU_IRQ_16);
361 }
362 #endif
363
364 #if ((defined SIUL2_ICU_IRQ_CH_24_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_25_ISR_USED) || \
365 (defined SIUL2_ICU_IRQ_CH_26_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_27_ISR_USED) || \
366 (defined SIUL2_ICU_IRQ_CH_28_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_29_ISR_USED) || \
367 (defined SIUL2_ICU_IRQ_CH_30_ISR_USED) || (defined SIUL2_ICU_IRQ_CH_31_ISR_USED))
ISR(SIUL2_EXT_IRQ_24_31_ISR)368 ISR(SIUL2_EXT_IRQ_24_31_ISR)
369 {
370 /*implement IRQ for the instance 0*/
371 Siul2_Icu_Ip_ProcessInterrupt(0U, SIUL2_ICU_IRQ_24);
372 }
373 #endif
374
375 #define ICU_STOP_SEC_CODE
376 #include "Icu_MemMap.h"
377
378 #endif /* SIUL2_ICU_IP_USED */
379
380 #ifdef __cplusplus
381 }
382 #endif
383
384 /** @} */
385