tdse-tp0_03-hw_sw_test

FIUBA - Electrónica - Taller de Sistemas Embebidos - Trabajo Práctico N°: 0 - Proyecto N°: 03
Index Commits Files Refs README
Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_exti.h (33208B)
   1 /**
   2  ******************************************************************************
   3  * @file    stm32f1xx_ll_exti.h
   4  * @author  MCD Application Team
   5  * @brief   Header file of EXTI LL module.
   6  ******************************************************************************
   7  * @attention
   8  *
   9  * Copyright (c) 2016 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 
  19 /* Define to prevent recursive inclusion -------------------------------------*/
  20 #ifndef STM32F1xx_LL_EXTI_H
  21 #define STM32F1xx_LL_EXTI_H
  22 
  23 #ifdef __cplusplus
  24 extern "C" {
  25 #endif
  26 
  27     /* Includes ------------------------------------------------------------------*/
  28 #include "stm32f1xx.h"
  29 
  30     /** @addtogroup STM32F1xx_LL_Driver
  31      * @{
  32      */
  33 
  34 #if defined (EXTI)
  35 
  36     /** @defgroup EXTI_LL EXTI
  37      * @{
  38      */
  39 
  40     /* Private types -------------------------------------------------------------*/
  41     /* Private variables ---------------------------------------------------------*/
  42     /* Private constants ---------------------------------------------------------*/
  43     /* Private Macros ------------------------------------------------------------*/
  44 #if defined(USE_FULL_LL_DRIVER)
  45     /** @defgroup EXTI_LL_Private_Macros EXTI Private Macros
  46      * @{
  47      */
  48     /**
  49      * @}
  50      */
  51 #endif /*USE_FULL_LL_DRIVER*/
  52     /* Exported types ------------------------------------------------------------*/
  53 #if defined(USE_FULL_LL_DRIVER)
  54     /** @defgroup EXTI_LL_ES_INIT EXTI Exported Init structure
  55      * @{
  56      */
  57     typedef struct
  58     {
  59 
  60         uint32_t Line_0_31; /*!< Specifies the EXTI lines to be enabled or disabled for Lines in range 0 to 31
  61          This parameter can be any combination of @ref EXTI_LL_EC_LINE */
  62 
  63         FunctionalState LineCommand; /*!< Specifies the new state of the selected EXTI lines.
  64          This parameter can be set either to ENABLE or DISABLE */
  65 
  66         uint8_t Mode; /*!< Specifies the mode for the EXTI lines.
  67          This parameter can be a value of @ref EXTI_LL_EC_MODE. */
  68 
  69         uint8_t Trigger; /*!< Specifies the trigger signal active edge for the EXTI lines.
  70          This parameter can be a value of @ref EXTI_LL_EC_TRIGGER. */
  71     }LL_EXTI_InitTypeDef;
  72 
  73     /**
  74      * @}
  75      */
  76 #endif /*USE_FULL_LL_DRIVER*/
  77 
  78     /* Exported constants --------------------------------------------------------*/
  79     /** @defgroup EXTI_LL_Exported_Constants EXTI Exported Constants
  80      * @{
  81      */
  82 
  83     /** @defgroup EXTI_LL_EC_LINE LINE
  84      * @{
  85      */
  86 #define LL_EXTI_LINE_0                 EXTI_IMR_IM0           /*!< Extended line 0 */
  87 #define LL_EXTI_LINE_1                 EXTI_IMR_IM1           /*!< Extended line 1 */
  88 #define LL_EXTI_LINE_2                 EXTI_IMR_IM2           /*!< Extended line 2 */
  89 #define LL_EXTI_LINE_3                 EXTI_IMR_IM3           /*!< Extended line 3 */
  90 #define LL_EXTI_LINE_4                 EXTI_IMR_IM4           /*!< Extended line 4 */
  91 #define LL_EXTI_LINE_5                 EXTI_IMR_IM5           /*!< Extended line 5 */
  92 #define LL_EXTI_LINE_6                 EXTI_IMR_IM6           /*!< Extended line 6 */
  93 #define LL_EXTI_LINE_7                 EXTI_IMR_IM7           /*!< Extended line 7 */
  94 #define LL_EXTI_LINE_8                 EXTI_IMR_IM8           /*!< Extended line 8 */
  95 #define LL_EXTI_LINE_9                 EXTI_IMR_IM9           /*!< Extended line 9 */
  96 #define LL_EXTI_LINE_10                EXTI_IMR_IM10          /*!< Extended line 10 */
  97 #define LL_EXTI_LINE_11                EXTI_IMR_IM11          /*!< Extended line 11 */
  98 #define LL_EXTI_LINE_12                EXTI_IMR_IM12          /*!< Extended line 12 */
  99 #define LL_EXTI_LINE_13                EXTI_IMR_IM13          /*!< Extended line 13 */
 100 #define LL_EXTI_LINE_14                EXTI_IMR_IM14          /*!< Extended line 14 */
 101 #define LL_EXTI_LINE_15                EXTI_IMR_IM15          /*!< Extended line 15 */
 102 #if defined(EXTI_IMR_IM16)
 103 #define LL_EXTI_LINE_16                EXTI_IMR_IM16          /*!< Extended line 16 */
 104 #endif
 105 #define LL_EXTI_LINE_17                EXTI_IMR_IM17          /*!< Extended line 17 */
 106 #if defined(EXTI_IMR_IM18)
 107 #define LL_EXTI_LINE_18                EXTI_IMR_IM18          /*!< Extended line 18 */
 108 #endif
 109 #if defined(EXTI_IMR_IM19)
 110 #define LL_EXTI_LINE_19                EXTI_IMR_IM19          /*!< Extended line 19 */
 111 #endif
 112 #if defined(EXTI_IMR_IM20)
 113 #define LL_EXTI_LINE_20                EXTI_IMR_IM20          /*!< Extended line 20 */
 114 #endif
 115 #if defined(EXTI_IMR_IM21)
 116 #define LL_EXTI_LINE_21                EXTI_IMR_IM21          /*!< Extended line 21 */
 117 #endif
 118 #if defined(EXTI_IMR_IM22)
 119 #define LL_EXTI_LINE_22                EXTI_IMR_IM22          /*!< Extended line 22 */
 120 #endif
 121 #if defined(EXTI_IMR_IM23)
 122 #define LL_EXTI_LINE_23                EXTI_IMR_IM23          /*!< Extended line 23 */
 123 #endif
 124 #if defined(EXTI_IMR_IM24)
 125 #define LL_EXTI_LINE_24                EXTI_IMR_IM24          /*!< Extended line 24 */
 126 #endif
 127 #if defined(EXTI_IMR_IM25)
 128 #define LL_EXTI_LINE_25                EXTI_IMR_IM25          /*!< Extended line 25 */
 129 #endif
 130 #if defined(EXTI_IMR_IM26)
 131 #define LL_EXTI_LINE_26                EXTI_IMR_IM26          /*!< Extended line 26 */
 132 #endif
 133 #if defined(EXTI_IMR_IM27)
 134 #define LL_EXTI_LINE_27                EXTI_IMR_IM27          /*!< Extended line 27 */
 135 #endif
 136 #if defined(EXTI_IMR_IM28)
 137 #define LL_EXTI_LINE_28                EXTI_IMR_IM28          /*!< Extended line 28 */
 138 #endif
 139 #if defined(EXTI_IMR_IM29)
 140 #define LL_EXTI_LINE_29                EXTI_IMR_IM29          /*!< Extended line 29 */
 141 #endif
 142 #if defined(EXTI_IMR_IM30)
 143 #define LL_EXTI_LINE_30                EXTI_IMR_IM30          /*!< Extended line 30 */
 144 #endif
 145 #if defined(EXTI_IMR_IM31)
 146 #define LL_EXTI_LINE_31                EXTI_IMR_IM31          /*!< Extended line 31 */
 147 #endif
 148 #define LL_EXTI_LINE_ALL_0_31          EXTI_IMR_IM            /*!< All Extended line not reserved*/
 149 
 150 #define LL_EXTI_LINE_ALL               (0xFFFFFFFFU)  /*!< All Extended line */
 151 
 152 #if defined(USE_FULL_LL_DRIVER)
 153 #define LL_EXTI_LINE_NONE              (0x00000000U)  /*!< None Extended line */
 154 #endif /*USE_FULL_LL_DRIVER*/
 155 
 156     /**
 157      * @}
 158      */
 159 #if defined(USE_FULL_LL_DRIVER)
 160 
 161     /** @defgroup EXTI_LL_EC_MODE Mode
 162      * @{
 163      */
 164 #define LL_EXTI_MODE_IT                 ((uint8_t)0x00) /*!< Interrupt Mode */
 165 #define LL_EXTI_MODE_EVENT              ((uint8_t)0x01) /*!< Event Mode */
 166 #define LL_EXTI_MODE_IT_EVENT           ((uint8_t)0x02) /*!< Interrupt & Event Mode */
 167     /**
 168      * @}
 169      */
 170 
 171     /** @defgroup EXTI_LL_EC_TRIGGER Edge Trigger
 172      * @{
 173      */
 174 #define LL_EXTI_TRIGGER_NONE            ((uint8_t)0x00) /*!< No Trigger Mode */
 175 #define LL_EXTI_TRIGGER_RISING          ((uint8_t)0x01) /*!< Trigger Rising Mode */
 176 #define LL_EXTI_TRIGGER_FALLING         ((uint8_t)0x02) /*!< Trigger Falling Mode */
 177 #define LL_EXTI_TRIGGER_RISING_FALLING  ((uint8_t)0x03) /*!< Trigger Rising & Falling Mode */
 178 
 179     /**
 180      * @}
 181      */
 182 
 183 #endif /*USE_FULL_LL_DRIVER*/
 184 
 185     /**
 186      * @}
 187      */
 188 
 189     /* Exported macro ------------------------------------------------------------*/
 190     /** @defgroup EXTI_LL_Exported_Macros EXTI Exported Macros
 191      * @{
 192      */
 193 
 194     /** @defgroup EXTI_LL_EM_WRITE_READ Common Write and read registers Macros
 195      * @{
 196      */
 197 
 198     /**
 199      * @brief  Write a value in EXTI register
 200      * @param  __REG__ Register to be written
 201      * @param  __VALUE__ Value to be written in the register
 202      * @retval None
 203      */
 204 #define LL_EXTI_WriteReg(__REG__, __VALUE__) WRITE_REG(EXTI->__REG__, (__VALUE__))
 205 
 206     /**
 207      * @brief  Read a value in EXTI register
 208      * @param  __REG__ Register to be read
 209      * @retval Register value
 210      */
 211 #define LL_EXTI_ReadReg(__REG__) READ_REG(EXTI->__REG__)
 212     /**
 213      * @}
 214      */
 215 
 216     /**
 217      * @}
 218      */
 219 
 220     /* Exported functions --------------------------------------------------------*/
 221     /** @defgroup EXTI_LL_Exported_Functions EXTI Exported Functions
 222      * @{
 223      */
 224     /** @defgroup EXTI_LL_EF_IT_Management IT_Management
 225      * @{
 226      */
 227 
 228     /**
 229      * @brief  Enable ExtiLine Interrupt request for Lines in range 0 to 31
 230      * @note The reset value for the direct or internal lines (see RM)
 231      *       is set to 1 in order to enable the interrupt by default.
 232      *       Bits are set automatically at Power on.
 233      * @rmtoll IMR         IMx           LL_EXTI_EnableIT_0_31
 234      * @param  ExtiLine This parameter can be one of the following values:
 235      *         @arg @ref LL_EXTI_LINE_0
 236      *         @arg @ref LL_EXTI_LINE_1
 237      *         @arg @ref LL_EXTI_LINE_2
 238      *         @arg @ref LL_EXTI_LINE_3
 239      *         @arg @ref LL_EXTI_LINE_4
 240      *         @arg @ref LL_EXTI_LINE_5
 241      *         @arg @ref LL_EXTI_LINE_6
 242      *         @arg @ref LL_EXTI_LINE_7
 243      *         @arg @ref LL_EXTI_LINE_8
 244      *         @arg @ref LL_EXTI_LINE_9
 245      *         @arg @ref LL_EXTI_LINE_10
 246      *         @arg @ref LL_EXTI_LINE_11
 247      *         @arg @ref LL_EXTI_LINE_12
 248      *         @arg @ref LL_EXTI_LINE_13
 249      *         @arg @ref LL_EXTI_LINE_14
 250      *         @arg @ref LL_EXTI_LINE_15
 251      *         @arg @ref LL_EXTI_LINE_16
 252      *         @arg @ref LL_EXTI_LINE_17
 253      *         @arg @ref LL_EXTI_LINE_18
 254      *         @arg @ref LL_EXTI_LINE_19
 255      *         @arg @ref LL_EXTI_LINE_ALL_0_31
 256      * @note   Please check each device line mapping for EXTI Line availability
 257      * @retval None
 258      */
 259     __STATIC_INLINE void LL_EXTI_EnableIT_0_31(uint32_t ExtiLine)
 260     {
 261         SET_BIT(EXTI->IMR, ExtiLine);
 262     }
 263 
 264     /**
 265      * @brief  Disable ExtiLine Interrupt request for Lines in range 0 to 31
 266      * @note The reset value for the direct or internal lines (see RM)
 267      *       is set to 1 in order to enable the interrupt by default.
 268      *       Bits are set automatically at Power on.
 269      * @rmtoll IMR         IMx           LL_EXTI_DisableIT_0_31
 270      * @param  ExtiLine This parameter can be one of the following values:
 271      *         @arg @ref LL_EXTI_LINE_0
 272      *         @arg @ref LL_EXTI_LINE_1
 273      *         @arg @ref LL_EXTI_LINE_2
 274      *         @arg @ref LL_EXTI_LINE_3
 275      *         @arg @ref LL_EXTI_LINE_4
 276      *         @arg @ref LL_EXTI_LINE_5
 277      *         @arg @ref LL_EXTI_LINE_6
 278      *         @arg @ref LL_EXTI_LINE_7
 279      *         @arg @ref LL_EXTI_LINE_8
 280      *         @arg @ref LL_EXTI_LINE_9
 281      *         @arg @ref LL_EXTI_LINE_10
 282      *         @arg @ref LL_EXTI_LINE_11
 283      *         @arg @ref LL_EXTI_LINE_12
 284      *         @arg @ref LL_EXTI_LINE_13
 285      *         @arg @ref LL_EXTI_LINE_14
 286      *         @arg @ref LL_EXTI_LINE_15
 287      *         @arg @ref LL_EXTI_LINE_16
 288      *         @arg @ref LL_EXTI_LINE_17
 289      *         @arg @ref LL_EXTI_LINE_18
 290      *         @arg @ref LL_EXTI_LINE_19
 291      *         @arg @ref LL_EXTI_LINE_ALL_0_31
 292      * @note   Please check each device line mapping for EXTI Line availability
 293      * @retval None
 294      */
 295     __STATIC_INLINE void LL_EXTI_DisableIT_0_31(uint32_t ExtiLine)
 296     {
 297         CLEAR_BIT(EXTI->IMR, ExtiLine);
 298     }
 299 
 300     /**
 301      * @brief  Indicate if ExtiLine Interrupt request is enabled for Lines in range 0 to 31
 302      * @note The reset value for the direct or internal lines (see RM)
 303      *       is set to 1 in order to enable the interrupt by default.
 304      *       Bits are set automatically at Power on.
 305      * @rmtoll IMR         IMx           LL_EXTI_IsEnabledIT_0_31
 306      * @param  ExtiLine This parameter can be one of the following values:
 307      *         @arg @ref LL_EXTI_LINE_0
 308      *         @arg @ref LL_EXTI_LINE_1
 309      *         @arg @ref LL_EXTI_LINE_2
 310      *         @arg @ref LL_EXTI_LINE_3
 311      *         @arg @ref LL_EXTI_LINE_4
 312      *         @arg @ref LL_EXTI_LINE_5
 313      *         @arg @ref LL_EXTI_LINE_6
 314      *         @arg @ref LL_EXTI_LINE_7
 315      *         @arg @ref LL_EXTI_LINE_8
 316      *         @arg @ref LL_EXTI_LINE_9
 317      *         @arg @ref LL_EXTI_LINE_10
 318      *         @arg @ref LL_EXTI_LINE_11
 319      *         @arg @ref LL_EXTI_LINE_12
 320      *         @arg @ref LL_EXTI_LINE_13
 321      *         @arg @ref LL_EXTI_LINE_14
 322      *         @arg @ref LL_EXTI_LINE_15
 323      *         @arg @ref LL_EXTI_LINE_16
 324      *         @arg @ref LL_EXTI_LINE_17
 325      *         @arg @ref LL_EXTI_LINE_18
 326      *         @arg @ref LL_EXTI_LINE_19
 327      *         @arg @ref LL_EXTI_LINE_ALL_0_31
 328      * @note   Please check each device line mapping for EXTI Line availability
 329      * @retval State of bit (1 or 0).
 330      */
 331     __STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine)
 332     {
 333         return (READ_BIT(EXTI->IMR, ExtiLine) == (ExtiLine));
 334     }
 335 
 336     /**
 337      * @}
 338      */
 339 
 340     /** @defgroup EXTI_LL_EF_Event_Management Event_Management
 341      * @{
 342      */
 343 
 344     /**
 345      * @brief  Enable ExtiLine Event request for Lines in range 0 to 31
 346      * @rmtoll EMR         EMx           LL_EXTI_EnableEvent_0_31
 347      * @param  ExtiLine This parameter can be one of the following values:
 348      *         @arg @ref LL_EXTI_LINE_0
 349      *         @arg @ref LL_EXTI_LINE_1
 350      *         @arg @ref LL_EXTI_LINE_2
 351      *         @arg @ref LL_EXTI_LINE_3
 352      *         @arg @ref LL_EXTI_LINE_4
 353      *         @arg @ref LL_EXTI_LINE_5
 354      *         @arg @ref LL_EXTI_LINE_6
 355      *         @arg @ref LL_EXTI_LINE_7
 356      *         @arg @ref LL_EXTI_LINE_8
 357      *         @arg @ref LL_EXTI_LINE_9
 358      *         @arg @ref LL_EXTI_LINE_10
 359      *         @arg @ref LL_EXTI_LINE_11
 360      *         @arg @ref LL_EXTI_LINE_12
 361      *         @arg @ref LL_EXTI_LINE_13
 362      *         @arg @ref LL_EXTI_LINE_14
 363      *         @arg @ref LL_EXTI_LINE_15
 364      *         @arg @ref LL_EXTI_LINE_16
 365      *         @arg @ref LL_EXTI_LINE_17
 366      *         @arg @ref LL_EXTI_LINE_18
 367      *         @arg @ref LL_EXTI_LINE_19
 368      *         @arg @ref LL_EXTI_LINE_ALL_0_31
 369      * @note   Please check each device line mapping for EXTI Line availability
 370      * @retval None
 371      */
 372     __STATIC_INLINE void LL_EXTI_EnableEvent_0_31(uint32_t ExtiLine)
 373     {
 374         SET_BIT(EXTI->EMR, ExtiLine);
 375 
 376     }
 377 
 378     /**
 379      * @brief  Disable ExtiLine Event request for Lines in range 0 to 31
 380      * @rmtoll EMR         EMx           LL_EXTI_DisableEvent_0_31
 381      * @param  ExtiLine This parameter can be one of the following values:
 382      *         @arg @ref LL_EXTI_LINE_0
 383      *         @arg @ref LL_EXTI_LINE_1
 384      *         @arg @ref LL_EXTI_LINE_2
 385      *         @arg @ref LL_EXTI_LINE_3
 386      *         @arg @ref LL_EXTI_LINE_4
 387      *         @arg @ref LL_EXTI_LINE_5
 388      *         @arg @ref LL_EXTI_LINE_6
 389      *         @arg @ref LL_EXTI_LINE_7
 390      *         @arg @ref LL_EXTI_LINE_8
 391      *         @arg @ref LL_EXTI_LINE_9
 392      *         @arg @ref LL_EXTI_LINE_10
 393      *         @arg @ref LL_EXTI_LINE_11
 394      *         @arg @ref LL_EXTI_LINE_12
 395      *         @arg @ref LL_EXTI_LINE_13
 396      *         @arg @ref LL_EXTI_LINE_14
 397      *         @arg @ref LL_EXTI_LINE_15
 398      *         @arg @ref LL_EXTI_LINE_16
 399      *         @arg @ref LL_EXTI_LINE_17
 400      *         @arg @ref LL_EXTI_LINE_18
 401      *         @arg @ref LL_EXTI_LINE_19
 402      *         @arg @ref LL_EXTI_LINE_ALL_0_31
 403      * @note   Please check each device line mapping for EXTI Line availability
 404      * @retval None
 405      */
 406     __STATIC_INLINE void LL_EXTI_DisableEvent_0_31(uint32_t ExtiLine)
 407     {
 408         CLEAR_BIT(EXTI->EMR, ExtiLine);
 409     }
 410 
 411     /**
 412      * @brief  Indicate if ExtiLine Event request is enabled for Lines in range 0 to 31
 413      * @rmtoll EMR         EMx           LL_EXTI_IsEnabledEvent_0_31
 414      * @param  ExtiLine This parameter can be one of the following values:
 415      *         @arg @ref LL_EXTI_LINE_0
 416      *         @arg @ref LL_EXTI_LINE_1
 417      *         @arg @ref LL_EXTI_LINE_2
 418      *         @arg @ref LL_EXTI_LINE_3
 419      *         @arg @ref LL_EXTI_LINE_4
 420      *         @arg @ref LL_EXTI_LINE_5
 421      *         @arg @ref LL_EXTI_LINE_6
 422      *         @arg @ref LL_EXTI_LINE_7
 423      *         @arg @ref LL_EXTI_LINE_8
 424      *         @arg @ref LL_EXTI_LINE_9
 425      *         @arg @ref LL_EXTI_LINE_10
 426      *         @arg @ref LL_EXTI_LINE_11
 427      *         @arg @ref LL_EXTI_LINE_12
 428      *         @arg @ref LL_EXTI_LINE_13
 429      *         @arg @ref LL_EXTI_LINE_14
 430      *         @arg @ref LL_EXTI_LINE_15
 431      *         @arg @ref LL_EXTI_LINE_16
 432      *         @arg @ref LL_EXTI_LINE_17
 433      *         @arg @ref LL_EXTI_LINE_18
 434      *         @arg @ref LL_EXTI_LINE_19
 435      *         @arg @ref LL_EXTI_LINE_ALL_0_31
 436      * @note   Please check each device line mapping for EXTI Line availability
 437      * @retval State of bit (1 or 0).
 438      */
 439     __STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine)
 440     {
 441         return (READ_BIT(EXTI->EMR, ExtiLine) == (ExtiLine));
 442 
 443     }
 444 
 445     /**
 446      * @}
 447      */
 448 
 449     /** @defgroup EXTI_LL_EF_Rising_Trigger_Management Rising_Trigger_Management
 450      * @{
 451      */
 452 
 453     /**
 454      * @brief  Enable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
 455      * @note The configurable wakeup lines are edge-triggered. No glitch must be
 456      *       generated on these lines. If a rising edge on a configurable interrupt
 457      *       line occurs during a write operation in the EXTI_RTSR register, the
 458      *       pending bit is not set.
 459      *       Rising and falling edge triggers can be set for
 460      *       the same interrupt line. In this case, both generate a trigger
 461      *       condition.
 462      * @rmtoll RTSR        RTx           LL_EXTI_EnableRisingTrig_0_31
 463      * @param  ExtiLine This parameter can be a combination of the following values:
 464      *         @arg @ref LL_EXTI_LINE_0
 465      *         @arg @ref LL_EXTI_LINE_1
 466      *         @arg @ref LL_EXTI_LINE_2
 467      *         @arg @ref LL_EXTI_LINE_3
 468      *         @arg @ref LL_EXTI_LINE_4
 469      *         @arg @ref LL_EXTI_LINE_5
 470      *         @arg @ref LL_EXTI_LINE_6
 471      *         @arg @ref LL_EXTI_LINE_7
 472      *         @arg @ref LL_EXTI_LINE_8
 473      *         @arg @ref LL_EXTI_LINE_9
 474      *         @arg @ref LL_EXTI_LINE_10
 475      *         @arg @ref LL_EXTI_LINE_11
 476      *         @arg @ref LL_EXTI_LINE_12
 477      *         @arg @ref LL_EXTI_LINE_13
 478      *         @arg @ref LL_EXTI_LINE_14
 479      *         @arg @ref LL_EXTI_LINE_15
 480      *         @arg @ref LL_EXTI_LINE_16
 481      *         @arg @ref LL_EXTI_LINE_18
 482      *         @arg @ref LL_EXTI_LINE_19
 483      * @note   Please check each device line mapping for EXTI Line availability
 484      * @retval None
 485      */
 486     __STATIC_INLINE void LL_EXTI_EnableRisingTrig_0_31(uint32_t ExtiLine)
 487     {
 488         SET_BIT(EXTI->RTSR, ExtiLine);
 489 
 490     }
 491 
 492     /**
 493      * @brief  Disable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
 494      * @note The configurable wakeup lines are edge-triggered. No glitch must be
 495      *       generated on these lines. If a rising edge on a configurable interrupt
 496      *       line occurs during a write operation in the EXTI_RTSR register, the
 497      *       pending bit is not set.
 498      *       Rising and falling edge triggers can be set for
 499      *       the same interrupt line. In this case, both generate a trigger
 500      *       condition.
 501      * @rmtoll RTSR        RTx           LL_EXTI_DisableRisingTrig_0_31
 502      * @param  ExtiLine This parameter can be a combination of the following values:
 503      *         @arg @ref LL_EXTI_LINE_0
 504      *         @arg @ref LL_EXTI_LINE_1
 505      *         @arg @ref LL_EXTI_LINE_2
 506      *         @arg @ref LL_EXTI_LINE_3
 507      *         @arg @ref LL_EXTI_LINE_4
 508      *         @arg @ref LL_EXTI_LINE_5
 509      *         @arg @ref LL_EXTI_LINE_6
 510      *         @arg @ref LL_EXTI_LINE_7
 511      *         @arg @ref LL_EXTI_LINE_8
 512      *         @arg @ref LL_EXTI_LINE_9
 513      *         @arg @ref LL_EXTI_LINE_10
 514      *         @arg @ref LL_EXTI_LINE_11
 515      *         @arg @ref LL_EXTI_LINE_12
 516      *         @arg @ref LL_EXTI_LINE_13
 517      *         @arg @ref LL_EXTI_LINE_14
 518      *         @arg @ref LL_EXTI_LINE_15
 519      *         @arg @ref LL_EXTI_LINE_16
 520      *         @arg @ref LL_EXTI_LINE_18
 521      *         @arg @ref LL_EXTI_LINE_19
 522      * @note   Please check each device line mapping for EXTI Line availability
 523      * @retval None
 524      */
 525     __STATIC_INLINE void LL_EXTI_DisableRisingTrig_0_31(uint32_t ExtiLine)
 526     {
 527         CLEAR_BIT(EXTI->RTSR, ExtiLine);
 528 
 529     }
 530 
 531     /**
 532      * @brief  Check if rising edge trigger is enabled for Lines in range 0 to 31
 533      * @rmtoll RTSR        RTx           LL_EXTI_IsEnabledRisingTrig_0_31
 534      * @param  ExtiLine This parameter can be a combination of the following values:
 535      *         @arg @ref LL_EXTI_LINE_0
 536      *         @arg @ref LL_EXTI_LINE_1
 537      *         @arg @ref LL_EXTI_LINE_2
 538      *         @arg @ref LL_EXTI_LINE_3
 539      *         @arg @ref LL_EXTI_LINE_4
 540      *         @arg @ref LL_EXTI_LINE_5
 541      *         @arg @ref LL_EXTI_LINE_6
 542      *         @arg @ref LL_EXTI_LINE_7
 543      *         @arg @ref LL_EXTI_LINE_8
 544      *         @arg @ref LL_EXTI_LINE_9
 545      *         @arg @ref LL_EXTI_LINE_10
 546      *         @arg @ref LL_EXTI_LINE_11
 547      *         @arg @ref LL_EXTI_LINE_12
 548      *         @arg @ref LL_EXTI_LINE_13
 549      *         @arg @ref LL_EXTI_LINE_14
 550      *         @arg @ref LL_EXTI_LINE_15
 551      *         @arg @ref LL_EXTI_LINE_16
 552      *         @arg @ref LL_EXTI_LINE_18
 553      *         @arg @ref LL_EXTI_LINE_19
 554      * @note   Please check each device line mapping for EXTI Line availability
 555      * @retval State of bit (1 or 0).
 556      */
 557     __STATIC_INLINE uint32_t LL_EXTI_IsEnabledRisingTrig_0_31(uint32_t ExtiLine)
 558     {
 559         return (READ_BIT(EXTI->RTSR, ExtiLine) == (ExtiLine));
 560     }
 561 
 562     /**
 563      * @}
 564      */
 565 
 566     /** @defgroup EXTI_LL_EF_Falling_Trigger_Management Falling_Trigger_Management
 567      * @{
 568      */
 569 
 570     /**
 571      * @brief  Enable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
 572      * @note The configurable wakeup lines are edge-triggered. No glitch must be
 573      *       generated on these lines. If a falling edge on a configurable interrupt
 574      *       line occurs during a write operation in the EXTI_FTSR register, the
 575      *       pending bit is not set.
 576      *       Rising and falling edge triggers can be set for
 577      *       the same interrupt line. In this case, both generate a trigger
 578      *       condition.
 579      * @rmtoll FTSR        FTx           LL_EXTI_EnableFallingTrig_0_31
 580      * @param  ExtiLine This parameter can be a combination of the following values:
 581      *         @arg @ref LL_EXTI_LINE_0
 582      *         @arg @ref LL_EXTI_LINE_1
 583      *         @arg @ref LL_EXTI_LINE_2
 584      *         @arg @ref LL_EXTI_LINE_3
 585      *         @arg @ref LL_EXTI_LINE_4
 586      *         @arg @ref LL_EXTI_LINE_5
 587      *         @arg @ref LL_EXTI_LINE_6
 588      *         @arg @ref LL_EXTI_LINE_7
 589      *         @arg @ref LL_EXTI_LINE_8
 590      *         @arg @ref LL_EXTI_LINE_9
 591      *         @arg @ref LL_EXTI_LINE_10
 592      *         @arg @ref LL_EXTI_LINE_11
 593      *         @arg @ref LL_EXTI_LINE_12
 594      *         @arg @ref LL_EXTI_LINE_13
 595      *         @arg @ref LL_EXTI_LINE_14
 596      *         @arg @ref LL_EXTI_LINE_15
 597      *         @arg @ref LL_EXTI_LINE_16
 598      *         @arg @ref LL_EXTI_LINE_18
 599      *         @arg @ref LL_EXTI_LINE_19
 600      * @note   Please check each device line mapping for EXTI Line availability
 601      * @retval None
 602      */
 603     __STATIC_INLINE void LL_EXTI_EnableFallingTrig_0_31(uint32_t ExtiLine)
 604     {
 605         SET_BIT(EXTI->FTSR, ExtiLine);
 606     }
 607 
 608     /**
 609      * @brief  Disable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
 610      * @note The configurable wakeup lines are edge-triggered. No glitch must be
 611      *       generated on these lines. If a Falling edge on a configurable interrupt
 612      *       line occurs during a write operation in the EXTI_FTSR register, the
 613      *       pending bit is not set.
 614      *       Rising and falling edge triggers can be set for the same interrupt line.
 615      *       In this case, both generate a trigger condition.
 616      * @rmtoll FTSR        FTx           LL_EXTI_DisableFallingTrig_0_31
 617      * @param  ExtiLine This parameter can be a combination of the following values:
 618      *         @arg @ref LL_EXTI_LINE_0
 619      *         @arg @ref LL_EXTI_LINE_1
 620      *         @arg @ref LL_EXTI_LINE_2
 621      *         @arg @ref LL_EXTI_LINE_3
 622      *         @arg @ref LL_EXTI_LINE_4
 623      *         @arg @ref LL_EXTI_LINE_5
 624      *         @arg @ref LL_EXTI_LINE_6
 625      *         @arg @ref LL_EXTI_LINE_7
 626      *         @arg @ref LL_EXTI_LINE_8
 627      *         @arg @ref LL_EXTI_LINE_9
 628      *         @arg @ref LL_EXTI_LINE_10
 629      *         @arg @ref LL_EXTI_LINE_11
 630      *         @arg @ref LL_EXTI_LINE_12
 631      *         @arg @ref LL_EXTI_LINE_13
 632      *         @arg @ref LL_EXTI_LINE_14
 633      *         @arg @ref LL_EXTI_LINE_15
 634      *         @arg @ref LL_EXTI_LINE_16
 635      *         @arg @ref LL_EXTI_LINE_18
 636      *         @arg @ref LL_EXTI_LINE_19
 637      * @note   Please check each device line mapping for EXTI Line availability
 638      * @retval None
 639      */
 640     __STATIC_INLINE void LL_EXTI_DisableFallingTrig_0_31(uint32_t ExtiLine)
 641     {
 642         CLEAR_BIT(EXTI->FTSR, ExtiLine);
 643     }
 644 
 645     /**
 646      * @brief  Check if falling edge trigger is enabled for Lines in range 0 to 31
 647      * @rmtoll FTSR        FTx           LL_EXTI_IsEnabledFallingTrig_0_31
 648      * @param  ExtiLine This parameter can be a combination of the following values:
 649      *         @arg @ref LL_EXTI_LINE_0
 650      *         @arg @ref LL_EXTI_LINE_1
 651      *         @arg @ref LL_EXTI_LINE_2
 652      *         @arg @ref LL_EXTI_LINE_3
 653      *         @arg @ref LL_EXTI_LINE_4
 654      *         @arg @ref LL_EXTI_LINE_5
 655      *         @arg @ref LL_EXTI_LINE_6
 656      *         @arg @ref LL_EXTI_LINE_7
 657      *         @arg @ref LL_EXTI_LINE_8
 658      *         @arg @ref LL_EXTI_LINE_9
 659      *         @arg @ref LL_EXTI_LINE_10
 660      *         @arg @ref LL_EXTI_LINE_11
 661      *         @arg @ref LL_EXTI_LINE_12
 662      *         @arg @ref LL_EXTI_LINE_13
 663      *         @arg @ref LL_EXTI_LINE_14
 664      *         @arg @ref LL_EXTI_LINE_15
 665      *         @arg @ref LL_EXTI_LINE_16
 666      *         @arg @ref LL_EXTI_LINE_18
 667      *         @arg @ref LL_EXTI_LINE_19
 668      * @note   Please check each device line mapping for EXTI Line availability
 669      * @retval State of bit (1 or 0).
 670      */
 671     __STATIC_INLINE uint32_t LL_EXTI_IsEnabledFallingTrig_0_31(
 672             uint32_t ExtiLine)
 673     {
 674         return (READ_BIT(EXTI->FTSR, ExtiLine) == (ExtiLine));
 675     }
 676 
 677     /**
 678      * @}
 679      */
 680 
 681     /** @defgroup EXTI_LL_EF_Software_Interrupt_Management Software_Interrupt_Management
 682      * @{
 683      */
 684 
 685     /**
 686      * @brief  Generate a software Interrupt Event for Lines in range 0 to 31
 687      * @note If the interrupt is enabled on this line in the EXTI_IMR, writing a 1 to
 688      *       this bit when it is at '0' sets the corresponding pending bit in EXTI_PR
 689      *       resulting in an interrupt request generation.
 690      *       This bit is cleared by clearing the corresponding bit in the EXTI_PR
 691      *       register (by writing a 1 into the bit)
 692      * @rmtoll SWIER       SWIx          LL_EXTI_GenerateSWI_0_31
 693      * @param  ExtiLine This parameter can be a combination of the following values:
 694      *         @arg @ref LL_EXTI_LINE_0
 695      *         @arg @ref LL_EXTI_LINE_1
 696      *         @arg @ref LL_EXTI_LINE_2
 697      *         @arg @ref LL_EXTI_LINE_3
 698      *         @arg @ref LL_EXTI_LINE_4
 699      *         @arg @ref LL_EXTI_LINE_5
 700      *         @arg @ref LL_EXTI_LINE_6
 701      *         @arg @ref LL_EXTI_LINE_7
 702      *         @arg @ref LL_EXTI_LINE_8
 703      *         @arg @ref LL_EXTI_LINE_9
 704      *         @arg @ref LL_EXTI_LINE_10
 705      *         @arg @ref LL_EXTI_LINE_11
 706      *         @arg @ref LL_EXTI_LINE_12
 707      *         @arg @ref LL_EXTI_LINE_13
 708      *         @arg @ref LL_EXTI_LINE_14
 709      *         @arg @ref LL_EXTI_LINE_15
 710      *         @arg @ref LL_EXTI_LINE_16
 711      *         @arg @ref LL_EXTI_LINE_18
 712      *         @arg @ref LL_EXTI_LINE_19
 713      * @note   Please check each device line mapping for EXTI Line availability
 714      * @retval None
 715      */
 716     __STATIC_INLINE void LL_EXTI_GenerateSWI_0_31(uint32_t ExtiLine)
 717     {
 718         SET_BIT(EXTI->SWIER, ExtiLine);
 719     }
 720 
 721     /**
 722      * @}
 723      */
 724 
 725     /** @defgroup EXTI_LL_EF_Flag_Management Flag_Management
 726      * @{
 727      */
 728 
 729     /**
 730      * @brief  Check if the ExtLine Flag is set or not for Lines in range 0 to 31
 731      * @note This bit is set when the selected edge event arrives on the interrupt
 732      *       line. This bit is cleared by writing a 1 to the bit.
 733      * @rmtoll PR          PIFx           LL_EXTI_IsActiveFlag_0_31
 734      * @param  ExtiLine This parameter can be a combination of the following values:
 735      *         @arg @ref LL_EXTI_LINE_0
 736      *         @arg @ref LL_EXTI_LINE_1
 737      *         @arg @ref LL_EXTI_LINE_2
 738      *         @arg @ref LL_EXTI_LINE_3
 739      *         @arg @ref LL_EXTI_LINE_4
 740      *         @arg @ref LL_EXTI_LINE_5
 741      *         @arg @ref LL_EXTI_LINE_6
 742      *         @arg @ref LL_EXTI_LINE_7
 743      *         @arg @ref LL_EXTI_LINE_8
 744      *         @arg @ref LL_EXTI_LINE_9
 745      *         @arg @ref LL_EXTI_LINE_10
 746      *         @arg @ref LL_EXTI_LINE_11
 747      *         @arg @ref LL_EXTI_LINE_12
 748      *         @arg @ref LL_EXTI_LINE_13
 749      *         @arg @ref LL_EXTI_LINE_14
 750      *         @arg @ref LL_EXTI_LINE_15
 751      *         @arg @ref LL_EXTI_LINE_16
 752      *         @arg @ref LL_EXTI_LINE_18
 753      *         @arg @ref LL_EXTI_LINE_19
 754      * @note   Please check each device line mapping for EXTI Line availability
 755      * @retval State of bit (1 or 0).
 756      */
 757     __STATIC_INLINE uint32_t LL_EXTI_IsActiveFlag_0_31(uint32_t ExtiLine)
 758     {
 759         return (READ_BIT(EXTI->PR, ExtiLine) == (ExtiLine));
 760     }
 761 
 762     /**
 763      * @brief  Read ExtLine Combination Flag for Lines in range 0 to 31
 764      * @note This bit is set when the selected edge event arrives on the interrupt
 765      *       line. This bit is cleared by writing a 1 to the bit.
 766      * @rmtoll PR          PIFx           LL_EXTI_ReadFlag_0_31
 767      * @param  ExtiLine This parameter can be a combination of the following values:
 768      *         @arg @ref LL_EXTI_LINE_0
 769      *         @arg @ref LL_EXTI_LINE_1
 770      *         @arg @ref LL_EXTI_LINE_2
 771      *         @arg @ref LL_EXTI_LINE_3
 772      *         @arg @ref LL_EXTI_LINE_4
 773      *         @arg @ref LL_EXTI_LINE_5
 774      *         @arg @ref LL_EXTI_LINE_6
 775      *         @arg @ref LL_EXTI_LINE_7
 776      *         @arg @ref LL_EXTI_LINE_8
 777      *         @arg @ref LL_EXTI_LINE_9
 778      *         @arg @ref LL_EXTI_LINE_10
 779      *         @arg @ref LL_EXTI_LINE_11
 780      *         @arg @ref LL_EXTI_LINE_12
 781      *         @arg @ref LL_EXTI_LINE_13
 782      *         @arg @ref LL_EXTI_LINE_14
 783      *         @arg @ref LL_EXTI_LINE_15
 784      *         @arg @ref LL_EXTI_LINE_16
 785      *         @arg @ref LL_EXTI_LINE_18
 786      *         @arg @ref LL_EXTI_LINE_19
 787      * @note   Please check each device line mapping for EXTI Line availability
 788      * @retval @note This bit is set when the selected edge event arrives on the interrupt
 789      */
 790     __STATIC_INLINE uint32_t LL_EXTI_ReadFlag_0_31(uint32_t ExtiLine)
 791     {
 792         return (uint32_t) (READ_BIT(EXTI->PR, ExtiLine));
 793     }
 794 
 795     /**
 796      * @brief  Clear ExtLine Flags  for Lines in range 0 to 31
 797      * @note This bit is set when the selected edge event arrives on the interrupt
 798      *       line. This bit is cleared by writing a 1 to the bit.
 799      * @rmtoll PR          PIFx           LL_EXTI_ClearFlag_0_31
 800      * @param  ExtiLine This parameter can be a combination of the following values:
 801      *         @arg @ref LL_EXTI_LINE_0
 802      *         @arg @ref LL_EXTI_LINE_1
 803      *         @arg @ref LL_EXTI_LINE_2
 804      *         @arg @ref LL_EXTI_LINE_3
 805      *         @arg @ref LL_EXTI_LINE_4
 806      *         @arg @ref LL_EXTI_LINE_5
 807      *         @arg @ref LL_EXTI_LINE_6
 808      *         @arg @ref LL_EXTI_LINE_7
 809      *         @arg @ref LL_EXTI_LINE_8
 810      *         @arg @ref LL_EXTI_LINE_9
 811      *         @arg @ref LL_EXTI_LINE_10
 812      *         @arg @ref LL_EXTI_LINE_11
 813      *         @arg @ref LL_EXTI_LINE_12
 814      *         @arg @ref LL_EXTI_LINE_13
 815      *         @arg @ref LL_EXTI_LINE_14
 816      *         @arg @ref LL_EXTI_LINE_15
 817      *         @arg @ref LL_EXTI_LINE_16
 818      *         @arg @ref LL_EXTI_LINE_18
 819      *         @arg @ref LL_EXTI_LINE_19
 820      * @note   Please check each device line mapping for EXTI Line availability
 821      * @retval None
 822      */
 823     __STATIC_INLINE void LL_EXTI_ClearFlag_0_31(uint32_t ExtiLine)
 824     {
 825         WRITE_REG(EXTI->PR, ExtiLine);
 826     }
 827 
 828     /**
 829      * @}
 830      */
 831 
 832 #if defined(USE_FULL_LL_DRIVER)
 833 /** @defgroup EXTI_LL_EF_Init Initialization and de-initialization functions
 834   * @{
 835   */
 836 
 837 uint32_t LL_EXTI_Init(LL_EXTI_InitTypeDef *EXTI_InitStruct);
 838 uint32_t LL_EXTI_DeInit(void);
 839 void LL_EXTI_StructInit(LL_EXTI_InitTypeDef *EXTI_InitStruct);
 840 
 841 
 842 /**
 843   * @}
 844   */
 845 #endif /* USE_FULL_LL_DRIVER */
 846 
 847     /**
 848      * @}
 849      */
 850 
 851     /**
 852      * @}
 853      */
 854 
 855 #endif /* EXTI */
 856 
 857     /**
 858      * @}
 859      */
 860 
 861 #ifdef __cplusplus
 862 }
 863 #endif
 864 
 865 #endif /* STM32F1xx_LL_EXTI_H */
 866