diff options
Diffstat (limited to 'lib/chibios/os/hal/ports/STM32/STM32F7xx/stm32_isr.c')
-rw-r--r-- | lib/chibios/os/hal/ports/STM32/STM32F7xx/stm32_isr.c | 176 |
1 files changed, 176 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/ports/STM32/STM32F7xx/stm32_isr.c b/lib/chibios/os/hal/ports/STM32/STM32F7xx/stm32_isr.c new file mode 100644 index 000000000..1fd78d5f4 --- /dev/null +++ b/lib/chibios/os/hal/ports/STM32/STM32F7xx/stm32_isr.c | |||
@@ -0,0 +1,176 @@ | |||
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 STM32F7xx/stm32_isr.c | ||
19 | * @brief STM32F7xx ISR handler code. | ||
20 | * | ||
21 | * @addtogroup STM32F7xx_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_9.inc" | ||
60 | #include "stm32_exti10_15.inc" | ||
61 | #include "stm32_exti16.inc" | ||
62 | #include "stm32_exti17.inc" | ||
63 | #include "stm32_exti18.inc" | ||
64 | #include "stm32_exti19.inc" | ||
65 | #include "stm32_exti20.inc" | ||
66 | #include "stm32_exti21.inc" | ||
67 | #include "stm32_exti22.inc" | ||
68 | #include "stm32_exti23.inc" | ||
69 | |||
70 | #include "stm32_usart1.inc" | ||
71 | #include "stm32_usart2.inc" | ||
72 | #include "stm32_usart3.inc" | ||
73 | #include "stm32_uart4.inc" | ||
74 | #include "stm32_uart5.inc" | ||
75 | #include "stm32_usart6.inc" | ||
76 | #include "stm32_uart7.inc" | ||
77 | #include "stm32_uart8.inc" | ||
78 | |||
79 | #include "stm32_tim1_9_10_11.inc" | ||
80 | #include "stm32_tim2.inc" | ||
81 | #include "stm32_tim3.inc" | ||
82 | #include "stm32_tim4.inc" | ||
83 | #include "stm32_tim5.inc" | ||
84 | #include "stm32_tim6.inc" | ||
85 | #include "stm32_tim7.inc" | ||
86 | #include "stm32_tim8_12_13_14.inc" | ||
87 | |||
88 | /*===========================================================================*/ | ||
89 | /* Driver exported functions. */ | ||
90 | /*===========================================================================*/ | ||
91 | |||
92 | /** | ||
93 | * @brief Enables IRQ sources. | ||
94 | * | ||
95 | * @notapi | ||
96 | */ | ||
97 | void irqInit(void) { | ||
98 | |||
99 | exti0_irq_init(); | ||
100 | exti1_irq_init(); | ||
101 | exti2_irq_init(); | ||
102 | exti3_irq_init(); | ||
103 | exti4_irq_init(); | ||
104 | exti5_9_irq_init(); | ||
105 | exti10_15_irq_init(); | ||
106 | exti16_irq_init(); | ||
107 | exti17_irq_init(); | ||
108 | exti18_irq_init(); | ||
109 | exti19_irq_init(); | ||
110 | exti20_irq_init(); | ||
111 | exti21_irq_init(); | ||
112 | exti22_irq_init(); | ||
113 | exti23_irq_init(); | ||
114 | |||
115 | tim1_tim9_tim10_tim11_irq_init(); | ||
116 | tim2_irq_init(); | ||
117 | tim3_irq_init(); | ||
118 | tim4_irq_init(); | ||
119 | tim5_irq_init(); | ||
120 | tim6_irq_init(); | ||
121 | tim7_irq_init(); | ||
122 | tim8_tim12_tim13_tim14_irq_init(); | ||
123 | |||
124 | usart1_irq_init(); | ||
125 | usart2_irq_init(); | ||
126 | usart3_irq_init(); | ||
127 | uart4_irq_init(); | ||
128 | uart5_irq_init(); | ||
129 | usart6_irq_init(); | ||
130 | uart7_irq_init(); | ||
131 | uart8_irq_init(); | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * @brief Disables IRQ sources. | ||
136 | * | ||
137 | * @notapi | ||
138 | */ | ||
139 | void irqDeinit(void) { | ||
140 | |||
141 | exti0_irq_deinit(); | ||
142 | exti1_irq_deinit(); | ||
143 | exti2_irq_deinit(); | ||
144 | exti3_irq_deinit(); | ||
145 | exti4_irq_deinit(); | ||
146 | exti5_9_irq_deinit(); | ||
147 | exti10_15_irq_deinit(); | ||
148 | exti16_irq_deinit(); | ||
149 | exti17_irq_deinit(); | ||
150 | exti18_irq_deinit(); | ||
151 | exti19_irq_deinit(); | ||
152 | exti20_irq_deinit(); | ||
153 | exti21_irq_deinit(); | ||
154 | exti22_irq_deinit(); | ||
155 | exti23_irq_deinit(); | ||
156 | |||
157 | tim1_tim9_tim10_tim11_irq_deinit(); | ||
158 | tim2_irq_deinit(); | ||
159 | tim3_irq_deinit(); | ||
160 | tim4_irq_deinit(); | ||
161 | tim5_irq_deinit(); | ||
162 | tim6_irq_deinit(); | ||
163 | tim7_irq_deinit(); | ||
164 | tim8_tim12_tim13_tim14_irq_deinit(); | ||
165 | |||
166 | usart1_irq_deinit(); | ||
167 | usart2_irq_deinit(); | ||
168 | usart3_irq_deinit(); | ||
169 | uart4_irq_deinit(); | ||
170 | uart5_irq_deinit(); | ||
171 | usart6_irq_deinit(); | ||
172 | uart7_irq_deinit(); | ||
173 | uart8_irq_deinit(); | ||
174 | } | ||
175 | |||
176 | /** @} */ | ||