You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1615 lines
62 KiB

  1. /**
  2. ******************************************************************************
  3. * @file stm32wbxx_ll_exti.h
  4. * @author MCD Application Team
  5. * @brief Header file of EXTI LL module.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under BSD 3-Clause license,
  13. * the "License"; You may not use this file except in compliance with the
  14. * License. You may obtain a copy of the License at:
  15. * opensource.org/licenses/BSD-3-Clause
  16. *
  17. ******************************************************************************
  18. */
  19. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef STM32WBxx_LL_EXTI_H
  21. #define STM32WBxx_LL_EXTI_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "stm32wbxx.h"
  27. /** @addtogroup STM32WBxx_LL_Driver
  28. * @{
  29. */
  30. #if defined (EXTI)
  31. /** @defgroup EXTI_LL EXTI
  32. * @{
  33. */
  34. /* Private types -------------------------------------------------------------*/
  35. /* Private variables ---------------------------------------------------------*/
  36. /* Private constants ---------------------------------------------------------*/
  37. /* Private Macros ------------------------------------------------------------*/
  38. #if defined(USE_FULL_LL_DRIVER)
  39. /** @defgroup EXTI_LL_Private_Macros EXTI Private Macros
  40. * @{
  41. */
  42. /**
  43. * @}
  44. */
  45. #endif /*USE_FULL_LL_DRIVER*/
  46. /* Exported types ------------------------------------------------------------*/
  47. #if defined(USE_FULL_LL_DRIVER)
  48. /** @defgroup EXTI_LL_ES_INIT EXTI Exported Init structure
  49. * @{
  50. */
  51. typedef struct
  52. {
  53. uint32_t Line_0_31; /*!< Specifies the EXTI lines to be enabled or disabled for Lines in range 0 to 31
  54. This parameter can be any combination of @ref EXTI_LL_EC_LINE */
  55. uint32_t Line_32_63; /*!< Specifies the EXTI lines to be enabled or disabled for Lines in range 32 to 63
  56. This parameter can be any combination of @ref EXTI_LL_EC_LINE */
  57. FunctionalState LineCommand; /*!< Specifies the new state of the selected EXTI lines.
  58. This parameter can be set either to ENABLE or DISABLE */
  59. uint8_t Mode; /*!< Specifies the mode for the EXTI lines.
  60. This parameter can be a value of @ref EXTI_LL_EC_MODE. */
  61. uint8_t Trigger; /*!< Specifies the trigger signal active edge for the EXTI lines.
  62. This parameter can be a value of @ref EXTI_LL_EC_TRIGGER. */
  63. } LL_EXTI_InitTypeDef;
  64. /**
  65. * @}
  66. */
  67. #endif /*USE_FULL_LL_DRIVER*/
  68. /* Exported constants --------------------------------------------------------*/
  69. /** @defgroup EXTI_LL_Exported_Constants EXTI Exported Constants
  70. * @{
  71. */
  72. /** @defgroup EXTI_LL_EC_LINE LINE
  73. * @{
  74. */
  75. #define LL_EXTI_LINE_0 EXTI_IMR1_IM0 /*!< Extended line 0 */
  76. #define LL_EXTI_LINE_1 EXTI_IMR1_IM1 /*!< Extended line 1 */
  77. #define LL_EXTI_LINE_2 EXTI_IMR1_IM2 /*!< Extended line 2 */
  78. #define LL_EXTI_LINE_3 EXTI_IMR1_IM3 /*!< Extended line 3 */
  79. #define LL_EXTI_LINE_4 EXTI_IMR1_IM4 /*!< Extended line 4 */
  80. #define LL_EXTI_LINE_5 EXTI_IMR1_IM5 /*!< Extended line 5 */
  81. #define LL_EXTI_LINE_6 EXTI_IMR1_IM6 /*!< Extended line 6 */
  82. #define LL_EXTI_LINE_7 EXTI_IMR1_IM7 /*!< Extended line 7 */
  83. #define LL_EXTI_LINE_8 EXTI_IMR1_IM8 /*!< Extended line 8 */
  84. #define LL_EXTI_LINE_9 EXTI_IMR1_IM9 /*!< Extended line 9 */
  85. #define LL_EXTI_LINE_10 EXTI_IMR1_IM10 /*!< Extended line 10 */
  86. #define LL_EXTI_LINE_11 EXTI_IMR1_IM11 /*!< Extended line 11 */
  87. #define LL_EXTI_LINE_12 EXTI_IMR1_IM12 /*!< Extended line 12 */
  88. #define LL_EXTI_LINE_13 EXTI_IMR1_IM13 /*!< Extended line 13 */
  89. #define LL_EXTI_LINE_14 EXTI_IMR1_IM14 /*!< Extended line 14 */
  90. #define LL_EXTI_LINE_15 EXTI_IMR1_IM15 /*!< Extended line 15 */
  91. #define LL_EXTI_LINE_16 EXTI_IMR1_IM16 /*!< Extended line 16 */
  92. #define LL_EXTI_LINE_17 EXTI_IMR1_IM17 /*!< Extended line 17 */
  93. #define LL_EXTI_LINE_18 EXTI_IMR1_IM18 /*!< Extended line 18 */
  94. #define LL_EXTI_LINE_19 EXTI_IMR1_IM19 /*!< Extended line 19 */
  95. #if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx)
  96. #define LL_EXTI_LINE_20 EXTI_IMR1_IM20 /*!< Extended line 20 */
  97. #define LL_EXTI_LINE_21 EXTI_IMR1_IM21 /*!< Extended line 21 */
  98. #endif
  99. #define LL_EXTI_LINE_22 EXTI_IMR1_IM22 /*!< Extended line 22 */
  100. #if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx)
  101. #define LL_EXTI_LINE_23 EXTI_IMR1_IM23 /*!< Extended line 23 */
  102. #endif
  103. #define LL_EXTI_LINE_24 EXTI_IMR1_IM24 /*!< Extended line 24 */
  104. #if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx)
  105. #define LL_EXTI_LINE_25 EXTI_IMR1_IM25 /*!< Extended line 25 */
  106. #define LL_EXTI_LINE_28 EXTI_IMR1_IM28 /*!< Extended line 28 */
  107. #endif
  108. #define LL_EXTI_LINE_29 EXTI_IMR1_IM29 /*!< Extended line 29 */
  109. #define LL_EXTI_LINE_30 EXTI_IMR1_IM30 /*!< Extended line 30 */
  110. #if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx)
  111. #define LL_EXTI_LINE_31 EXTI_IMR1_IM31 /*!< Extended line 31 */
  112. #endif
  113. #if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx)
  114. #define LL_EXTI_LINE_ALL_0_31 (LL_EXTI_LINE_0 | LL_EXTI_LINE_1 | LL_EXTI_LINE_2 | \
  115. LL_EXTI_LINE_3 | LL_EXTI_LINE_4 | LL_EXTI_LINE_5 | \
  116. LL_EXTI_LINE_6 | LL_EXTI_LINE_7 | LL_EXTI_LINE_8 | \
  117. LL_EXTI_LINE_9 | LL_EXTI_LINE_10 | LL_EXTI_LINE_11 | \
  118. LL_EXTI_LINE_12 | LL_EXTI_LINE_13 | LL_EXTI_LINE_14 | \
  119. LL_EXTI_LINE_15 | LL_EXTI_LINE_16 | LL_EXTI_LINE_17 | \
  120. LL_EXTI_LINE_18 | LL_EXTI_LINE_19 | LL_EXTI_LINE_20 | \
  121. LL_EXTI_LINE_21 | LL_EXTI_LINE_22 | LL_EXTI_LINE_23 | \
  122. LL_EXTI_LINE_24 | LL_EXTI_LINE_25 | LL_EXTI_LINE_28 | \
  123. LL_EXTI_LINE_29 | LL_EXTI_LINE_30 | LL_EXTI_LINE_31) /*!< All Extended line not reserved*/
  124. #else
  125. #define LL_EXTI_LINE_ALL_0_31 (LL_EXTI_LINE_0 | LL_EXTI_LINE_1 | LL_EXTI_LINE_2 | \
  126. LL_EXTI_LINE_3 | LL_EXTI_LINE_4 | LL_EXTI_LINE_5 | \
  127. LL_EXTI_LINE_6 | LL_EXTI_LINE_7 | LL_EXTI_LINE_8 | \
  128. LL_EXTI_LINE_9 | LL_EXTI_LINE_10 | LL_EXTI_LINE_11 | \
  129. LL_EXTI_LINE_12 | LL_EXTI_LINE_13 | LL_EXTI_LINE_14 | \
  130. LL_EXTI_LINE_15 | LL_EXTI_LINE_16 | LL_EXTI_LINE_17 | \
  131. LL_EXTI_LINE_18 | LL_EXTI_LINE_19 | LL_EXTI_LINE_22 | \
  132. LL_EXTI_LINE_24 | LL_EXTI_LINE_29 | LL_EXTI_LINE_30) /*!< All Extended line not reserved*/
  133. #endif
  134. #define LL_EXTI_LINE_33 EXTI_IMR2_IM33 /*!< Extended line 33 */
  135. #define LL_EXTI_LINE_36 EXTI_IMR2_IM36 /*!< Extended line 36 */
  136. #define LL_EXTI_LINE_37 EXTI_IMR2_IM37 /*!< Extended line 37 */
  137. #define LL_EXTI_LINE_38 EXTI_IMR2_IM38 /*!< Extended line 38 */
  138. #define LL_EXTI_LINE_39 EXTI_IMR2_IM39 /*!< Extended line 39 */
  139. #define LL_EXTI_LINE_40 EXTI_IMR2_IM40 /*!< Extended line 40 */
  140. #define LL_EXTI_LINE_41 EXTI_IMR2_IM41 /*!< Extended line 41 */
  141. #define LL_EXTI_LINE_42 EXTI_IMR2_IM42 /*!< Extended line 42 */
  142. #if defined (STM32WB55xx) || defined (STM32WB5Mxx)
  143. #define LL_EXTI_LINE_43 EXTI_IMR2_IM43 /*!< Extended line 43 */
  144. #endif
  145. #define LL_EXTI_LINE_44 EXTI_IMR2_IM44 /*!< Extended line 44 */
  146. #define LL_EXTI_LINE_45 EXTI_IMR2_IM45 /*!< Extended line 45 */
  147. #define LL_EXTI_LINE_46 EXTI_IMR2_IM46 /*!< Extended line 46 */
  148. #define LL_EXTI_LINE_48 EXTI_IMR2_IM48 /*!< Extended line 48 */
  149. #if defined (STM32WB55xx) || defined (STM32WB5Mxx)
  150. #define LL_EXTI_LINE_ALL_32_63 (LL_EXTI_LINE_33 | LL_EXTI_LINE_36 | LL_EXTI_LINE_37 | \
  151. LL_EXTI_LINE_38 | LL_EXTI_LINE_39 | LL_EXTI_LINE_40 | \
  152. LL_EXTI_LINE_41 | LL_EXTI_LINE_42 | LL_EXTI_LINE_43 | \
  153. LL_EXTI_LINE_44 | LL_EXTI_LINE_45 | LL_EXTI_LINE_46 | \
  154. LL_EXTI_LINE_48) /*!< All Extended line not reserved*/
  155. #else
  156. #define LL_EXTI_LINE_ALL_32_63 (LL_EXTI_LINE_33 | LL_EXTI_LINE_36 | LL_EXTI_LINE_37 | \
  157. LL_EXTI_LINE_38 | LL_EXTI_LINE_39 | LL_EXTI_LINE_40 | \
  158. LL_EXTI_LINE_41 | LL_EXTI_LINE_42 | LL_EXTI_LINE_44 | \
  159. LL_EXTI_LINE_45 | LL_EXTI_LINE_46 | LL_EXTI_LINE_48) /*!< All Extended line not reserved*/
  160. #endif
  161. #define LL_EXTI_LINE_ALL (0xFFFFFFFFU) /*!< All Extended line */
  162. #if defined(USE_FULL_LL_DRIVER)
  163. #define LL_EXTI_LINE_NONE (0x00000000U) /*!< None Extended line */
  164. #endif /*USE_FULL_LL_DRIVER*/
  165. /**
  166. * @}
  167. */
  168. #if defined(USE_FULL_LL_DRIVER)
  169. /** @defgroup EXTI_LL_EC_MODE Mode
  170. * @{
  171. */
  172. #define LL_EXTI_MODE_IT ((uint8_t)0x00U) /*!< Interrupt Mode */
  173. #define LL_EXTI_MODE_EVENT ((uint8_t)0x01U) /*!< Event Mode */
  174. #define LL_EXTI_MODE_IT_EVENT ((uint8_t)0x02U) /*!< Interrupt & Event Mode */
  175. /**
  176. * @}
  177. */
  178. /** @defgroup EXTI_LL_EC_TRIGGER Edge Trigger
  179. * @{
  180. */
  181. #define LL_EXTI_TRIGGER_NONE ((uint8_t)0x00U) /*!< No Trigger Mode */
  182. #define LL_EXTI_TRIGGER_RISING ((uint8_t)0x01U) /*!< Trigger Rising Mode */
  183. #define LL_EXTI_TRIGGER_FALLING ((uint8_t)0x02U) /*!< Trigger Falling Mode */
  184. #define LL_EXTI_TRIGGER_RISING_FALLING ((uint8_t)0x03U) /*!< Trigger Rising & Falling Mode */
  185. /**
  186. * @}
  187. */
  188. #endif /*USE_FULL_LL_DRIVER*/
  189. /**
  190. * @}
  191. */
  192. /* Exported macro ------------------------------------------------------------*/
  193. /** @defgroup EXTI_LL_Exported_Macros EXTI Exported Macros
  194. * @{
  195. */
  196. /** @defgroup EXTI_LL_EM_WRITE_READ Common Write and read registers Macros
  197. * @{
  198. */
  199. /**
  200. * @brief Write a value in EXTI register
  201. * @param __REG__ Register to be written
  202. * @param __VALUE__ Value to be written in the register
  203. * @retval None
  204. */
  205. #define LL_EXTI_WriteReg(__REG__, __VALUE__) WRITE_REG(EXTI->__REG__, (__VALUE__))
  206. /**
  207. * @brief Read a value in EXTI register
  208. * @param __REG__ Register to be read
  209. * @retval Register value
  210. */
  211. #define LL_EXTI_ReadReg(__REG__) READ_REG(EXTI->__REG__)
  212. /**
  213. * @}
  214. */
  215. /**
  216. * @}
  217. */
  218. /* Exported functions --------------------------------------------------------*/
  219. /** @defgroup EXTI_LL_Exported_Functions EXTI Exported Functions
  220. * @{
  221. */
  222. /** @defgroup EXTI_LL_EF_IT_Management IT_Management
  223. * @{
  224. */
  225. /**
  226. * @brief Enable ExtiLine Interrupt request for Lines in range 0 to 31
  227. * @rmtoll IMR1 IMx LL_EXTI_EnableIT_0_31
  228. * @param ExtiLine This parameter can be a combination of the following values:
  229. * @arg @ref LL_EXTI_LINE_0
  230. * @arg @ref LL_EXTI_LINE_1
  231. * @arg @ref LL_EXTI_LINE_2
  232. * @arg @ref LL_EXTI_LINE_3
  233. * @arg @ref LL_EXTI_LINE_4
  234. * @arg @ref LL_EXTI_LINE_5
  235. * @arg @ref LL_EXTI_LINE_6
  236. * @arg @ref LL_EXTI_LINE_7
  237. * @arg @ref LL_EXTI_LINE_8
  238. * @arg @ref LL_EXTI_LINE_9
  239. * @arg @ref LL_EXTI_LINE_10
  240. * @arg @ref LL_EXTI_LINE_11
  241. * @arg @ref LL_EXTI_LINE_12
  242. * @arg @ref LL_EXTI_LINE_13
  243. * @arg @ref LL_EXTI_LINE_14
  244. * @arg @ref LL_EXTI_LINE_15
  245. * @arg @ref LL_EXTI_LINE_16
  246. * @arg @ref LL_EXTI_LINE_17
  247. * @arg @ref LL_EXTI_LINE_18
  248. * @arg @ref LL_EXTI_LINE_19
  249. * @arg @ref LL_EXTI_LINE_20 (*)
  250. * @arg @ref LL_EXTI_LINE_21 (*)
  251. * @arg @ref LL_EXTI_LINE_22
  252. * @arg @ref LL_EXTI_LINE_23 (*)
  253. * @arg @ref LL_EXTI_LINE_24
  254. * @arg @ref LL_EXTI_LINE_25 (*)
  255. * @arg @ref LL_EXTI_LINE_28 (*)
  256. * @arg @ref LL_EXTI_LINE_29
  257. * @arg @ref LL_EXTI_LINE_30
  258. * @arg @ref LL_EXTI_LINE_31 (*)
  259. * @arg @ref LL_EXTI_LINE_ALL_0_31
  260. * (*) value not defined in all devices
  261. * @retval None
  262. */
  263. __STATIC_INLINE void LL_EXTI_EnableIT_0_31(uint32_t ExtiLine)
  264. {
  265. SET_BIT(EXTI->IMR1, ExtiLine);
  266. }
  267. /**
  268. * @brief Enable ExtiLine Interrupt request for Lines in range 0 to 31 for cpu2
  269. * @rmtoll C2IMR1 IMx LL_C2_EXTI_EnableIT_0_31
  270. * @param ExtiLine This parameter can be a combination of the following values:
  271. * @arg @ref LL_EXTI_LINE_0
  272. * @arg @ref LL_EXTI_LINE_1
  273. * @arg @ref LL_EXTI_LINE_2
  274. * @arg @ref LL_EXTI_LINE_3
  275. * @arg @ref LL_EXTI_LINE_4
  276. * @arg @ref LL_EXTI_LINE_5
  277. * @arg @ref LL_EXTI_LINE_6
  278. * @arg @ref LL_EXTI_LINE_7
  279. * @arg @ref LL_EXTI_LINE_8
  280. * @arg @ref LL_EXTI_LINE_9
  281. * @arg @ref LL_EXTI_LINE_10
  282. * @arg @ref LL_EXTI_LINE_11
  283. * @arg @ref LL_EXTI_LINE_12
  284. * @arg @ref LL_EXTI_LINE_13
  285. * @arg @ref LL_EXTI_LINE_14
  286. * @arg @ref LL_EXTI_LINE_15
  287. * @arg @ref LL_EXTI_LINE_16
  288. * @arg @ref LL_EXTI_LINE_17
  289. * @arg @ref LL_EXTI_LINE_18
  290. * @arg @ref LL_EXTI_LINE_19
  291. * @arg @ref LL_EXTI_LINE_20 (*)
  292. * @arg @ref LL_EXTI_LINE_21 (*)
  293. * @arg @ref LL_EXTI_LINE_22
  294. * @arg @ref LL_EXTI_LINE_23 (*)
  295. * @arg @ref LL_EXTI_LINE_24
  296. * @arg @ref LL_EXTI_LINE_25 (*)
  297. * @arg @ref LL_EXTI_LINE_28 (*)
  298. * @arg @ref LL_EXTI_LINE_29
  299. * @arg @ref LL_EXTI_LINE_30
  300. * @arg @ref LL_EXTI_LINE_31 (*)
  301. * @arg @ref LL_EXTI_LINE_ALL_0_31
  302. * (*) value not defined in all devices
  303. * @retval None
  304. */
  305. __STATIC_INLINE void LL_C2_EXTI_EnableIT_0_31(uint32_t ExtiLine)
  306. {
  307. SET_BIT(EXTI->C2IMR1, ExtiLine);
  308. }
  309. /**
  310. * @brief Enable ExtiLine Interrupt request for Lines in range 32 to 63
  311. * @rmtoll IMR2 IMx LL_EXTI_EnableIT_32_63
  312. * @param ExtiLine This parameter can be a combination of the following values:
  313. * @arg @ref LL_EXTI_LINE_33
  314. * @arg @ref LL_EXTI_LINE_36
  315. * @arg @ref LL_EXTI_LINE_37
  316. * @arg @ref LL_EXTI_LINE_38
  317. * @arg @ref LL_EXTI_LINE_39
  318. * @arg @ref LL_EXTI_LINE_40
  319. * @arg @ref LL_EXTI_LINE_41
  320. * @arg @ref LL_EXTI_LINE_42
  321. * @arg @ref LL_EXTI_LINE_43 (*)
  322. * @arg @ref LL_EXTI_LINE_44
  323. * @arg @ref LL_EXTI_LINE_45
  324. * @arg @ref LL_EXTI_LINE_46
  325. * @arg @ref LL_EXTI_LINE_48
  326. * @arg @ref LL_EXTI_LINE_ALL_32_63
  327. * (*) value not defined in all devices
  328. * @retval None
  329. */
  330. __STATIC_INLINE void LL_EXTI_EnableIT_32_63(uint32_t ExtiLine)
  331. {
  332. SET_BIT(EXTI->IMR2, ExtiLine);
  333. }
  334. /**
  335. * @brief Enable ExtiLine Interrupt request for Lines in range 32 to 63 for cpu2
  336. * @rmtoll C2IMR2 IMx LL_C2_EXTI_EnableIT_32_63
  337. * @param ExtiLine This parameter can be a combination of the following values:
  338. * @arg @ref LL_EXTI_LINE_33
  339. * @arg @ref LL_EXTI_LINE_36
  340. * @arg @ref LL_EXTI_LINE_37
  341. * @arg @ref LL_EXTI_LINE_38
  342. * @arg @ref LL_EXTI_LINE_39
  343. * @arg @ref LL_EXTI_LINE_40
  344. * @arg @ref LL_EXTI_LINE_41
  345. * @arg @ref LL_EXTI_LINE_42
  346. * @arg @ref LL_EXTI_LINE_43 (*)
  347. * @arg @ref LL_EXTI_LINE_44
  348. * @arg @ref LL_EXTI_LINE_45
  349. * @arg @ref LL_EXTI_LINE_46
  350. * @arg @ref LL_EXTI_LINE_48
  351. * @arg @ref LL_EXTI_LINE_ALL_32_63
  352. * (*) value not defined in all devices
  353. * @retval None
  354. */
  355. __STATIC_INLINE void LL_C2_EXTI_EnableIT_32_63(uint32_t ExtiLine)
  356. {
  357. SET_BIT(EXTI->C2IMR2, ExtiLine);
  358. }
  359. /**
  360. * @brief Disable ExtiLine Interrupt request for Lines in range 0 to 31
  361. * @rmtoll IMR1 IMx LL_EXTI_DisableIT_0_31
  362. * @param ExtiLine This parameter can be a combination of the following values:
  363. * @arg @ref LL_EXTI_LINE_0
  364. * @arg @ref LL_EXTI_LINE_1
  365. * @arg @ref LL_EXTI_LINE_2
  366. * @arg @ref LL_EXTI_LINE_3
  367. * @arg @ref LL_EXTI_LINE_4
  368. * @arg @ref LL_EXTI_LINE_5
  369. * @arg @ref LL_EXTI_LINE_6
  370. * @arg @ref LL_EXTI_LINE_7
  371. * @arg @ref LL_EXTI_LINE_8
  372. * @arg @ref LL_EXTI_LINE_9
  373. * @arg @ref LL_EXTI_LINE_10
  374. * @arg @ref LL_EXTI_LINE_11
  375. * @arg @ref LL_EXTI_LINE_12
  376. * @arg @ref LL_EXTI_LINE_13
  377. * @arg @ref LL_EXTI_LINE_14
  378. * @arg @ref LL_EXTI_LINE_15
  379. * @arg @ref LL_EXTI_LINE_16
  380. * @arg @ref LL_EXTI_LINE_17
  381. * @arg @ref LL_EXTI_LINE_18
  382. * @arg @ref LL_EXTI_LINE_19
  383. * @arg @ref LL_EXTI_LINE_20 (*)
  384. * @arg @ref LL_EXTI_LINE_21 (*)
  385. * @arg @ref LL_EXTI_LINE_22
  386. * @arg @ref LL_EXTI_LINE_23 (*)
  387. * @arg @ref LL_EXTI_LINE_24
  388. * @arg @ref LL_EXTI_LINE_25 (*)
  389. * @arg @ref LL_EXTI_LINE_28 (*)
  390. * @arg @ref LL_EXTI_LINE_29
  391. * @arg @ref LL_EXTI_LINE_30
  392. * @arg @ref LL_EXTI_LINE_31 (*)
  393. * @arg @ref LL_EXTI_LINE_ALL_0_31
  394. * (*) value not defined in all devices
  395. * @retval None
  396. */
  397. __STATIC_INLINE void LL_EXTI_DisableIT_0_31(uint32_t ExtiLine)
  398. {
  399. CLEAR_BIT(EXTI->IMR1, ExtiLine);
  400. }
  401. /**
  402. * @brief Disable ExtiLine Interrupt request for Lines in range 0 to 31 for cpu2
  403. * @rmtoll C2IMR1 IMx LL_C2_EXTI_DisableIT_0_31
  404. * @param ExtiLine This parameter can be a combination of the following values:
  405. * @arg @ref LL_EXTI_LINE_0
  406. * @arg @ref LL_EXTI_LINE_1
  407. * @arg @ref LL_EXTI_LINE_2
  408. * @arg @ref LL_EXTI_LINE_3
  409. * @arg @ref LL_EXTI_LINE_4
  410. * @arg @ref LL_EXTI_LINE_5
  411. * @arg @ref LL_EXTI_LINE_6
  412. * @arg @ref LL_EXTI_LINE_7
  413. * @arg @ref LL_EXTI_LINE_8
  414. * @arg @ref LL_EXTI_LINE_9
  415. * @arg @ref LL_EXTI_LINE_10
  416. * @arg @ref LL_EXTI_LINE_11
  417. * @arg @ref LL_EXTI_LINE_12
  418. * @arg @ref LL_EXTI_LINE_13
  419. * @arg @ref LL_EXTI_LINE_14
  420. * @arg @ref LL_EXTI_LINE_15
  421. * @arg @ref LL_EXTI_LINE_16
  422. * @arg @ref LL_EXTI_LINE_17
  423. * @arg @ref LL_EXTI_LINE_18
  424. * @arg @ref LL_EXTI_LINE_19
  425. * @arg @ref LL_EXTI_LINE_20 (*)
  426. * @arg @ref LL_EXTI_LINE_21 (*)
  427. * @arg @ref LL_EXTI_LINE_22
  428. * @arg @ref LL_EXTI_LINE_23 (*)
  429. * @arg @ref LL_EXTI_LINE_24
  430. * @arg @ref LL_EXTI_LINE_25 (*)
  431. * @arg @ref LL_EXTI_LINE_28 (*)
  432. * @arg @ref LL_EXTI_LINE_29
  433. * @arg @ref LL_EXTI_LINE_30
  434. * @arg @ref LL_EXTI_LINE_31 (*)
  435. * @arg @ref LL_EXTI_LINE_ALL_0_31
  436. * (*) value not defined in all devices
  437. * @retval None
  438. */
  439. __STATIC_INLINE void LL_C2_EXTI_DisableIT_0_31(uint32_t ExtiLine)
  440. {
  441. CLEAR_BIT(EXTI->C2IMR1, ExtiLine);
  442. }
  443. /**
  444. * @brief Disable ExtiLine Interrupt request for Lines in range 32 to 63
  445. * @rmtoll IMR2 IMx LL_EXTI_DisableIT_32_63
  446. * @param ExtiLine This parameter can be a combination of the following values:
  447. * @arg @ref LL_EXTI_LINE_33
  448. * @arg @ref LL_EXTI_LINE_36
  449. * @arg @ref LL_EXTI_LINE_37
  450. * @arg @ref LL_EXTI_LINE_38
  451. * @arg @ref LL_EXTI_LINE_39
  452. * @arg @ref LL_EXTI_LINE_40
  453. * @arg @ref LL_EXTI_LINE_41
  454. * @arg @ref LL_EXTI_LINE_42
  455. * @arg @ref LL_EXTI_LINE_43 (*)
  456. * @arg @ref LL_EXTI_LINE_44
  457. * @arg @ref LL_EXTI_LINE_45
  458. * @arg @ref LL_EXTI_LINE_46
  459. * @arg @ref LL_EXTI_LINE_48
  460. * @arg @ref LL_EXTI_LINE_ALL_32_63
  461. * (*) value not defined in all devices
  462. * @retval None
  463. */
  464. __STATIC_INLINE void LL_EXTI_DisableIT_32_63(uint32_t ExtiLine)
  465. {
  466. CLEAR_BIT(EXTI->IMR2, ExtiLine);
  467. }
  468. /**
  469. * @brief Disable ExtiLine Interrupt request for Lines in range 32 to 63 for cpu2
  470. * @rmtoll C2IMR2 IMx LL_C2_EXTI_DisableIT_32_63
  471. * @param ExtiLine This parameter can be a combination of the following values:
  472. * @arg @ref LL_EXTI_LINE_33
  473. * @arg @ref LL_EXTI_LINE_36
  474. * @arg @ref LL_EXTI_LINE_37
  475. * @arg @ref LL_EXTI_LINE_38
  476. * @arg @ref LL_EXTI_LINE_39
  477. * @arg @ref LL_EXTI_LINE_40
  478. * @arg @ref LL_EXTI_LINE_41
  479. * @arg @ref LL_EXTI_LINE_42
  480. * @arg @ref LL_EXTI_LINE_43 (*)
  481. * @arg @ref LL_EXTI_LINE_44
  482. * @arg @ref LL_EXTI_LINE_45
  483. * @arg @ref LL_EXTI_LINE_46
  484. * @arg @ref LL_EXTI_LINE_48
  485. * @arg @ref LL_EXTI_LINE_ALL_32_63
  486. * (*) value not defined in all devices
  487. * @retval None
  488. */
  489. __STATIC_INLINE void LL_C2_EXTI_DisableIT_32_63(uint32_t ExtiLine)
  490. {
  491. CLEAR_BIT(EXTI->C2IMR2, ExtiLine);
  492. }
  493. /**
  494. * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 0 to 31
  495. * @rmtoll IMR1 IMx LL_EXTI_IsEnabledIT_0_31
  496. * @param ExtiLine This parameter can be a combination of the following values:
  497. * @arg @ref LL_EXTI_LINE_0
  498. * @arg @ref LL_EXTI_LINE_1
  499. * @arg @ref LL_EXTI_LINE_2
  500. * @arg @ref LL_EXTI_LINE_3
  501. * @arg @ref LL_EXTI_LINE_4
  502. * @arg @ref LL_EXTI_LINE_5
  503. * @arg @ref LL_EXTI_LINE_6
  504. * @arg @ref LL_EXTI_LINE_7
  505. * @arg @ref LL_EXTI_LINE_8
  506. * @arg @ref LL_EXTI_LINE_9
  507. * @arg @ref LL_EXTI_LINE_10
  508. * @arg @ref LL_EXTI_LINE_11
  509. * @arg @ref LL_EXTI_LINE_12
  510. * @arg @ref LL_EXTI_LINE_13
  511. * @arg @ref LL_EXTI_LINE_14
  512. * @arg @ref LL_EXTI_LINE_15
  513. * @arg @ref LL_EXTI_LINE_16
  514. * @arg @ref LL_EXTI_LINE_17
  515. * @arg @ref LL_EXTI_LINE_18
  516. * @arg @ref LL_EXTI_LINE_19
  517. * @arg @ref LL_EXTI_LINE_20 (*)
  518. * @arg @ref LL_EXTI_LINE_21 (*)
  519. * @arg @ref LL_EXTI_LINE_22
  520. * @arg @ref LL_EXTI_LINE_23 (*)
  521. * @arg @ref LL_EXTI_LINE_24
  522. * @arg @ref LL_EXTI_LINE_25 (*)
  523. * @arg @ref LL_EXTI_LINE_28 (*)
  524. * @arg @ref LL_EXTI_LINE_29
  525. * @arg @ref LL_EXTI_LINE_30
  526. * @arg @ref LL_EXTI_LINE_31 (*)
  527. * @arg @ref LL_EXTI_LINE_ALL_0_31
  528. * (*) value not defined in all devices
  529. * @retval State of bit (1 or 0).
  530. */
  531. __STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine)
  532. {
  533. return ((READ_BIT(EXTI->IMR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
  534. }
  535. /**
  536. * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 0 to 31 for cpu2
  537. * @rmtoll C2IMR1 IMx LL_C2_EXTI_IsEnabledIT_0_31
  538. * @param ExtiLine This parameter can be a combination of the following values:
  539. * @arg @ref LL_EXTI_LINE_0
  540. * @arg @ref LL_EXTI_LINE_1
  541. * @arg @ref LL_EXTI_LINE_2
  542. * @arg @ref LL_EXTI_LINE_3
  543. * @arg @ref LL_EXTI_LINE_4
  544. * @arg @ref LL_EXTI_LINE_5
  545. * @arg @ref LL_EXTI_LINE_6
  546. * @arg @ref LL_EXTI_LINE_7
  547. * @arg @ref LL_EXTI_LINE_8
  548. * @arg @ref LL_EXTI_LINE_9
  549. * @arg @ref LL_EXTI_LINE_10
  550. * @arg @ref LL_EXTI_LINE_11
  551. * @arg @ref LL_EXTI_LINE_12
  552. * @arg @ref LL_EXTI_LINE_13
  553. * @arg @ref LL_EXTI_LINE_14
  554. * @arg @ref LL_EXTI_LINE_15
  555. * @arg @ref LL_EXTI_LINE_16
  556. * @arg @ref LL_EXTI_LINE_17
  557. * @arg @ref LL_EXTI_LINE_18
  558. * @arg @ref LL_EXTI_LINE_19
  559. * @arg @ref LL_EXTI_LINE_20 (*)
  560. * @arg @ref LL_EXTI_LINE_21 (*)
  561. * @arg @ref LL_EXTI_LINE_22
  562. * @arg @ref LL_EXTI_LINE_23 (*)
  563. * @arg @ref LL_EXTI_LINE_24
  564. * @arg @ref LL_EXTI_LINE_25 (*)
  565. * @arg @ref LL_EXTI_LINE_28 (*)
  566. * @arg @ref LL_EXTI_LINE_29
  567. * @arg @ref LL_EXTI_LINE_30
  568. * @arg @ref LL_EXTI_LINE_31 (*)
  569. * @arg @ref LL_EXTI_LINE_ALL_0_31
  570. * (*) value not defined in all devices
  571. * @retval State of bit (1 or 0).
  572. */
  573. __STATIC_INLINE uint32_t LL_C2_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine)
  574. {
  575. return ((READ_BIT(EXTI->C2IMR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
  576. }
  577. /**
  578. * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 32 to 63
  579. * @rmtoll IMR2 IMx LL_EXTI_IsEnabledIT_32_63
  580. * @param ExtiLine This parameter can be a combination of the following values:
  581. * @arg @ref LL_EXTI_LINE_33
  582. * @arg @ref LL_EXTI_LINE_36
  583. * @arg @ref LL_EXTI_LINE_37
  584. * @arg @ref LL_EXTI_LINE_38
  585. * @arg @ref LL_EXTI_LINE_39
  586. * @arg @ref LL_EXTI_LINE_40
  587. * @arg @ref LL_EXTI_LINE_41
  588. * @arg @ref LL_EXTI_LINE_42
  589. * @arg @ref LL_EXTI_LINE_43 (*)
  590. * @arg @ref LL_EXTI_LINE_44
  591. * @arg @ref LL_EXTI_LINE_45
  592. * @arg @ref LL_EXTI_LINE_46
  593. * @arg @ref LL_EXTI_LINE_48
  594. * @arg @ref LL_EXTI_LINE_ALL_32_63
  595. * (*) value not defined in all devices
  596. * @retval State of bit (1 or 0).
  597. */
  598. __STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_32_63(uint32_t ExtiLine)
  599. {
  600. return ((READ_BIT(EXTI->IMR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
  601. }
  602. /**
  603. * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 32 to 63 for cpu2
  604. * @rmtoll C2IMR2 IMx LL_C2_EXTI_IsEnabledIT_32_63
  605. * @param ExtiLine This parameter can be a combination of the following values:
  606. * @arg @ref LL_EXTI_LINE_33
  607. * @arg @ref LL_EXTI_LINE_36
  608. * @arg @ref LL_EXTI_LINE_37
  609. * @arg @ref LL_EXTI_LINE_38
  610. * @arg @ref LL_EXTI_LINE_39
  611. * @arg @ref LL_EXTI_LINE_40
  612. * @arg @ref LL_EXTI_LINE_41
  613. * @arg @ref LL_EXTI_LINE_42
  614. * @arg @ref LL_EXTI_LINE_43 (*)
  615. * @arg @ref LL_EXTI_LINE_44
  616. * @arg @ref LL_EXTI_LINE_45
  617. * @arg @ref LL_EXTI_LINE_46
  618. * @arg @ref LL_EXTI_LINE_48
  619. * @arg @ref LL_EXTI_LINE_ALL_32_63
  620. * (*) value not defined in all devices
  621. * @retval State of bit (1 or 0).
  622. */
  623. __STATIC_INLINE uint32_t LL_C2_EXTI_IsEnabledIT_32_63(uint32_t ExtiLine)
  624. {
  625. return ((READ_BIT(EXTI->C2IMR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
  626. }
  627. /**
  628. * @}
  629. */
  630. /** @defgroup EXTI_LL_EF_Event_Management Event_Management
  631. * @{
  632. */
  633. /**
  634. * @brief Enable ExtiLine Event request for Lines in range 0 to 31
  635. * @rmtoll EMR1 EMx LL_EXTI_EnableEvent_0_31
  636. * @param ExtiLine This parameter can be a combination of the following values:
  637. * @arg @ref LL_EXTI_LINE_0
  638. * @arg @ref LL_EXTI_LINE_1
  639. * @arg @ref LL_EXTI_LINE_2
  640. * @arg @ref LL_EXTI_LINE_3
  641. * @arg @ref LL_EXTI_LINE_4
  642. * @arg @ref LL_EXTI_LINE_5
  643. * @arg @ref LL_EXTI_LINE_6
  644. * @arg @ref LL_EXTI_LINE_7
  645. * @arg @ref LL_EXTI_LINE_8
  646. * @arg @ref LL_EXTI_LINE_9
  647. * @arg @ref LL_EXTI_LINE_10
  648. * @arg @ref LL_EXTI_LINE_11
  649. * @arg @ref LL_EXTI_LINE_12
  650. * @arg @ref LL_EXTI_LINE_13
  651. * @arg @ref LL_EXTI_LINE_14
  652. * @arg @ref LL_EXTI_LINE_15
  653. * @arg @ref LL_EXTI_LINE_17
  654. * @arg @ref LL_EXTI_LINE_18
  655. * @arg @ref LL_EXTI_LINE_19
  656. * @arg @ref LL_EXTI_LINE_20 (*)
  657. * @arg @ref LL_EXTI_LINE_21 (*)
  658. * (*) value not defined in all devices
  659. * @retval None
  660. */
  661. __STATIC_INLINE void LL_EXTI_EnableEvent_0_31(uint32_t ExtiLine)
  662. {
  663. SET_BIT(EXTI->EMR1, ExtiLine);
  664. }
  665. /**
  666. * @brief Enable ExtiLine Event request for Lines in range 0 to 31 for cpu2
  667. * @rmtoll C2EMR1 EMx LL_C2_EXTI_EnableEvent_0_31
  668. * @param ExtiLine This parameter can be a combination of the following values:
  669. * @arg @ref LL_EXTI_LINE_0
  670. * @arg @ref LL_EXTI_LINE_1
  671. * @arg @ref LL_EXTI_LINE_2
  672. * @arg @ref LL_EXTI_LINE_3
  673. * @arg @ref LL_EXTI_LINE_4
  674. * @arg @ref LL_EXTI_LINE_5
  675. * @arg @ref LL_EXTI_LINE_6
  676. * @arg @ref LL_EXTI_LINE_7
  677. * @arg @ref LL_EXTI_LINE_8
  678. * @arg @ref LL_EXTI_LINE_9
  679. * @arg @ref LL_EXTI_LINE_10
  680. * @arg @ref LL_EXTI_LINE_11
  681. * @arg @ref LL_EXTI_LINE_12
  682. * @arg @ref LL_EXTI_LINE_13
  683. * @arg @ref LL_EXTI_LINE_14
  684. * @arg @ref LL_EXTI_LINE_15
  685. * @arg @ref LL_EXTI_LINE_17
  686. * @arg @ref LL_EXTI_LINE_18
  687. * @arg @ref LL_EXTI_LINE_19
  688. * @arg @ref LL_EXTI_LINE_20 (*)
  689. * @arg @ref LL_EXTI_LINE_21 (*)
  690. * (*) value not defined in all devices
  691. * @retval None
  692. */
  693. __STATIC_INLINE void LL_C2_EXTI_EnableEvent_0_31(uint32_t ExtiLine)
  694. {
  695. SET_BIT(EXTI->C2EMR1, ExtiLine);
  696. }
  697. /**
  698. * @brief Enable ExtiLine Event request for Lines in range 32 to 63
  699. * @rmtoll EMR2 EMx LL_EXTI_EnableEvent_32_63
  700. * @param ExtiLine This parameter can be a combination of the following values:
  701. * @arg @ref LL_EXTI_LINE_40
  702. * @arg @ref LL_EXTI_LINE_41
  703. * @retval None
  704. */
  705. __STATIC_INLINE void LL_EXTI_EnableEvent_32_63(uint32_t ExtiLine)
  706. {
  707. SET_BIT(EXTI->EMR2, ExtiLine);
  708. }
  709. /**
  710. * @brief Enable ExtiLine Event request for Lines in range 32 to 63 for cpu2
  711. * @rmtoll C2EMR2 EMx LL_C2_EXTI_EnableEvent_32_63
  712. * @param ExtiLine This parameter can be a combination of the following values:
  713. * @arg @ref LL_EXTI_LINE_40
  714. * @arg @ref LL_EXTI_LINE_41
  715. * @retval None
  716. */
  717. __STATIC_INLINE void LL_C2_EXTI_EnableEvent_32_63(uint32_t ExtiLine)
  718. {
  719. SET_BIT(EXTI->C2EMR2, ExtiLine);
  720. }
  721. /**
  722. * @brief Disable ExtiLine Event request for Lines in range 0 to 31
  723. * @rmtoll EMR1 EMx LL_EXTI_DisableEvent_0_31
  724. * @param ExtiLine This parameter can be a combination of the following values:
  725. * @arg @ref LL_EXTI_LINE_0
  726. * @arg @ref LL_EXTI_LINE_1
  727. * @arg @ref LL_EXTI_LINE_2
  728. * @arg @ref LL_EXTI_LINE_3
  729. * @arg @ref LL_EXTI_LINE_4
  730. * @arg @ref LL_EXTI_LINE_5
  731. * @arg @ref LL_EXTI_LINE_6
  732. * @arg @ref LL_EXTI_LINE_7
  733. * @arg @ref LL_EXTI_LINE_8
  734. * @arg @ref LL_EXTI_LINE_9
  735. * @arg @ref LL_EXTI_LINE_10
  736. * @arg @ref LL_EXTI_LINE_11
  737. * @arg @ref LL_EXTI_LINE_12
  738. * @arg @ref LL_EXTI_LINE_13
  739. * @arg @ref LL_EXTI_LINE_14
  740. * @arg @ref LL_EXTI_LINE_15
  741. * @arg @ref LL_EXTI_LINE_17
  742. * @arg @ref LL_EXTI_LINE_18
  743. * @arg @ref LL_EXTI_LINE_19
  744. * @arg @ref LL_EXTI_LINE_20 (*)
  745. * @arg @ref LL_EXTI_LINE_21 (*)
  746. * @retval None
  747. */
  748. __STATIC_INLINE void LL_EXTI_DisableEvent_0_31(uint32_t ExtiLine)
  749. {
  750. CLEAR_BIT(EXTI->EMR1, ExtiLine);
  751. }
  752. /**
  753. * @brief Disable ExtiLine Event request for Lines in range 0 to 31 for cpu2
  754. * @rmtoll C2EMR1 EMx LL_C2_EXTI_DisableEvent_0_31
  755. * @param ExtiLine This parameter can be a combination of the following values:
  756. * @arg @ref LL_EXTI_LINE_0
  757. * @arg @ref LL_EXTI_LINE_1
  758. * @arg @ref LL_EXTI_LINE_2
  759. * @arg @ref LL_EXTI_LINE_3
  760. * @arg @ref LL_EXTI_LINE_4
  761. * @arg @ref LL_EXTI_LINE_5
  762. * @arg @ref LL_EXTI_LINE_6
  763. * @arg @ref LL_EXTI_LINE_7
  764. * @arg @ref LL_EXTI_LINE_8
  765. * @arg @ref LL_EXTI_LINE_9
  766. * @arg @ref LL_EXTI_LINE_10
  767. * @arg @ref LL_EXTI_LINE_11
  768. * @arg @ref LL_EXTI_LINE_12
  769. * @arg @ref LL_EXTI_LINE_13
  770. * @arg @ref LL_EXTI_LINE_14
  771. * @arg @ref LL_EXTI_LINE_15
  772. * @arg @ref LL_EXTI_LINE_17
  773. * @arg @ref LL_EXTI_LINE_18
  774. * @arg @ref LL_EXTI_LINE_19
  775. * @arg @ref LL_EXTI_LINE_20 (*)
  776. * @arg @ref LL_EXTI_LINE_21 (*)
  777. * (*) value not defined in all devices
  778. * @retval None
  779. */
  780. __STATIC_INLINE void LL_C2_EXTI_DisableEvent_0_31(uint32_t ExtiLine)
  781. {
  782. CLEAR_BIT(EXTI->C2EMR1, ExtiLine);
  783. }
  784. /**
  785. * @brief Disable ExtiLine Event request for Lines in range 32 to 63
  786. * @rmtoll EMR2 EMx LL_EXTI_DisableEvent_32_63
  787. * @param ExtiLine This parameter can be a combination of the following values:
  788. * @arg @ref LL_EXTI_LINE_40
  789. * @arg @ref LL_EXTI_LINE_41
  790. * (*) value not defined in all devices
  791. * @retval None
  792. */
  793. __STATIC_INLINE void LL_EXTI_DisableEvent_32_63(uint32_t ExtiLine)
  794. {
  795. CLEAR_BIT(EXTI->EMR2, ExtiLine);
  796. }
  797. /**
  798. * @brief Disable ExtiLine Event request for Lines in range 32 to 63 for cpu2
  799. * @rmtoll C2EMR2 EMx LL_C2_EXTI_DisableEvent_32_63
  800. * @param ExtiLine This parameter can be a combination of the following values:
  801. * @arg @ref LL_EXTI_LINE_40
  802. * @arg @ref LL_EXTI_LINE_41
  803. * @retval None
  804. */
  805. __STATIC_INLINE void LL_C2_EXTI_DisableEvent_32_63(uint32_t ExtiLine)
  806. {
  807. CLEAR_BIT(EXTI->C2EMR2, ExtiLine);
  808. }
  809. /**
  810. * @brief Indicate if ExtiLine Event request is enabled for Lines in range 0 to 31
  811. * @rmtoll EMR1 EMx LL_EXTI_IsEnabledEvent_0_31
  812. * @param ExtiLine This parameter can be a combination of the following values:
  813. * @arg @ref LL_EXTI_LINE_0
  814. * @arg @ref LL_EXTI_LINE_1
  815. * @arg @ref LL_EXTI_LINE_2
  816. * @arg @ref LL_EXTI_LINE_3
  817. * @arg @ref LL_EXTI_LINE_4
  818. * @arg @ref LL_EXTI_LINE_5
  819. * @arg @ref LL_EXTI_LINE_6
  820. * @arg @ref LL_EXTI_LINE_7
  821. * @arg @ref LL_EXTI_LINE_8
  822. * @arg @ref LL_EXTI_LINE_9
  823. * @arg @ref LL_EXTI_LINE_10
  824. * @arg @ref LL_EXTI_LINE_11
  825. * @arg @ref LL_EXTI_LINE_12
  826. * @arg @ref LL_EXTI_LINE_13
  827. * @arg @ref LL_EXTI_LINE_14
  828. * @arg @ref LL_EXTI_LINE_15
  829. * @arg @ref LL_EXTI_LINE_17
  830. * @arg @ref LL_EXTI_LINE_18
  831. * @arg @ref LL_EXTI_LINE_19
  832. * @arg @ref LL_EXTI_LINE_20 (*)
  833. * @arg @ref LL_EXTI_LINE_21 (*)
  834. * (*) value not defined in all devices
  835. * @note Please check each device line mapping for EXTI Line availability
  836. * @retval State of bit (1 or 0).
  837. */
  838. __STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine)
  839. {
  840. return ((READ_BIT(EXTI->EMR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
  841. }
  842. /**
  843. * @brief Indicate if ExtiLine Event request is enabled for Lines in range 0 to 31 for cpu2
  844. * @rmtoll C2EMR1 EMx LL_C2_EXTI_IsEnabledEvent_0_31
  845. * @param ExtiLine This parameter can be a combination of the following values:
  846. * @arg @ref LL_EXTI_LINE_0
  847. * @arg @ref LL_EXTI_LINE_1
  848. * @arg @ref LL_EXTI_LINE_2
  849. * @arg @ref LL_EXTI_LINE_3
  850. * @arg @ref LL_EXTI_LINE_4
  851. * @arg @ref LL_EXTI_LINE_5
  852. * @arg @ref LL_EXTI_LINE_6
  853. * @arg @ref LL_EXTI_LINE_7
  854. * @arg @ref LL_EXTI_LINE_8
  855. * @arg @ref LL_EXTI_LINE_9
  856. * @arg @ref LL_EXTI_LINE_10
  857. * @arg @ref LL_EXTI_LINE_11
  858. * @arg @ref LL_EXTI_LINE_12
  859. * @arg @ref LL_EXTI_LINE_13
  860. * @arg @ref LL_EXTI_LINE_14
  861. * @arg @ref LL_EXTI_LINE_15
  862. * @arg @ref LL_EXTI_LINE_17
  863. * @arg @ref LL_EXTI_LINE_18
  864. * @arg @ref LL_EXTI_LINE_19
  865. * @arg @ref LL_EXTI_LINE_20 (*)
  866. * @arg @ref LL_EXTI_LINE_21 (*)
  867. * (*) value not defined in all devices
  868. * @note Please check each device line mapping for EXTI Line availability
  869. * @retval State of bit (1 or 0).
  870. */
  871. __STATIC_INLINE uint32_t LL_C2_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine)
  872. {
  873. return ((READ_BIT(EXTI->C2EMR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
  874. }
  875. /**
  876. * @brief Indicate if ExtiLine Event request is enabled for Lines in range 32 to 63
  877. * @rmtoll EMR2 EMx LL_EXTI_IsEnabledEvent_32_63
  878. * @param ExtiLine This parameter can be a combination of the following values:
  879. * @arg @ref LL_EXTI_LINE_40
  880. * @arg @ref LL_EXTI_LINE_41
  881. * @retval State of bit (1 or 0).
  882. */
  883. __STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_32_63(uint32_t ExtiLine)
  884. {
  885. return ((READ_BIT(EXTI->EMR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
  886. }
  887. /**
  888. * @brief Indicate if ExtiLine Event request is enabled for Lines in range 32 to 63 for cpu2
  889. * @rmtoll EMR2 EMx LL_C2_EXTI_IsEnabledEvent_32_63
  890. * @param ExtiLine This parameter can be a combination of the following values:
  891. * @arg @ref LL_EXTI_LINE_40
  892. * @arg @ref LL_EXTI_LINE_41
  893. * @retval State of bit (1 or 0).
  894. */
  895. __STATIC_INLINE uint32_t LL_C2_EXTI_IsEnabledEvent_32_63(uint32_t ExtiLine)
  896. {
  897. return ((READ_BIT(EXTI->C2EMR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
  898. }
  899. /**
  900. * @}
  901. */
  902. /** @defgroup EXTI_LL_EF_Rising_Trigger_Management Rising_Trigger_Management
  903. * @{
  904. */
  905. /**
  906. * @brief Enable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
  907. * @note The configurable wakeup lines are edge-triggered. No glitch must be
  908. * generated on these lines. If a rising edge on a configurable interrupt
  909. * line occurs during a write operation in the EXTI_RTSR register, the
  910. * pending bit is not set.
  911. * Rising and falling edge triggers can be set for
  912. * the same interrupt line. In this case, both generate a trigger
  913. * condition.
  914. * @rmtoll RTSR1 RTx LL_EXTI_EnableRisingTrig_0_31
  915. * @param ExtiLine This parameter can be a combination of the following values:
  916. * @arg @ref LL_EXTI_LINE_0
  917. * @arg @ref LL_EXTI_LINE_1
  918. * @arg @ref LL_EXTI_LINE_2
  919. * @arg @ref LL_EXTI_LINE_3
  920. * @arg @ref LL_EXTI_LINE_4
  921. * @arg @ref LL_EXTI_LINE_5
  922. * @arg @ref LL_EXTI_LINE_6
  923. * @arg @ref LL_EXTI_LINE_7
  924. * @arg @ref LL_EXTI_LINE_8
  925. * @arg @ref LL_EXTI_LINE_9
  926. * @arg @ref LL_EXTI_LINE_10
  927. * @arg @ref LL_EXTI_LINE_11
  928. * @arg @ref LL_EXTI_LINE_12
  929. * @arg @ref LL_EXTI_LINE_13
  930. * @arg @ref LL_EXTI_LINE_14
  931. * @arg @ref LL_EXTI_LINE_15
  932. * @arg @ref LL_EXTI_LINE_16
  933. * @arg @ref LL_EXTI_LINE_17
  934. * @arg @ref LL_EXTI_LINE_18
  935. * @arg @ref LL_EXTI_LINE_19
  936. * @arg @ref LL_EXTI_LINE_20 (*)
  937. * @arg @ref LL_EXTI_LINE_21 (*)
  938. * @arg @ref LL_EXTI_LINE_31 (*)
  939. * (*) value not defined in all devices
  940. * @retval None
  941. */
  942. __STATIC_INLINE void LL_EXTI_EnableRisingTrig_0_31(uint32_t ExtiLine)
  943. {
  944. SET_BIT(EXTI->RTSR1, ExtiLine);
  945. }
  946. /**
  947. * @brief Enable ExtiLine Rising Edge Trigger for Lines in range 32 to 63
  948. * @note The configurable wakeup lines are edge-triggered. No glitch must be
  949. * generated on these lines. If a rising edge on a configurable interrupt
  950. * line occurs during a write operation in the EXTI_RTSR register, the
  951. * pending bit is not set.Rising and falling edge triggers can be set for
  952. * the same interrupt line. In this case, both generate a trigger
  953. * condition.
  954. * @rmtoll RTSR2 RTx LL_EXTI_EnableRisingTrig_32_63
  955. * @param ExtiLine This parameter can be a combination of the following values:
  956. * @arg @ref LL_EXTI_LINE_33 (*)
  957. * @arg @ref LL_EXTI_LINE_40
  958. * @arg @ref LL_EXTI_LINE_41
  959. * (*) value not defined in all devices
  960. * @retval None
  961. */
  962. __STATIC_INLINE void LL_EXTI_EnableRisingTrig_32_63(uint32_t ExtiLine)
  963. {
  964. SET_BIT(EXTI->RTSR2, ExtiLine);
  965. }
  966. /**
  967. * @brief Disable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
  968. * @note The configurable wakeup lines are edge-triggered. No glitch must be
  969. * generated on these lines. If a rising edge on a configurable interrupt
  970. * line occurs during a write operation in the EXTI_RTSR register, the
  971. * pending bit is not set.
  972. * Rising and falling edge triggers can be set for
  973. * the same interrupt line. In this case, both generate a trigger
  974. * condition.
  975. * @rmtoll RTSR1 RTx LL_EXTI_DisableRisingTrig_0_31
  976. * @param ExtiLine This parameter can be a combination of the following values:
  977. * @arg @ref LL_EXTI_LINE_0
  978. * @arg @ref LL_EXTI_LINE_1
  979. * @arg @ref LL_EXTI_LINE_2
  980. * @arg @ref LL_EXTI_LINE_3
  981. * @arg @ref LL_EXTI_LINE_4
  982. * @arg @ref LL_EXTI_LINE_5
  983. * @arg @ref LL_EXTI_LINE_6
  984. * @arg @ref LL_EXTI_LINE_7
  985. * @arg @ref LL_EXTI_LINE_8
  986. * @arg @ref LL_EXTI_LINE_9
  987. * @arg @ref LL_EXTI_LINE_10
  988. * @arg @ref LL_EXTI_LINE_11
  989. * @arg @ref LL_EXTI_LINE_12
  990. * @arg @ref LL_EXTI_LINE_13
  991. * @arg @ref LL_EXTI_LINE_14
  992. * @arg @ref LL_EXTI_LINE_15
  993. * @arg @ref LL_EXTI_LINE_16
  994. * @arg @ref LL_EXTI_LINE_17
  995. * @arg @ref LL_EXTI_LINE_18
  996. * @arg @ref LL_EXTI_LINE_19
  997. * @arg @ref LL_EXTI_LINE_20 (*)
  998. * @arg @ref LL_EXTI_LINE_21 (*)
  999. * @arg @ref LL_EXTI_LINE_31 (*)
  1000. * (*) value not defined in all devices
  1001. * @retval None
  1002. */
  1003. __STATIC_INLINE void LL_EXTI_DisableRisingTrig_0_31(uint32_t ExtiLine)
  1004. {
  1005. CLEAR_BIT(EXTI->RTSR1, ExtiLine);
  1006. }
  1007. /**
  1008. * @brief Disable ExtiLine Rising Edge Trigger for Lines in range 32 to 63
  1009. * @note The configurable wakeup lines are edge-triggered. No glitch must be
  1010. * generated on these lines. If a rising edge on a configurable interrupt
  1011. * line occurs during a write operation in the EXTI_RTSR register, the
  1012. * pending bit is not set.
  1013. * Rising and falling edge triggers can be set for
  1014. * the same interrupt line. In this case, both generate a trigger
  1015. * condition.
  1016. * @rmtoll RTSR2 RTx LL_EXTI_DisableRisingTrig_32_63
  1017. * @param ExtiLine This parameter can be a combination of the following values:
  1018. * @arg @ref LL_EXTI_LINE_33 (*)
  1019. * @arg @ref LL_EXTI_LINE_40
  1020. * @arg @ref LL_EXTI_LINE_41
  1021. * (*) value not defined in all devices
  1022. * @retval None
  1023. */
  1024. __STATIC_INLINE void LL_EXTI_DisableRisingTrig_32_63(uint32_t ExtiLine)
  1025. {
  1026. CLEAR_BIT(EXTI->RTSR2, ExtiLine);
  1027. }
  1028. /**
  1029. * @brief Check if rising edge trigger is enabled for Lines in range 0 to 31
  1030. * @rmtoll RTSR1 RTx LL_EXTI_IsEnabledRisingTrig_0_31
  1031. * @param ExtiLine This parameter can be a combination of the following values:
  1032. * @arg @ref LL_EXTI_LINE_0
  1033. * @arg @ref LL_EXTI_LINE_1
  1034. * @arg @ref LL_EXTI_LINE_2
  1035. * @arg @ref LL_EXTI_LINE_3
  1036. * @arg @ref LL_EXTI_LINE_4
  1037. * @arg @ref LL_EXTI_LINE_5
  1038. * @arg @ref LL_EXTI_LINE_6
  1039. * @arg @ref LL_EXTI_LINE_7
  1040. * @arg @ref LL_EXTI_LINE_8
  1041. * @arg @ref LL_EXTI_LINE_9
  1042. * @arg @ref LL_EXTI_LINE_10
  1043. * @arg @ref LL_EXTI_LINE_11
  1044. * @arg @ref LL_EXTI_LINE_12
  1045. * @arg @ref LL_EXTI_LINE_13
  1046. * @arg @ref LL_EXTI_LINE_14
  1047. * @arg @ref LL_EXTI_LINE_15
  1048. * @arg @ref LL_EXTI_LINE_16
  1049. * @arg @ref LL_EXTI_LINE_17
  1050. * @arg @ref LL_EXTI_LINE_18
  1051. * @arg @ref LL_EXTI_LINE_19
  1052. * @arg @ref LL_EXTI_LINE_20 (*)
  1053. * @arg @ref LL_EXTI_LINE_21 (*)
  1054. * @arg @ref LL_EXTI_LINE_31 (*)
  1055. * (*) value not defined in all devices
  1056. * @retval State of bit (1 or 0).
  1057. */
  1058. __STATIC_INLINE uint32_t LL_EXTI_IsEnabledRisingTrig_0_31(uint32_t ExtiLine)
  1059. {
  1060. return ((READ_BIT(EXTI->RTSR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
  1061. }
  1062. /**
  1063. * @brief Check if rising edge trigger is enabled for Lines in range 32 to 63
  1064. * @rmtoll RTSR2 RTx LL_EXTI_IsEnabledRisingTrig_32_63
  1065. * @param ExtiLine This parameter can be a combination of the following values:
  1066. * @arg @ref LL_EXTI_LINE_33 (*)
  1067. * @arg @ref LL_EXTI_LINE_40
  1068. * @arg @ref LL_EXTI_LINE_41
  1069. * (*) value not defined in all devices
  1070. * @retval State of bit (1 or 0).
  1071. */
  1072. __STATIC_INLINE uint32_t LL_EXTI_IsEnabledRisingTrig_32_63(uint32_t ExtiLine)
  1073. {
  1074. return ((READ_BIT(EXTI->RTSR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
  1075. }
  1076. /**
  1077. * @}
  1078. */
  1079. /** @defgroup EXTI_LL_EF_Falling_Trigger_Management Falling_Trigger_Management
  1080. * @{
  1081. */
  1082. /**
  1083. * @brief Enable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
  1084. * @note The configurable wakeup lines are edge-triggered. No glitch must be
  1085. * generated on these lines. If a falling edge on a configurable interrupt
  1086. * line occurs during a write operation in the EXTI_FTSR register, the
  1087. * pending bit is not set.
  1088. * Rising and falling edge triggers can be set for
  1089. * the same interrupt line. In this case, both generate a trigger
  1090. * condition.
  1091. * @rmtoll FTSR1 FTx LL_EXTI_EnableFallingTrig_0_31
  1092. * @param ExtiLine This parameter can be a combination of the following values:
  1093. * @arg @ref LL_EXTI_LINE_0
  1094. * @arg @ref LL_EXTI_LINE_1
  1095. * @arg @ref LL_EXTI_LINE_2
  1096. * @arg @ref LL_EXTI_LINE_3
  1097. * @arg @ref LL_EXTI_LINE_4
  1098. * @arg @ref LL_EXTI_LINE_5
  1099. * @arg @ref LL_EXTI_LINE_6
  1100. * @arg @ref LL_EXTI_LINE_7
  1101. * @arg @ref LL_EXTI_LINE_8
  1102. * @arg @ref LL_EXTI_LINE_9
  1103. * @arg @ref LL_EXTI_LINE_10
  1104. * @arg @ref LL_EXTI_LINE_11
  1105. * @arg @ref LL_EXTI_LINE_12
  1106. * @arg @ref LL_EXTI_LINE_13
  1107. * @arg @ref LL_EXTI_LINE_14
  1108. * @arg @ref LL_EXTI_LINE_15
  1109. * @arg @ref LL_EXTI_LINE_16
  1110. * @arg @ref LL_EXTI_LINE_17
  1111. * @arg @ref LL_EXTI_LINE_18
  1112. * @arg @ref LL_EXTI_LINE_19
  1113. * @arg @ref LL_EXTI_LINE_20 (*)
  1114. * @arg @ref LL_EXTI_LINE_21 (*)
  1115. * @arg @ref LL_EXTI_LINE_31 (*)
  1116. * (*) value not defined in all devices
  1117. * @note Please check each device line mapping for EXTI Line availability
  1118. * @retval None
  1119. */
  1120. __STATIC_INLINE void LL_EXTI_EnableFallingTrig_0_31(uint32_t ExtiLine)
  1121. {
  1122. SET_BIT(EXTI->FTSR1, ExtiLine);
  1123. }
  1124. /**
  1125. * @brief Enable ExtiLine Falling Edge Trigger for Lines in range 32 to 63
  1126. * @note The configurable wakeup lines are edge-triggered. No glitch must be
  1127. * generated on these lines. If a Falling edge on a configurable interrupt
  1128. * line occurs during a write operation in the EXTI_FTSR register, the
  1129. * pending bit is not set.
  1130. * Rising and falling edge triggers can be set for
  1131. * the same interrupt line. In this case, both generate a trigger
  1132. * condition.
  1133. * @rmtoll FTSR2 FTx LL_EXTI_EnableFallingTrig_32_63
  1134. * @param ExtiLine This parameter can be a combination of the following values:
  1135. * @arg @ref LL_EXTI_LINE_33 (*)
  1136. * @arg @ref LL_EXTI_LINE_40
  1137. * @arg @ref LL_EXTI_LINE_41
  1138. * (*) value not defined in all devices
  1139. * @retval None
  1140. */
  1141. __STATIC_INLINE void LL_EXTI_EnableFallingTrig_32_63(uint32_t ExtiLine)
  1142. {
  1143. SET_BIT(EXTI->FTSR2, ExtiLine);
  1144. }
  1145. /**
  1146. * @brief Disable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
  1147. * @note The configurable wakeup lines are edge-triggered. No glitch must be
  1148. * generated on these lines. If a Falling edge on a configurable interrupt
  1149. * line occurs during a write operation in the EXTI_FTSR register, the
  1150. * pending bit is not set.
  1151. * Rising and falling edge triggers can be set for the same interrupt line.
  1152. * In this case, both generate a trigger condition.
  1153. * @rmtoll FTSR1 FTx LL_EXTI_DisableFallingTrig_0_31
  1154. * @param ExtiLine This parameter can be a combination of the following values:
  1155. * @arg @ref LL_EXTI_LINE_0
  1156. * @arg @ref LL_EXTI_LINE_1
  1157. * @arg @ref LL_EXTI_LINE_2
  1158. * @arg @ref LL_EXTI_LINE_3
  1159. * @arg @ref LL_EXTI_LINE_4
  1160. * @arg @ref LL_EXTI_LINE_5
  1161. * @arg @ref LL_EXTI_LINE_6
  1162. * @arg @ref LL_EXTI_LINE_7
  1163. * @arg @ref LL_EXTI_LINE_8
  1164. * @arg @ref LL_EXTI_LINE_9
  1165. * @arg @ref LL_EXTI_LINE_10
  1166. * @arg @ref LL_EXTI_LINE_11
  1167. * @arg @ref LL_EXTI_LINE_12
  1168. * @arg @ref LL_EXTI_LINE_13
  1169. * @arg @ref LL_EXTI_LINE_14
  1170. * @arg @ref LL_EXTI_LINE_15
  1171. * @arg @ref LL_EXTI_LINE_16
  1172. * @arg @ref LL_EXTI_LINE_17
  1173. * @arg @ref LL_EXTI_LINE_18
  1174. * @arg @ref LL_EXTI_LINE_19
  1175. * @arg @ref LL_EXTI_LINE_20 (*)
  1176. * @arg @ref LL_EXTI_LINE_21 (*)
  1177. * @arg @ref LL_EXTI_LINE_31 (*)
  1178. * (*) value not defined in all devices
  1179. * @note Please check each device line mapping for EXTI Line availability
  1180. * @retval None
  1181. */
  1182. __STATIC_INLINE void LL_EXTI_DisableFallingTrig_0_31(uint32_t ExtiLine)
  1183. {
  1184. CLEAR_BIT(EXTI->FTSR1, ExtiLine);
  1185. }
  1186. /**
  1187. * @brief Disable ExtiLine Falling Edge Trigger for Lines in range 32 to 63
  1188. * @note The configurable wakeup lines are edge-triggered. No glitch must be
  1189. * generated on these lines. If a Falling edge on a configurable interrupt
  1190. * line occurs during a write operation in the EXTI_FTSR register, the
  1191. * pending bit is not set.
  1192. * Rising and falling edge triggers can be set for the same interrupt line.
  1193. * In this case, both generate a trigger condition.
  1194. * @rmtoll FTSR2 FTx LL_EXTI_DisableFallingTrig_32_63
  1195. * @param ExtiLine This parameter can be a combination of the following values:
  1196. * @arg @ref LL_EXTI_LINE_33 (*)
  1197. * @arg @ref LL_EXTI_LINE_40
  1198. * @arg @ref LL_EXTI_LINE_41
  1199. * (*) value not defined in all devices
  1200. * @retval None
  1201. */
  1202. __STATIC_INLINE void LL_EXTI_DisableFallingTrig_32_63(uint32_t ExtiLine)
  1203. {
  1204. CLEAR_BIT(EXTI->FTSR2, ExtiLine);
  1205. }
  1206. /**
  1207. * @brief Check if falling edge trigger is enabled for Lines in range 0 to 31
  1208. * @rmtoll FTSR1 FTx LL_EXTI_IsEnabledFallingTrig_0_31
  1209. * @param ExtiLine This parameter can be a combination of the following values:
  1210. * @arg @ref LL_EXTI_LINE_0
  1211. * @arg @ref LL_EXTI_LINE_1
  1212. * @arg @ref LL_EXTI_LINE_2
  1213. * @arg @ref LL_EXTI_LINE_3
  1214. * @arg @ref LL_EXTI_LINE_4
  1215. * @arg @ref LL_EXTI_LINE_5
  1216. * @arg @ref LL_EXTI_LINE_6
  1217. * @arg @ref LL_EXTI_LINE_7
  1218. * @arg @ref LL_EXTI_LINE_8
  1219. * @arg @ref LL_EXTI_LINE_9
  1220. * @arg @ref LL_EXTI_LINE_10
  1221. * @arg @ref LL_EXTI_LINE_11
  1222. * @arg @ref LL_EXTI_LINE_12
  1223. * @arg @ref LL_EXTI_LINE_13
  1224. * @arg @ref LL_EXTI_LINE_14
  1225. * @arg @ref LL_EXTI_LINE_15
  1226. * @arg @ref LL_EXTI_LINE_16
  1227. * @arg @ref LL_EXTI_LINE_17
  1228. * @arg @ref LL_EXTI_LINE_18
  1229. * @arg @ref LL_EXTI_LINE_19
  1230. * @arg @ref LL_EXTI_LINE_20 (*)
  1231. * @arg @ref LL_EXTI_LINE_21 (*)
  1232. * @arg @ref LL_EXTI_LINE_31 (*)
  1233. * (*) value not defined in all devices
  1234. * @note Please check each device line mapping for EXTI Line availability
  1235. * @retval State of bit (1 or 0).
  1236. */
  1237. __STATIC_INLINE uint32_t LL_EXTI_IsEnabledFallingTrig_0_31(uint32_t ExtiLine)
  1238. {
  1239. return ((READ_BIT(EXTI->FTSR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
  1240. }
  1241. /**
  1242. * @brief Check if falling edge trigger is enabled for Lines in range 32 to 63
  1243. * @rmtoll FTSR2 FTx LL_EXTI_IsEnabledFallingTrig_32_63
  1244. * @param ExtiLine This parameter can be a combination of the following values:
  1245. * @arg @ref LL_EXTI_LINE_33 (*)
  1246. * @arg @ref LL_EXTI_LINE_40
  1247. * @arg @ref LL_EXTI_LINE_41
  1248. * @retval State of bit (1 or 0).
  1249. */
  1250. __STATIC_INLINE uint32_t LL_EXTI_IsEnabledFallingTrig_32_63(uint32_t ExtiLine)
  1251. {
  1252. return ((READ_BIT(EXTI->FTSR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
  1253. }
  1254. /**
  1255. * @}
  1256. */
  1257. /** @defgroup EXTI_LL_EF_Software_Interrupt_Management Software_Interrupt_Management
  1258. * @{
  1259. */
  1260. /**
  1261. * @brief Generate a software Interrupt Event for Lines in range 0 to 31
  1262. * @note If the interrupt is enabled on this line in the EXTI_IMR1, writing a 1 to
  1263. * this bit when it is at '0' sets the corresponding pending bit in EXTI_PR1
  1264. * resulting in an interrupt request generation.
  1265. * This bit is cleared by clearing the corresponding bit in the EXTI_PR1
  1266. * register (by writing a 1 into the bit)
  1267. * @rmtoll SWIER1 SWIx LL_EXTI_GenerateSWI_0_31
  1268. * @param ExtiLine This parameter can be a combination of the following values:
  1269. * @arg @ref LL_EXTI_LINE_0
  1270. * @arg @ref LL_EXTI_LINE_1
  1271. * @arg @ref LL_EXTI_LINE_2
  1272. * @arg @ref LL_EXTI_LINE_3
  1273. * @arg @ref LL_EXTI_LINE_4
  1274. * @arg @ref LL_EXTI_LINE_5
  1275. * @arg @ref LL_EXTI_LINE_6
  1276. * @arg @ref LL_EXTI_LINE_7
  1277. * @arg @ref LL_EXTI_LINE_8
  1278. * @arg @ref LL_EXTI_LINE_9
  1279. * @arg @ref LL_EXTI_LINE_10
  1280. * @arg @ref LL_EXTI_LINE_11
  1281. * @arg @ref LL_EXTI_LINE_12
  1282. * @arg @ref LL_EXTI_LINE_13
  1283. * @arg @ref LL_EXTI_LINE_14
  1284. * @arg @ref LL_EXTI_LINE_15
  1285. * @arg @ref LL_EXTI_LINE_16
  1286. * @arg @ref LL_EXTI_LINE_17
  1287. * @arg @ref LL_EXTI_LINE_18
  1288. * @arg @ref LL_EXTI_LINE_19
  1289. * @arg @ref LL_EXTI_LINE_20 (*)
  1290. * @arg @ref LL_EXTI_LINE_21 (*)
  1291. * @arg @ref LL_EXTI_LINE_31 (*)
  1292. * (*) value not defined in all devices
  1293. * @note Please check each device line mapping for EXTI Line availability
  1294. * @retval None
  1295. */
  1296. __STATIC_INLINE void LL_EXTI_GenerateSWI_0_31(uint32_t ExtiLine)
  1297. {
  1298. SET_BIT(EXTI->SWIER1, ExtiLine);
  1299. }
  1300. /**
  1301. * @brief Generate a software Interrupt Event for Lines in range 32 to 63
  1302. * @note If the interrupt is enabled on this line inthe EXTI_IMR2, writing a 1 to
  1303. * this bit when it is at '0' sets the corresponding pending bit in EXTI_PR2
  1304. * resulting in an interrupt request generation.
  1305. * This bit is cleared by clearing the corresponding bit in the EXTI_PR2
  1306. * register (by writing a 1 into the bit)
  1307. * @rmtoll SWIER2 SWIx LL_EXTI_GenerateSWI_32_63
  1308. * @param ExtiLine This parameter can be a combination of the following values:
  1309. * @arg @ref LL_EXTI_LINE_33 (*)
  1310. * @arg @ref LL_EXTI_LINE_40
  1311. * @arg @ref LL_EXTI_LINE_41
  1312. * (*) value not defined in all devices
  1313. * @retval None
  1314. */
  1315. __STATIC_INLINE void LL_EXTI_GenerateSWI_32_63(uint32_t ExtiLine)
  1316. {
  1317. SET_BIT(EXTI->SWIER2, ExtiLine);
  1318. }
  1319. /**
  1320. * @}
  1321. */
  1322. /** @defgroup EXTI_LL_EF_Flag_Management Flag_Management
  1323. * @{
  1324. */
  1325. /**
  1326. * @brief Check if the ExtLine Flag is set or not for Lines in range 0 to 31
  1327. * @note This bit is set when the selected edge event arrives on the interrupt
  1328. * line. This bit is cleared by writing a 1 to the bit.
  1329. * @rmtoll PR1 PIFx LL_EXTI_IsActiveFlag_0_31
  1330. * @param ExtiLine This parameter can be a combination of the following values:
  1331. * @arg @ref LL_EXTI_LINE_0
  1332. * @arg @ref LL_EXTI_LINE_1
  1333. * @arg @ref LL_EXTI_LINE_2
  1334. * @arg @ref LL_EXTI_LINE_3
  1335. * @arg @ref LL_EXTI_LINE_4
  1336. * @arg @ref LL_EXTI_LINE_5
  1337. * @arg @ref LL_EXTI_LINE_6
  1338. * @arg @ref LL_EXTI_LINE_7
  1339. * @arg @ref LL_EXTI_LINE_8
  1340. * @arg @ref LL_EXTI_LINE_9
  1341. * @arg @ref LL_EXTI_LINE_10
  1342. * @arg @ref LL_EXTI_LINE_11
  1343. * @arg @ref LL_EXTI_LINE_12
  1344. * @arg @ref LL_EXTI_LINE_13
  1345. * @arg @ref LL_EXTI_LINE_14
  1346. * @arg @ref LL_EXTI_LINE_15
  1347. * @arg @ref LL_EXTI_LINE_16
  1348. * @arg @ref LL_EXTI_LINE_17
  1349. * @arg @ref LL_EXTI_LINE_18
  1350. * @arg @ref LL_EXTI_LINE_19
  1351. * @arg @ref LL_EXTI_LINE_20 (*)
  1352. * @arg @ref LL_EXTI_LINE_21 (*)
  1353. * @arg @ref LL_EXTI_LINE_31 (*)
  1354. * (*) value not defined in all devices
  1355. * @retval State of bit (1 or 0).
  1356. */
  1357. __STATIC_INLINE uint32_t LL_EXTI_IsActiveFlag_0_31(uint32_t ExtiLine)
  1358. {
  1359. return ((READ_BIT(EXTI->PR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
  1360. }
  1361. /**
  1362. * @brief Check if the ExtLine Flag is set or not for Lines in range 32 to 63
  1363. * @note This bit is set when the selected edge event arrives on the interrupt
  1364. * line. This bit is cleared by writing a 1 to the bit.
  1365. * @rmtoll PR2 PIFx LL_EXTI_IsActiveFlag_32_63
  1366. * @param ExtiLine This parameter can be a combination of the following values:
  1367. * @arg @ref LL_EXTI_LINE_33 (*)
  1368. * @arg @ref LL_EXTI_LINE_40
  1369. * @arg @ref LL_EXTI_LINE_41
  1370. * (*) value not defined in all devices
  1371. * @retval State of bit (1 or 0).
  1372. */
  1373. __STATIC_INLINE uint32_t LL_EXTI_IsActiveFlag_32_63(uint32_t ExtiLine)
  1374. {
  1375. return ((READ_BIT(EXTI->PR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
  1376. }
  1377. /**
  1378. * @brief Read ExtLine Combination Flag for Lines in range 0 to 31
  1379. * @note This bit is set when the selected edge event arrives on the interrupt
  1380. * line. This bit is cleared by writing a 1 to the bit.
  1381. * @rmtoll PR1 PIFx LL_EXTI_ReadFlag_0_31
  1382. * @param ExtiLine This parameter can be a combination of the following values:
  1383. * @arg @ref LL_EXTI_LINE_0
  1384. * @arg @ref LL_EXTI_LINE_1
  1385. * @arg @ref LL_EXTI_LINE_2
  1386. * @arg @ref LL_EXTI_LINE_3
  1387. * @arg @ref LL_EXTI_LINE_4
  1388. * @arg @ref LL_EXTI_LINE_5
  1389. * @arg @ref LL_EXTI_LINE_6
  1390. * @arg @ref LL_EXTI_LINE_7
  1391. * @arg @ref LL_EXTI_LINE_8
  1392. * @arg @ref LL_EXTI_LINE_9
  1393. * @arg @ref LL_EXTI_LINE_10
  1394. * @arg @ref LL_EXTI_LINE_11
  1395. * @arg @ref LL_EXTI_LINE_12
  1396. * @arg @ref LL_EXTI_LINE_13
  1397. * @arg @ref LL_EXTI_LINE_14
  1398. * @arg @ref LL_EXTI_LINE_15
  1399. * @arg @ref LL_EXTI_LINE_16
  1400. * @arg @ref LL_EXTI_LINE_17
  1401. * @arg @ref LL_EXTI_LINE_18
  1402. * @arg @ref LL_EXTI_LINE_19
  1403. * @arg @ref LL_EXTI_LINE_20 (*)
  1404. * @arg @ref LL_EXTI_LINE_21 (*)
  1405. * @arg @ref LL_EXTI_LINE_31 (*)
  1406. * (*) value not defined in all devices
  1407. * @retval @note This bit is set when the selected edge event arrives on the interrupt
  1408. */
  1409. __STATIC_INLINE uint32_t LL_EXTI_ReadFlag_0_31(uint32_t ExtiLine)
  1410. {
  1411. return (uint32_t)(READ_BIT(EXTI->PR1, ExtiLine));
  1412. }
  1413. /**
  1414. * @brief Read ExtLine Combination Flag for Lines in range 32 to 63
  1415. * @note This bit is set when the selected edge event arrives on the interrupt
  1416. * line. This bit is cleared by writing a 1 to the bit.
  1417. * @rmtoll PR2 PIFx LL_EXTI_ReadFlag_32_63
  1418. * @param ExtiLine This parameter can be a combination of the following values:
  1419. * @arg @ref LL_EXTI_LINE_33 (*)
  1420. * @arg @ref LL_EXTI_LINE_40
  1421. * @arg @ref LL_EXTI_LINE_41
  1422. * (*) value not defined in all devices
  1423. * @retval @note This bit is set when the selected edge event arrives on the interrupt
  1424. */
  1425. __STATIC_INLINE uint32_t LL_EXTI_ReadFlag_32_63(uint32_t ExtiLine)
  1426. {
  1427. return (uint32_t)(READ_BIT(EXTI->PR2, ExtiLine));
  1428. }
  1429. /**
  1430. * @brief Clear ExtLine Flags for Lines in range 0 to 31
  1431. * @note This bit is set when the selected edge event arrives on the interrupt
  1432. * line. This bit is cleared by writing a 1 to the bit.
  1433. * @rmtoll PR1 PIFx LL_EXTI_ClearFlag_0_31
  1434. * @param ExtiLine This parameter can be a combination of the following values:
  1435. * @arg @ref LL_EXTI_LINE_0
  1436. * @arg @ref LL_EXTI_LINE_1
  1437. * @arg @ref LL_EXTI_LINE_2
  1438. * @arg @ref LL_EXTI_LINE_3
  1439. * @arg @ref LL_EXTI_LINE_4
  1440. * @arg @ref LL_EXTI_LINE_5
  1441. * @arg @ref LL_EXTI_LINE_6
  1442. * @arg @ref LL_EXTI_LINE_7
  1443. * @arg @ref LL_EXTI_LINE_8
  1444. * @arg @ref LL_EXTI_LINE_9
  1445. * @arg @ref LL_EXTI_LINE_10
  1446. * @arg @ref LL_EXTI_LINE_11
  1447. * @arg @ref LL_EXTI_LINE_12
  1448. * @arg @ref LL_EXTI_LINE_13
  1449. * @arg @ref LL_EXTI_LINE_14
  1450. * @arg @ref LL_EXTI_LINE_15
  1451. * @arg @ref LL_EXTI_LINE_16
  1452. * @arg @ref LL_EXTI_LINE_17
  1453. * @arg @ref LL_EXTI_LINE_18
  1454. * @arg @ref LL_EXTI_LINE_19
  1455. * @arg @ref LL_EXTI_LINE_20 (*)
  1456. * @arg @ref LL_EXTI_LINE_21 (*)
  1457. * @arg @ref LL_EXTI_LINE_31 (*)
  1458. * (*) value not defined in all devices
  1459. * @retval None
  1460. */
  1461. __STATIC_INLINE void LL_EXTI_ClearFlag_0_31(uint32_t ExtiLine)
  1462. {
  1463. WRITE_REG(EXTI->PR1, ExtiLine);
  1464. }
  1465. /**
  1466. * @brief Clear ExtLine Flags for Lines in range 32 to 63
  1467. * @note This bit is set when the selected edge event arrives on the interrupt
  1468. * line. This bit is cleared by writing a 1 to the bit.
  1469. * @rmtoll PR2 PIFx LL_EXTI_ClearFlag_32_63
  1470. * @param ExtiLine This parameter can be a combination of the following values:
  1471. * @arg @ref LL_EXTI_LINE_33 (*)
  1472. * @arg @ref LL_EXTI_LINE_40
  1473. * @arg @ref LL_EXTI_LINE_41
  1474. * (*) value not defined in all devices
  1475. * @retval None
  1476. */
  1477. __STATIC_INLINE void LL_EXTI_ClearFlag_32_63(uint32_t ExtiLine)
  1478. {
  1479. WRITE_REG(EXTI->PR2, ExtiLine);
  1480. }
  1481. /**
  1482. * @}
  1483. */
  1484. #if defined(USE_FULL_LL_DRIVER)
  1485. /** @defgroup EXTI_LL_EF_Init Initialization and de-initialization functions
  1486. * @{
  1487. */
  1488. ErrorStatus LL_EXTI_Init(LL_EXTI_InitTypeDef *EXTI_InitStruct);
  1489. ErrorStatus LL_EXTI_DeInit(void);
  1490. void LL_EXTI_StructInit(LL_EXTI_InitTypeDef *EXTI_InitStruct);
  1491. /**
  1492. * @}
  1493. */
  1494. #endif /* USE_FULL_LL_DRIVER */
  1495. /**
  1496. * @}
  1497. */
  1498. /**
  1499. * @}
  1500. */
  1501. #endif /* EXTI */
  1502. /**
  1503. * @}
  1504. */
  1505. #ifdef __cplusplus
  1506. }
  1507. #endif
  1508. #endif /* STM32WBxx_LL_EXTI_H */
  1509. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/