stm32_isr.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. /**
  14. * @file STM32L1xx/stm32_isr.h
  15. * @brief STM32L1xx ISR handler header.
  16. *
  17. * @addtogroup STM32L1xx_ISR
  18. * @{
  19. */
  20. #ifndef STM32_ISR_H
  21. #define STM32_ISR_H
  22. /*===========================================================================*/
  23. /* Driver constants. */
  24. /*===========================================================================*/
  25. /**
  26. * @name ISR names and numbers remapping
  27. * @{
  28. */
  29. /*
  30. * I2C units.
  31. */
  32. #define STM32_I2C1_EVENT_HANDLER VectorBC
  33. #define STM32_I2C1_ERROR_HANDLER VectorC0
  34. #define STM32_I2C1_EVENT_NUMBER 31
  35. #define STM32_I2C1_ERROR_NUMBER 32
  36. #define STM32_I2C2_EVENT_HANDLER VectorC4
  37. #define STM32_I2C2_ERROR_HANDLER VectorC8
  38. #define STM32_I2C2_EVENT_NUMBER 33
  39. #define STM32_I2C2_ERROR_NUMBER 34
  40. /*
  41. * TIM units.
  42. */
  43. #define STM32_TIM2_HANDLER VectorB0
  44. #define STM32_TIM3_HANDLER VectorB4
  45. #define STM32_TIM4_HANDLER VectorB8
  46. #define STM32_TIM5_HANDLER VectorF8
  47. #define STM32_TIM6_HANDLER VectorEC
  48. #define STM32_TIM7_HANDLER VectorF0
  49. #define STM32_TIM9_HANDLER VectorA4
  50. #define STM32_TIM10_HANDLER VectorA8
  51. #define STM32_TIM11_HANDLER VectorAC
  52. #define STM32_TIM2_NUMBER 28
  53. #define STM32_TIM3_NUMBER 29
  54. #define STM32_TIM4_NUMBER 30
  55. #define STM32_TIM5_NUMBER 46
  56. #define STM32_TIM6_NUMBER 43
  57. #define STM32_TIM7_NUMBER 44
  58. #define STM32_TIM9_NUMBER 25
  59. #define STM32_TIM10_NUMBER 26
  60. #define STM32_TIM11_NUMBER 27
  61. /*
  62. * USART units.
  63. */
  64. #define STM32_USART1_HANDLER VectorD4
  65. #define STM32_USART2_HANDLER VectorD8
  66. #define STM32_USART3_HANDLER VectorDC
  67. #define STM32_UART4_HANDLER Vector100
  68. #define STM32_UART5_HANDLER Vector104
  69. #define STM32_USART1_NUMBER 37
  70. #define STM32_USART2_NUMBER 38
  71. #define STM32_USART3_NUMBER 39
  72. #define STM32_UART4_NUMBER 48
  73. #define STM32_UART5_NUMBER 49
  74. /*
  75. * USB units.
  76. */
  77. #define STM32_USB1_HP_HANDLER Vector8C
  78. #define STM32_USB1_LP_HANDLER Vector90
  79. #define STM32_USB1_HP_NUMBER 19
  80. #define STM32_USB1_LP_NUMBER 20
  81. /** @} */
  82. /*===========================================================================*/
  83. /* Driver pre-compile time settings. */
  84. /*===========================================================================*/
  85. /**
  86. * @name Configuration options
  87. * @{
  88. */
  89. /**
  90. * @brief EXTI0 interrupt priority level setting.
  91. */
  92. #if !defined(STM32_IRQ_EXTI0_PRIORITY) || defined(__DOXYGEN__)
  93. #define STM32_IRQ_EXTI0_PRIORITY 6
  94. #endif
  95. /**
  96. * @brief EXTI1 interrupt priority level setting.
  97. */
  98. #if !defined(STM32_IRQ_EXTI1_PRIORITY) || defined(__DOXYGEN__)
  99. #define STM32_IRQ_EXTI1_PRIORITY 6
  100. #endif
  101. /**
  102. * @brief EXTI2 interrupt priority level setting.
  103. */
  104. #if !defined(STM32_IRQ_EXTI2_PRIORITY) || defined(__DOXYGEN__)
  105. #define STM32_IRQ_EXTI2_PRIORITY 6
  106. #endif
  107. /**
  108. * @brief EXTI3 interrupt priority level setting.
  109. */
  110. #if !defined(STM32_IRQ_EXTI3_PRIORITY) || defined(__DOXYGEN__)
  111. #define STM32_IRQ_EXTI3_PRIORITY 6
  112. #endif
  113. /**
  114. * @brief EXTI4 interrupt priority level setting.
  115. */
  116. #if !defined(STM32_IRQ_EXTI4_PRIORITY) || defined(__DOXYGEN__)
  117. #define STM32_IRQ_EXTI4_PRIORITY 6
  118. #endif
  119. /**
  120. * @brief EXTI9..5 interrupt priority level setting.
  121. */
  122. #if !defined(STM32_IRQ_EXTI5_9_PRIORITY) || defined(__DOXYGEN__)
  123. #define STM32_IRQ_EXTI5_9_PRIORITY 6
  124. #endif
  125. /**
  126. * @brief EXTI15..10 interrupt priority level setting.
  127. */
  128. #if !defined(STM32_IRQ_EXTI10_15_PRIORITY) || defined(__DOXYGEN__)
  129. #define STM32_IRQ_EXTI10_15_PRIORITY 6
  130. #endif
  131. /**
  132. * @brief EXTI16 interrupt priority level setting.
  133. */
  134. #if !defined(STM32_IRQ_EXTI16_PRIORITY) || defined(__DOXYGEN__)
  135. #define STM32_IRQ_EXTI16_PRIORITY 6
  136. #endif
  137. /**
  138. * @brief EXTI17 interrupt priority level setting.
  139. */
  140. #if !defined(STM32_IRQ_EXTI17_PRIORITY) || defined(__DOXYGEN__)
  141. #define STM32_IRQ_EXTI17_PRIORITY 6
  142. #endif
  143. /**
  144. * @brief EXTI18 interrupt priority level setting.
  145. */
  146. #if !defined(STM32_IRQ_EXTI18_PRIORITY) || defined(__DOXYGEN__)
  147. #define STM32_IRQ_EXTI18_PRIORITY 6
  148. #endif
  149. /**
  150. * @brief EXTI19 interrupt priority level setting.
  151. */
  152. #if !defined(STM32_IRQ_EXTI19_PRIORITY) || defined(__DOXYGEN__)
  153. #define STM32_IRQ_EXTI19_PRIORITY 6
  154. #endif
  155. /**
  156. * @brief EXTI20 interrupt priority level setting.
  157. */
  158. #if !defined(STM32_IRQ_EXTI20_PRIORITY) || defined(__DOXYGEN__)
  159. #define STM32_IRQ_EXTI20_PRIORITY 6
  160. #endif
  161. /**
  162. * @brief EXTI21..22 interrupt priority level setting.
  163. */
  164. #if !defined(STM32_IRQ_EXTI21_22_PRIORITY) || defined(__DOXYGEN__)
  165. #define STM32_IRQ_EXTI21_22_PRIORITY 6
  166. #endif
  167. /**
  168. * @brief EXTI23 interrupt priority level setting.
  169. */
  170. #if !defined(STM32_IRQ_EXTI23_PRIORITY) || defined(__DOXYGEN__)
  171. #define STM32_IRQ_EXTI23_PRIORITY 6
  172. #endif
  173. /** @} */
  174. /*===========================================================================*/
  175. /* Derived constants and error checks. */
  176. /*===========================================================================*/
  177. /*===========================================================================*/
  178. /* Driver data structures and types. */
  179. /*===========================================================================*/
  180. /*===========================================================================*/
  181. /* Driver macros. */
  182. /*===========================================================================*/
  183. /*===========================================================================*/
  184. /* External declarations. */
  185. /*===========================================================================*/
  186. #ifdef __cplusplus
  187. extern "C" {
  188. #endif
  189. void irqInit(void);
  190. void irqDeinit(void);
  191. #ifdef __cplusplus
  192. }
  193. #endif
  194. #endif /* STM32_ISR_H */
  195. /** @} */