1 /*
2  * Copyright 2020-2023 NXP
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 /**
8 *   @file
9 *
10 *   @addtogroup adc_sar_ip Adc Sar 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 "OsIf.h"
25 #include "Adc_Sar_Ip_Irq.h"
26 
27 /*==================================================================================================
28 *                              SOURCE FILE VERSION INFORMATION
29 ==================================================================================================*/
30 #define ADC_SAR_IP_VENDOR_ID_IRQ_C                      43
31 #define ADC_SAR_IP_AR_RELEASE_MAJOR_VERSION_IRQ_C       4
32 #define ADC_SAR_IP_AR_RELEASE_MINOR_VERSION_IRQ_C       7
33 #define ADC_SAR_IP_AR_RELEASE_REVISION_VERSION_IRQ_C    0
34 #define ADC_SAR_IP_SW_MAJOR_VERSION_IRQ_C               3
35 #define ADC_SAR_IP_SW_MINOR_VERSION_IRQ_C               0
36 #define ADC_SAR_IP_SW_PATCH_VERSION_IRQ_C               0
37 
38 /*==================================================================================================
39 *                                     FILE VERSION CHECKS
40 ==================================================================================================*/
41 #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
42 /* Check if Adc_Sar_Ip_Irq.c file and OsIf.h file are of the same Autosar version */
43 #if ((ADC_SAR_IP_AR_RELEASE_MAJOR_VERSION_IRQ_C != OSIF_AR_RELEASE_MAJOR_VERSION) || \
44      (ADC_SAR_IP_AR_RELEASE_MINOR_VERSION_IRQ_C != OSIF_AR_RELEASE_MINOR_VERSION)    \
45     )
46     #error "AutoSar Version Numbers of Adc_Sar_Ip_Irq.c and OsIf.h are different"
47 #endif
48 #endif /* DISABLE_MCAL_INTERMODULE_ASR_CHECK */
49 
50 /* Check if Adc_Sar_Ip_Irq.c file and Adc_Sar_Ip_Irq.h file are of the same vendor */
51 #if (ADC_SAR_IP_VENDOR_ID_IRQ_C != ADC_SAR_IP_VENDOR_ID_IRQ)
52     #error "Adc_Sar_Ip_Irq.c and Adc_Sar_Ip_Irq.h have different vendor ids"
53 #endif
54 
55 /* Check if Adc_Sar_Ip_Irq.c file and Adc_Sar_Ip_Irq.h file are of the same Autosar version */
56 #if ((ADC_SAR_IP_AR_RELEASE_MAJOR_VERSION_IRQ_C != ADC_SAR_IP_AR_RELEASE_MAJOR_VERSION_IRQ) || \
57      (ADC_SAR_IP_AR_RELEASE_MINOR_VERSION_IRQ_C != ADC_SAR_IP_AR_RELEASE_MINOR_VERSION_IRQ) || \
58      (ADC_SAR_IP_AR_RELEASE_REVISION_VERSION_IRQ_C != ADC_SAR_IP_AR_RELEASE_REVISION_VERSION_IRQ) \
59     )
60     #error "AutoSar Version Numbers of Adc_Sar_Ip_Irq.c and Adc_Sar_Ip_Irq.h are different"
61 #endif
62 
63 /* Check if Adc_Sar_Ip_Irq.c file and Adc_Sar_Ip_Irq.h file are of the same Software version */
64 #if ((ADC_SAR_IP_SW_MAJOR_VERSION_IRQ_C != ADC_SAR_IP_SW_MAJOR_VERSION_IRQ) || \
65      (ADC_SAR_IP_SW_MINOR_VERSION_IRQ_C != ADC_SAR_IP_SW_MINOR_VERSION_IRQ) || \
66      (ADC_SAR_IP_SW_PATCH_VERSION_IRQ_C != ADC_SAR_IP_SW_PATCH_VERSION_IRQ) \
67     )
68   #error "Software Version Numbers of Adc_Sar_Ip_Irq.c and Adc_Sar_Ip_Irq.h are different"
69 #endif
70 
71 /*==================================================================================================
72 *                                        GLOBAL CONSTANTS
73 ==================================================================================================*/
74 
75 /*==================================================================================================
76 *                                        GLOBAL FUNCTIONS
77 ==================================================================================================*/
78 #define ADC_START_SEC_CODE
79 #include "Adc_MemMap.h"
80 
ISR(Adc_Sar_0_Isr)81 ISR(Adc_Sar_0_Isr)
82 {
83     /* Call IRQ handler with the correct instance */
84     Adc_Sar_Ip_IRQHandler(0UL);
85 }
86 
87 #if (ADC_SAR_IP_INSTANCE_COUNT >= 2)
ISR(Adc_Sar_1_Isr)88 ISR(Adc_Sar_1_Isr)
89 {
90     /* Call IRQ handler with the correct instance */
91     Adc_Sar_Ip_IRQHandler(1UL);
92 }
93 #endif /* (ADC_SAR_IP_INSTANCE_COUNT >= 2) */
94 
95 #if (ADC_SAR_IP_INSTANCE_COUNT >= 3)
ISR(Adc_Sar_2_Isr)96 ISR(Adc_Sar_2_Isr)
97 {
98     /* Call IRQ handler with the correct instance */
99     Adc_Sar_Ip_IRQHandler(2UL);
100 }
101 #endif /* (ADC_SAR_IP_INSTANCE_COUNT >= 3) */
102 
103 #if (ADC_SAR_IP_INSTANCE_COUNT >= 4)
ISR(Adc_Sar_3_Isr)104 ISR(Adc_Sar_3_Isr)
105 {
106     /* Call IRQ handler with the correct instance */
107     Adc_Sar_Ip_IRQHandler(3UL);
108 }
109 #endif /* (ADC_SAR_IP_INSTANCE_COUNT >= 4) */
110 
111 #if (ADC_SAR_IP_INSTANCE_COUNT >= 5)
ISR(Adc_Sar_4_Isr)112 ISR(Adc_Sar_4_Isr)
113 {
114     /* Call IRQ handler with the correct instance */
115     Adc_Sar_Ip_IRQHandler(4UL);
116 }
117 #endif /* (ADC_SAR_IP_INSTANCE_COUNT >= 5) */
118 
119 #if (ADC_SAR_IP_INSTANCE_COUNT >= 6)
ISR(Adc_Sar_5_Isr)120 ISR(Adc_Sar_5_Isr)
121 {
122     /* Call IRQ handler with the correct instance */
123     Adc_Sar_Ip_IRQHandler(5UL);
124 }
125 #endif /* (ADC_SAR_IP_INSTANCE_COUNT >= 6) */
126 
127 #if (ADC_SAR_IP_INSTANCE_COUNT >= 7)
ISR(Adc_Sar_6_Isr)128 ISR(Adc_Sar_6_Isr)
129 {
130     /* Call IRQ handler with the correct instance */
131     Adc_Sar_Ip_IRQHandler(6UL);
132 }
133 #endif /* (ADC_SAR_IP_INSTANCE_COUNT >= 7) */
134 
135 #define ADC_STOP_SEC_CODE
136 #include "Adc_MemMap.h"
137 
138 /*==================================================================================================
139 *                                        GLOBAL VARIABLES
140 ==================================================================================================*/
141 
142 /*==================================================================================================
143 *                                        LOCAL FUNCTIONS
144 ==================================================================================================*/
145 
146 #ifdef __cplusplus
147 }
148 #endif
149 
150 /** @} */
151