stm32_isr.h 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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 STM32L4xx/stm32_isr.h
  15. * @brief STM32L4xx ISR handler header.
  16. *
  17. * @addtogroup SRM32L4xx_ISR
  18. * @{
  19. */
  20. #ifndef STM32_ISR_H
  21. #define STM32_ISR_H
  22. /*===========================================================================*/
  23. /* Driver constants. */
  24. /*===========================================================================*/
  25. /**
  26. * @name ISRs suppressed in standard drivers
  27. * @{
  28. */
  29. #define STM32_TIM1_SUPPRESS_ISR
  30. #define STM32_TIM15_SUPPRESS_ISR
  31. #define STM32_TIM16_SUPPRESS_ISR
  32. #define STM32_TIM17_SUPPRESS_ISR
  33. /** @} */
  34. /*===========================================================================*/
  35. /* Driver pre-compile time settings. */
  36. /*===========================================================================*/
  37. /**
  38. * @name Configuration options
  39. * @{
  40. */
  41. /**
  42. * @brief EXTI0 interrupt priority level setting.
  43. */
  44. #if !defined(STM32_IRQ_EXTI0_PRIORITY) || defined(__DOXYGEN__)
  45. #define STM32_IRQ_EXTI0_PRIORITY 6
  46. #endif
  47. /**
  48. * @brief EXTI1 interrupt priority level setting.
  49. */
  50. #if !defined(STM32_IRQ_EXTI1_PRIORITY) || defined(__DOXYGEN__)
  51. #define STM32_IRQ_EXTI1_PRIORITY 6
  52. #endif
  53. /**
  54. * @brief EXTI2 interrupt priority level setting.
  55. */
  56. #if !defined(STM32_IRQ_EXTI2_PRIORITY) || defined(__DOXYGEN__)
  57. #define STM32_IRQ_EXTI2_PRIORITY 6
  58. #endif
  59. /**
  60. * @brief EXTI3 interrupt priority level setting.
  61. */
  62. #if !defined(STM32_IRQ_EXTI3_PRIORITY) || defined(__DOXYGEN__)
  63. #define STM32_IRQ_EXTI3_PRIORITY 6
  64. #endif
  65. /**
  66. * @brief EXTI4 interrupt priority level setting.
  67. */
  68. #if !defined(STM32_IRQ_EXTI4_PRIORITY) || defined(__DOXYGEN__)
  69. #define STM32_IRQ_EXTI4_PRIORITY 6
  70. #endif
  71. /**
  72. * @brief EXTI9..5 interrupt priority level setting.
  73. */
  74. #if !defined(STM32_IRQ_EXTI5_9_PRIORITY) || defined(__DOXYGEN__)
  75. #define STM32_IRQ_EXTI5_9_PRIORITY 6
  76. #endif
  77. /**
  78. * @brief EXTI15..10 interrupt priority level setting.
  79. */
  80. #if !defined(STM32_IRQ_EXTI10_15_PRIORITY) || defined(__DOXYGEN__)
  81. #define STM32_IRQ_EXTI10_15_PRIORITY 6
  82. #endif
  83. /**
  84. * @brief EXTI16-EXTI35..38 interrupt priority level setting.
  85. */
  86. #if !defined(STM32_IRQ_EXTI1635_38_PRIORITY) || defined(__DOXYGEN__)
  87. #define STM32_IRQ_EXTI1635_38_IRQ_PRIORIT 6
  88. #endif
  89. /**
  90. * @brief EXTI18 interrupt priority level setting.
  91. */
  92. #if !defined(STM32_IRQ_EXTI18_PRIORITY) || defined(__DOXYGEN__)
  93. #define STM32_IRQ_EXTI18_PRIORITY 6
  94. #endif
  95. /**
  96. * @brief EXTI19 interrupt priority level setting.
  97. */
  98. #if !defined(STM32_IRQ_EXTI19_PRIORITY) || defined(__DOXYGEN__)
  99. #define STM32_IRQ_EXTI19_PRIORITY 6
  100. #endif
  101. /**
  102. * @brief EXTI20 interrupt priority level setting.
  103. */
  104. #if !defined(STM32_IRQ_EXTI20_PRIORITY) || defined(__DOXYGEN__)
  105. #define STM32_IRQ_EXTI20_PRIORITY 6
  106. #endif
  107. /**
  108. * @brief EXTI21..22 interrupt priority level setting.
  109. */
  110. #if !defined(STM32_IRQ_EXTI21_22_PRIORITY) || defined(__DOXYGEN__)
  111. #define STM32_IRQ_EXTI21_22_PRIORITY 6
  112. #endif
  113. /**
  114. * @brief TIM1-BRK, TIM15 interrupt priority level setting.
  115. */
  116. #if !defined(STM32_IRQ_TIM1_BRK_TIM15_PRIORITY) || defined(__DOXYGEN__)
  117. #define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
  118. #endif
  119. /**
  120. * @brief TIM1-UP, TIM16 interrupt priority level setting.
  121. */
  122. #if !defined(STM32_IRQ_TIM1_UP_TIM16_PRIORITY) || defined(__DOXYGEN__)
  123. #define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
  124. #endif
  125. /**
  126. * @brief TIM1-TRG-COM, TIM17 interrupt priority level setting.
  127. */
  128. #if !defined(STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY) || defined(__DOXYGEN__)
  129. #define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
  130. #endif
  131. /**
  132. * @brief TIM1-CC interrupt priority level setting.
  133. */
  134. #if !defined(STM32_IRQ_TIM1_CC_PRIORITY) || defined(__DOXYGEN__)
  135. #define STM32_IRQ_TIM1_CC_PRIORITY 7
  136. #endif
  137. /** @} */
  138. /*===========================================================================*/
  139. /* Derived constants and error checks. */
  140. /*===========================================================================*/
  141. /* IRQ priority checks.*/
  142. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI0_PRIORITY)
  143. #error "Invalid IRQ priority assigned to STM32_IRQ_EXTI0_PRIORITY"
  144. #endif
  145. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI1_PRIORITY)
  146. #error "Invalid IRQ priority assigned to STM32_IRQ_EXTI1_PRIORITY"
  147. #endif
  148. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI2_PRIORITY)
  149. #error "Invalid IRQ priority assigned to STM32_IRQ_EXTI2_PRIORITY"
  150. #endif
  151. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI3_PRIORITY)
  152. #error "Invalid IRQ priority assigned to STM32_IRQ_EXTI3_PRIORITY"
  153. #endif
  154. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI4_PRIORITY)
  155. #error "Invalid IRQ priority assigned to STM32_IRQ_EXTI4_PRIORITY"
  156. #endif
  157. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI5_9_PRIORITY)
  158. #error "Invalid IRQ priority assigned to STM32_IRQ_EXTI5_9_PRIORITY"
  159. #endif
  160. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI10_15_PRIORITY)
  161. #error "Invalid IRQ priority assigned to STM32_IRQ_EXTI10_15_PRIORITY"
  162. #endif
  163. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI1635_38_PRIORITY)
  164. #error "Invalid IRQ priority assigned to STM32_IRQ_EXTI1635_38_PRIORITY"
  165. #endif
  166. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI18_PRIORITY)
  167. #error "Invalid IRQ priority assigned to STM32_IRQ_EXTI18_PRIORITY"
  168. #endif
  169. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI19_PRIORITY)
  170. #error "Invalid IRQ priority assigned to STM32_IRQ_EXTI19_PRIORITY"
  171. #endif
  172. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI20_PRIORITY)
  173. #error "Invalid IRQ priority assigned to STM32_IRQ_EXTI20_PRIORITY"
  174. #endif
  175. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI21_22_PRIORITY)
  176. #error "Invalid IRQ priority assigned to STM32_IRQ_EXTI21_22_PRIORITY"
  177. #endif
  178. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_TIM1_BRK_TIM15_PRIORITY)
  179. #error "Invalid IRQ priority assigned to STM32_IRQ_TIM1_BRK_TIM15_PRIORITY"
  180. #endif
  181. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_TIM1_UP_TIM16_PRIORITY)
  182. #error "Invalid IRQ priority assigned to STM32_IRQ_TIM1_UP_TIM16_PRIORITY"
  183. #endif
  184. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY)
  185. #error "Invalid IRQ priority assigned to STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY"
  186. #endif
  187. #if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_TIM1_CC_PRIORITY)
  188. #error "Invalid IRQ priority assigned to STM32_IRQ_TIM1_CC_PRIORITY"
  189. #endif
  190. /*===========================================================================*/
  191. /* Driver data structures and types. */
  192. /*===========================================================================*/
  193. /*===========================================================================*/
  194. /* Driver macros. */
  195. /*===========================================================================*/
  196. /*===========================================================================*/
  197. /* External declarations. */
  198. /*===========================================================================*/
  199. #ifdef __cplusplus
  200. extern "C" {
  201. #endif
  202. void irqInit(void);
  203. void irqDeinit(void);
  204. #ifdef __cplusplus
  205. }
  206. #endif
  207. #endif /* STM32_ISR_H */
  208. /** @} */