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.
 
 
 

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