stm32g4xx_ll_exti.h 53 KB

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