aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/hal/ports/STM32/STM32F0xx/stm32_isr.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/hal/ports/STM32/STM32F0xx/stm32_isr.h')
-rw-r--r--lib/chibios/os/hal/ports/STM32/STM32F0xx/stm32_isr.h246
1 files changed, 246 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/ports/STM32/STM32F0xx/stm32_isr.h b/lib/chibios/os/hal/ports/STM32/STM32F0xx/stm32_isr.h
new file mode 100644
index 000000000..25b4cef35
--- /dev/null
+++ b/lib/chibios/os/hal/ports/STM32/STM32F0xx/stm32_isr.h
@@ -0,0 +1,246 @@
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 STM32F0xx/stm32_isr.h
19 * @brief STM32F0xx ISR handler header.
20 *
21 * @addtogroup STM32F0xx_ISR
22 * @{
23 */
24
25#ifndef STM32_ISR_H
26#define STM32_ISR_H
27
28/*===========================================================================*/
29/* Driver constants. */
30/*===========================================================================*/
31
32/**
33 * @name ISRs suppressed in standard drivers
34 * @{
35 */
36#define STM32_USART1_SUPPRESS_ISR
37#define STM32_USART2_SUPPRESS_ISR
38#define STM32_USART3_SUPPRESS_ISR
39#define STM32_UART4_SUPPRESS_ISR
40#define STM32_UART5_SUPPRESS_ISR
41#define STM32_USART6_SUPPRESS_ISR
42#define STM32_UART7_SUPPRESS_ISR
43#define STM32_UART8_SUPPRESS_ISR
44/** @} */
45
46/**
47 * @name ISR names and numbers remapping
48 * @{
49 */
50/*
51 * CAN units.
52 */
53#define STM32_CAN1_UNIFIED_HANDLER VectorB8
54#define STM32_CAN1_UNIFIED_NUMBER 30
55
56/*
57 * I2C units.
58 */
59#define STM32_I2C1_GLOBAL_HANDLER Vector9C
60#define STM32_I2C1_GLOBAL_NUMBER 23
61
62#define STM32_I2C2_GLOBAL_HANDLER VectorA0
63#define STM32_I2C2_GLOBAL_NUMBER 24
64
65/*
66 * TIM units.
67 */
68#define STM32_TIM1_UP_HANDLER Vector74
69#define STM32_TIM1_CC_HANDLER Vector78
70#define STM32_TIM2_HANDLER Vector7C
71#define STM32_TIM3_HANDLER Vector80
72#define STM32_TIM6_HANDLER Vector84
73#define STM32_TIM7_HANDLER Vector88
74#define STM32_TIM14_HANDLER Vector8C
75#define STM32_TIM15_HANDLER Vector90
76#define STM32_TIM16_HANDLER Vector94
77#define STM32_TIM17_HANDLER Vector98
78
79#define STM32_TIM1_UP_NUMBER 13
80#define STM32_TIM1_CC_NUMBER 14
81#define STM32_TIM2_NUMBER 15
82#define STM32_TIM3_NUMBER 16
83#define STM32_TIM6_NUMBER 17
84#define STM32_TIM7_NUMBER 18
85#define STM32_TIM14_NUMBER 19
86#define STM32_TIM15_NUMBER 20
87#define STM32_TIM16_NUMBER 21
88#define STM32_TIM17_NUMBER 22
89
90/*
91 * USART units.
92 */
93#define STM32_USART1_HANDLER VectorAC
94#define STM32_USART2_HANDLER VectorB0
95#define STM32_USART3_8_HANDLER VectorB4
96
97#define STM32_USART1_NUMBER 27
98#define STM32_USART2_NUMBER 28
99#define STM32_USART3_8_NUMBER 29
100
101/*
102 * USB units.
103 */
104#define STM32_USB1_LP_HANDLER VectorBC
105#define STM32_USB1_LP_NUMBER 31
106#define STM32_USB1_HP_HANDLER VectorBC
107#define STM32_USB1_HP_NUMBER 31
108/** @} */
109
110/*===========================================================================*/
111/* Driver pre-compile time settings. */
112/*===========================================================================*/
113
114/**
115 * @name Configuration options
116 * @{
117 */
118/**
119 * @brief EXTI0..1 interrupt priority level setting.
120 */
121#if !defined(STM32_IRQ_EXTI0_1_PRIORITY) || defined(__DOXYGEN__)
122#define STM32_IRQ_EXTI0_1_PRIORITY 3
123#endif
124
125/**
126 * @brief EXTI2..3 interrupt priority level setting.
127 */
128#if !defined(STM32_IRQ_EXTI2_3_PRIORITY) || defined(__DOXYGEN__)
129#define STM32_IRQ_EXTI2_3_PRIORITY 3
130#endif
131
132/**
133 * @brief EXTI4..15 interrupt priority level setting.
134 */
135#if !defined(STM32_IRQ_EXTI4_15_PRIORITY) || defined(__DOXYGEN__)
136#define STM32_IRQ_EXTI4_15_PRIORITY 3
137#endif
138
139/**
140 * @brief EXTI16 interrupt priority level setting.
141 */
142#if !defined(STM32_IRQ_EXTI16_PRIORITY) || defined(__DOXYGEN__)
143#define STM32_IRQ_EXTI16_PRIORITY 3
144#endif
145
146/**
147 * @brief EXTI17,19,20 interrupt priority level setting.
148 */
149#if !defined(STM32_IRQ_EXTI17_20_PRIORITY) || defined(__DOXYGEN__)
150#define STM32_IRQ_EXTI17_20_PRIORITY 3
151#endif
152
153/**
154 * @brief EXTI21,22 interrupt priority level setting.
155 */
156#if !defined(STM32_IRQ_EXTI21_22_PRIORITY) || defined(__DOXYGEN__)
157#define STM32_IRQ_EXTI21_22_PRIORITY 3
158#endif
159
160/**
161 * @brief USART1 interrupt priority level setting.
162 */
163#if !defined(STM32_IRQ_USART1_PRIORITY) || defined(__DOXYGEN__)
164#define STM32_IRQ_USART1_PRIORITY 3
165#endif
166
167/**
168 * @brief USART2 interrupt priority level setting.
169 */
170#if !defined(STM32_IRQ_USART2_PRIORITY) || defined(__DOXYGEN__)
171#define STM32_IRQ_USART2_PRIORITY 3
172#endif
173
174/**
175 * @brief USART3..8 interrupt priority level setting.
176 */
177#if !defined(STM32_IRQ_USART3_8_PRIORITY) || defined(__DOXYGEN__)
178#define STM32_IRQ_USART3_8_PRIORITY 3
179#endif
180/** @} */
181
182/*===========================================================================*/
183/* Derived constants and error checks. */
184/*===========================================================================*/
185
186/* IRQ priority checks.*/
187#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI0_1_PRIORITY)
188#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI0_1_PRIORITY"
189#endif
190
191#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI2_3_PRIORITY)
192#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI2_3_PRIORITY"
193#endif
194
195#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI4_15_PRIORITY)
196#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI4_15_PRIORITY"
197#endif
198
199#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI16_PRIORITY)
200#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI16_PRIORITY"
201#endif
202
203#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI17_20_PRIORITY)
204#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI17_20_PRIORITY"
205#endif
206
207#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI21_22_PRIORITY)
208#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI21_22_PRIORITY"
209#endif
210
211#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_USART1_PRIORITY)
212#error "Invalid IRQ priority assigned to STM32_IRQ_USART1_PRIORITY"
213#endif
214
215#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_USART2_PRIORITY)
216#error "Invalid IRQ priority assigned to STM32_IRQ_USART2_PRIORITY"
217#endif
218
219#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_USART3_8_PRIORITY)
220#error "Invalid IRQ priority assigned to STM32_IRQ_USART3_8_PRIORITY"
221#endif
222
223/*===========================================================================*/
224/* Driver data structures and types. */
225/*===========================================================================*/
226
227/*===========================================================================*/
228/* Driver macros. */
229/*===========================================================================*/
230
231/*===========================================================================*/
232/* External declarations. */
233/*===========================================================================*/
234
235#ifdef __cplusplus
236extern "C" {
237#endif
238 void irqInit(void);
239 void irqDeinit(void);
240#ifdef __cplusplus
241}
242#endif
243
244#endif /* STM32_ISR_H */
245
246/** @} */