diff options
Diffstat (limited to 'lib/chibios/os/hal/ports/STM32/STM32L5xx/stm32_isr.c')
-rw-r--r-- | lib/chibios/os/hal/ports/STM32/STM32L5xx/stm32_isr.c | 192 |
1 files changed, 192 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/ports/STM32/STM32L5xx/stm32_isr.c b/lib/chibios/os/hal/ports/STM32/STM32L5xx/stm32_isr.c new file mode 100644 index 000000000..dc5e5ba06 --- /dev/null +++ b/lib/chibios/os/hal/ports/STM32/STM32L5xx/stm32_isr.c | |||
@@ -0,0 +1,192 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | /** | ||
18 | * @file STM32L5xx/stm32_isr.c | ||
19 | * @brief STM32L5xx ISR handler code. | ||
20 | * | ||
21 | * @addtogroup STM32L5xx_ISR | ||
22 | * @{ | ||
23 | */ | ||
24 | |||
25 | #include "hal.h" | ||
26 | |||
27 | /*===========================================================================*/ | ||
28 | /* Driver local definitions. */ | ||
29 | /*===========================================================================*/ | ||
30 | |||
31 | /*===========================================================================*/ | ||
32 | /* Driver exported variables. */ | ||
33 | /*===========================================================================*/ | ||
34 | |||
35 | /*===========================================================================*/ | ||
36 | /* Driver local variables. */ | ||
37 | /*===========================================================================*/ | ||
38 | |||
39 | /*===========================================================================*/ | ||
40 | /* Driver local functions. */ | ||
41 | /*===========================================================================*/ | ||
42 | |||
43 | #define exti_serve_irq(pr, channel) { \ | ||
44 | \ | ||
45 | if ((pr) & (1U << (channel))) { \ | ||
46 | _pal_isr_code(channel); \ | ||
47 | } \ | ||
48 | } | ||
49 | |||
50 | /*===========================================================================*/ | ||
51 | /* Driver interrupt handlers. */ | ||
52 | /*===========================================================================*/ | ||
53 | |||
54 | #include "stm32_exti0.inc" | ||
55 | #include "stm32_exti1.inc" | ||
56 | #include "stm32_exti2.inc" | ||
57 | #include "stm32_exti3.inc" | ||
58 | #include "stm32_exti4.inc" | ||
59 | #include "stm32_exti5.inc" | ||
60 | #include "stm32_exti6.inc" | ||
61 | #include "stm32_exti7.inc" | ||
62 | #include "stm32_exti8.inc" | ||
63 | #include "stm32_exti9.inc" | ||
64 | #include "stm32_exti10.inc" | ||
65 | #include "stm32_exti11.inc" | ||
66 | #include "stm32_exti12.inc" | ||
67 | #include "stm32_exti13.inc" | ||
68 | #include "stm32_exti14.inc" | ||
69 | #include "stm32_exti15.inc" | ||
70 | #include "stm32_exti16-35_38.inc" | ||
71 | #include "stm32_exti17.inc" | ||
72 | #include "stm32_exti18.inc" | ||
73 | #include "stm32_exti19.inc" | ||
74 | #include "stm32_exti20.inc" | ||
75 | #include "stm32_exti21_22.inc" | ||
76 | |||
77 | #include "stm32_usart1.inc" | ||
78 | #include "stm32_usart2.inc" | ||
79 | #include "stm32_usart3.inc" | ||
80 | #include "stm32_uart4.inc" | ||
81 | #include "stm32_uart5.inc" | ||
82 | #include "stm32_lpuart1.inc" | ||
83 | |||
84 | #include "stm32_tim1.inc" | ||
85 | #include "stm32_tim2.inc" | ||
86 | #include "stm32_tim3.inc" | ||
87 | #include "stm32_tim4.inc" | ||
88 | #include "stm32_tim5.inc" | ||
89 | #include "stm32_tim6.inc" | ||
90 | #include "stm32_tim7.inc" | ||
91 | #include "stm32_tim8.inc" | ||
92 | #include "stm32_tim15.inc" | ||
93 | #include "stm32_tim16.inc" | ||
94 | #include "stm32_tim17.inc" | ||
95 | |||
96 | /*===========================================================================*/ | ||
97 | /* Driver exported functions. */ | ||
98 | /*===========================================================================*/ | ||
99 | |||
100 | /** | ||
101 | * @brief Enables IRQ sources. | ||
102 | * | ||
103 | * @notapi | ||
104 | */ | ||
105 | void irqInit(void) { | ||
106 | |||
107 | exti0_irq_init(); | ||
108 | exti1_irq_init(); | ||
109 | exti2_irq_init(); | ||
110 | exti3_irq_init(); | ||
111 | exti4_irq_init(); | ||
112 | exti5_irq_init(); | ||
113 | exti6_irq_init(); | ||
114 | exti7_irq_init(); | ||
115 | exti8_irq_init(); | ||
116 | exti9_irq_init(); | ||
117 | exti10_irq_init(); | ||
118 | exti11_irq_init(); | ||
119 | exti12_irq_init(); | ||
120 | exti13_irq_init(); | ||
121 | exti14_irq_init(); | ||
122 | exti15_irq_init(); | ||
123 | exti16_exti35_38_irq_init(); | ||
124 | exti17_irq_init(); | ||
125 | exti18_irq_init(); | ||
126 | exti19_irq_init(); | ||
127 | exti21_22_irq_init(); | ||
128 | |||
129 | tim1_tim15_tim16_tim17_irq_init(); | ||
130 | tim2_irq_init(); | ||
131 | tim3_irq_init(); | ||
132 | tim4_irq_init(); | ||
133 | tim5_irq_init(); | ||
134 | tim6_irq_init(); | ||
135 | tim7_irq_init(); | ||
136 | tim8_irq_init(); | ||
137 | |||
138 | usart1_irq_init(); | ||
139 | usart2_irq_init(); | ||
140 | usart3_irq_init(); | ||
141 | uart4_irq_init(); | ||
142 | uart5_irq_init(); | ||
143 | lpuart1_irq_init(); | ||
144 | } | ||
145 | |||
146 | /** | ||
147 | * @brief Disables IRQ sources. | ||
148 | * | ||
149 | * @notapi | ||
150 | */ | ||
151 | void irqDeinit(void) { | ||
152 | |||
153 | exti0_irq_deinit(); | ||
154 | exti1_irq_deinit(); | ||
155 | exti2_irq_deinit(); | ||
156 | exti3_irq_deinit(); | ||
157 | exti4_irq_deinit(); | ||
158 | exti5_irq_deinit(); | ||
159 | exti6_irq_deinit(); | ||
160 | exti7_irq_deinit(); | ||
161 | exti8_irq_deinit(); | ||
162 | exti9_irq_deinit(); | ||
163 | exti10_irq_deinit(); | ||
164 | exti11_irq_deinit(); | ||
165 | exti12_irq_deinit(); | ||
166 | exti13_irq_deinit(); | ||
167 | exti14_irq_deinit(); | ||
168 | exti15_irq_deinit(); | ||
169 | exti16_exti35_38_irq_deinit(); | ||
170 | exti17_irq_deinit(); | ||
171 | exti18_irq_deinit(); | ||
172 | exti19_irq_deinit(); | ||
173 | exti21_22_irq_deinit(); | ||
174 | |||
175 | tim1_tim15_tim16_tim17_irq_deinit(); | ||
176 | tim2_irq_deinit(); | ||
177 | tim3_irq_deinit(); | ||
178 | tim4_irq_deinit(); | ||
179 | tim5_irq_deinit(); | ||
180 | tim6_irq_deinit(); | ||
181 | tim7_irq_deinit(); | ||
182 | tim8_irq_deinit(); | ||
183 | |||
184 | usart1_irq_deinit(); | ||
185 | usart2_irq_deinit(); | ||
186 | usart3_irq_deinit(); | ||
187 | uart4_irq_deinit(); | ||
188 | uart5_irq_deinit(); | ||
189 | lpuart1_irq_deinit(); | ||
190 | } | ||
191 | |||
192 | /** @} */ | ||