STM32L443xx HAL User Manual
Defines | Functions
stm32l4xx_hal_exti.c File Reference

EXTI HAL module driver. This file provides firmware functions to manage the following functionalities of the Extended Interrupts and events controller (EXTI) peripheral: + Initialization and de-initialization functions + IO operation functions. More...

#include "stm32l4xx_hal.h"

Go to the source code of this file.

Defines

#define EXTI_MODE_OFFSET   0x08u /* 0x20: offset between MCU IMR/EMR registers */
#define EXTI_CONFIG_OFFSET   0x08u /* 0x20: offset between MCU Rising/Falling configuration registers */

Functions

HAL_StatusTypeDef HAL_EXTI_SetConfigLine (EXTI_HandleTypeDef *hexti, EXTI_ConfigTypeDef *pExtiConfig)
 Set configuration of a dedicated Exti line.
HAL_StatusTypeDef HAL_EXTI_GetConfigLine (EXTI_HandleTypeDef *hexti, EXTI_ConfigTypeDef *pExtiConfig)
 Get configuration of a dedicated Exti line.
HAL_StatusTypeDef HAL_EXTI_ClearConfigLine (EXTI_HandleTypeDef *hexti)
 Clear whole configuration of a dedicated Exti line.
HAL_StatusTypeDef HAL_EXTI_RegisterCallback (EXTI_HandleTypeDef *hexti, EXTI_CallbackIDTypeDef CallbackID, void(*pPendingCbfn)(void))
 Register callback for a dedicated Exti line.
HAL_StatusTypeDef HAL_EXTI_GetHandle (EXTI_HandleTypeDef *hexti, uint32_t ExtiLine)
 Store line number as handle private field.
void HAL_EXTI_IRQHandler (EXTI_HandleTypeDef *hexti)
 Handle EXTI interrupt request.
uint32_t HAL_EXTI_GetPending (EXTI_HandleTypeDef *hexti, uint32_t Edge)
 Get interrupt pending bit of a dedicated line.
void HAL_EXTI_ClearPending (EXTI_HandleTypeDef *hexti, uint32_t Edge)
 Clear interrupt pending bit of a dedicated line.
void HAL_EXTI_GenerateSWI (EXTI_HandleTypeDef *hexti)
 Generate a software interrupt for a dedicated line.

Detailed Description

EXTI HAL module driver. This file provides firmware functions to manage the following functionalities of the Extended Interrupts and events controller (EXTI) peripheral: + Initialization and de-initialization functions + IO operation functions.

Author:
MCD Application Team
Attention:

Copyright (c) 2018 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

  ==============================================================================
                    ##### EXTI Peripheral features #####
  ==============================================================================
  [..]
    (+) Each Exti line can be configured within this driver.

    (+) Exti line can be configured in 3 different modes
        (++) Interrupt
        (++) Event
        (++) Both of them

    (+) Configurable Exti lines can be configured with 3 different triggers
        (++) Rising
        (++) Falling
        (++) Both of them

    (+) When set in interrupt mode, configurable Exti lines have two different
        interrupts pending registers which allow to distinguish which transition
        occurs:
        (++) Rising edge pending interrupt
        (++) Falling

    (+) Exti lines 0 to 15 are linked to gpio pin number 0 to 15. Gpio port can
        be selected through multiplexer.

                     ##### How to use this driver #####
  ==============================================================================
  [..]

    (#) Configure the EXTI line using HAL_EXTI_SetConfigLine().
        (++) Choose the interrupt line number by setting "Line" member from
             EXTI_ConfigTypeDef structure.
        (++) Configure the interrupt and/or event mode using "Mode" member from
             EXTI_ConfigTypeDef structure.
        (++) For configurable lines, configure rising and/or falling trigger
             "Trigger" member from EXTI_ConfigTypeDef structure.
        (++) For Exti lines linked to gpio, choose gpio port using "GPIOSel"
             member from GPIO_InitTypeDef structure.

    (#) Get current Exti configuration of a dedicated line using
        HAL_EXTI_GetConfigLine().
        (++) Provide exiting handle as parameter.
        (++) Provide pointer on EXTI_ConfigTypeDef structure as second parameter.

    (#) Clear Exti configuration of a dedicated line using HAL_EXTI_GetConfigLine().
        (++) Provide exiting handle as parameter.

    (#) Register callback to treat Exti interrupts using HAL_EXTI_RegisterCallback().
        (++) Provide exiting handle as first parameter.
        (++) Provide which callback will be registered using one value from
             EXTI_CallbackIDTypeDef.
        (++) Provide callback function pointer.

    (#) Get interrupt pending bit using HAL_EXTI_GetPending().

    (#) Clear interrupt pending bit using HAL_EXTI_GetPending().

    (#) Generate software interrupt using HAL_EXTI_GenerateSWI().

  

Definition in file stm32l4xx_hal_exti.c.