STM8L15x Standard Peripherals Drivers: EXTI

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

EXTI driver modules. More...

Modules

 EXTI_Private_Functions
 EXTI_Exported_Types
 EXTI_Exported_Macros

Functions

void EXTI_ClearITPendingBit (EXTI_IT_TypeDef EXTI_IT)
 Clears the specified interrupt pending bit.
void EXTI_DeInit (void)
 Deinitializes the EXTI registers to their default reset value.
ITStatus EXTI_GetITStatus (EXTI_IT_TypeDef EXTI_IT)
 Gets the external interrupt status.
EXTI_Trigger_TypeDef EXTI_GetPinSensitivity (EXTI_Pin_TypeDef EXTI_Pin)
 Gets the external interrupt sensitivity of the selected pin.
EXTI_Trigger_TypeDef EXTI_GetPortSensitivity (EXTI_Port_TypeDef EXTI_Port)
 Gets the external interrupt sensitivity of the selected port.
void EXTI_SelectPort (EXTI_Port_TypeDef EXTI_Port)
 Selects the port interrupt selection.
void EXTI_SetHalfPortSelection (EXTI_HalfPort_TypeDef EXTI_HalfPort, FunctionalState NewState)
 Configures the half port interrupt selection.
void EXTI_SetPinSensitivity (EXTI_Pin_TypeDef EXTI_Pin, EXTI_Trigger_TypeDef EXTI_Trigger)
 Sets the external interrupt sensitivity of the selected pin.
void EXTI_SetPortSensitivity (EXTI_Port_TypeDef EXTI_Port, EXTI_Trigger_TypeDef EXTI_Trigger)
 Sets the external interrupt sensitivity of the selected port.

Detailed Description

EXTI driver modules.


Function Documentation

void EXTI_ClearITPendingBit ( EXTI_IT_TypeDef  EXTI_IT)

Clears the specified interrupt pending bit.

Parameters:
EXTI_IT: Specifies the interrupt to clear This parameter can be one of the following values:
  • EXTI_IT_Pin0: GPIO Pin 0
  • EXTI_IT_Pin1: GPIO Pin 1
  • EXTI_IT_Pin2: GPIO Pin 2
  • EXTI_IT_Pin3: GPIO Pin 3
  • EXTI_IT_Pin4: GPIO Pin 4
  • EXTI_IT_Pin5: GPIO Pin 5
  • EXTI_IT_Pin6: GPIO Pin 6
  • EXTI_IT_Pin7: GPIO Pin 7
  • EXTI_IT_PortB: GPIO Port B
  • EXTI_IT_PortD: GPIO Port D
  • EXTI_IT_PortE: GPIO Port E
  • EXTI_IT_PortF: GPIO Port F
  • EXTI_IT_PortG: GPIO Port G
  • EXTI_IT_PortH: GPIO Port H
Return values:
None

Definition at line 518 of file stm8l15x_exti.c.

References EXTI, and IS_EXTI_ITPENDINGBIT.

void EXTI_DeInit ( void  )

Deinitializes the EXTI registers to their default reset value.

Parameters:
None
Return values:
None

Definition at line 117 of file stm8l15x_exti.c.

References EXTI, EXTI_CONF1_RESET_VALUE, EXTI_CONF2_RESET_VALUE, EXTI_CR1_RESET_VALUE, EXTI_CR2_RESET_VALUE, EXTI_CR3_RESET_VALUE, and EXTI_CR4_RESET_VALUE.

ITStatus EXTI_GetITStatus ( EXTI_IT_TypeDef  EXTI_IT)

Gets the external interrupt status.

Parameters:
EXTI_IT: Specifies the interrupt to read. This parameter can be one of the following values:
  • EXTI_IT_Pin0: GPIO Pin 0
  • EXTI_IT_Pin1: GPIO Pin 1
  • EXTI_IT_Pin2: GPIO Pin 2
  • EXTI_IT_Pin3: GPIO Pin 3
  • EXTI_IT_Pin4: GPIO Pin 4
  • EXTI_IT_Pin5: GPIO Pin 5
  • EXTI_IT_Pin6: GPIO Pin 6
  • EXTI_IT_Pin7: GPIO Pin 7
  • EXTI_IT_PortB: GPIO Port B
  • EXTI_IT_PortD: GPIO Port D
  • EXTI_IT_PortE: GPIO Port E
  • EXTI_IT_PortF: GPIO Port F
  • EXTI_IT_PortG: GPIO Port G
  • EXTI_IT_PortH: GPIO Port H
Return values:
Thestatus of the specified interrupt. This parameter can be a SET or RESET

Definition at line 481 of file stm8l15x_exti.c.

References EXTI, IS_EXTI_ITPENDINGBIT, and RESET.

EXTI_Trigger_TypeDef EXTI_GetPinSensitivity ( EXTI_Pin_TypeDef  EXTI_Pin)

Gets the external interrupt sensitivity of the selected pin.

Parameters:
EXTI_Pin: The pin number to access. This parameter can be one of the following values:
  • EXTI_Pin_0: GPIO Pin 0
  • EXTI_Pin_1: GPIO Pin 1
  • EXTI_Pin_2: GPIO Pin 2
  • EXTI_Pin_3: GPIO Pin 3
  • EXTI_Pin_4: GPIO Pin 4
  • EXTI_Pin_5: GPIO Pin 5
  • EXTI_Pin_6: GPIO Pin 6
  • EXTI_Pin_7: GPIO Pin 7
Return values:
Theexternal interrupt sensitivity of the selected port.

Definition at line 370 of file stm8l15x_exti.c.

References EXTI, EXTI_CR1_P0IS, EXTI_CR1_P1IS, EXTI_CR1_P2IS, EXTI_CR1_P3IS, EXTI_CR2_P4IS, EXTI_CR2_P5IS, EXTI_CR2_P6IS, EXTI_CR2_P7IS, EXTI_Pin_0, EXTI_Pin_1, EXTI_Pin_2, EXTI_Pin_3, EXTI_Pin_4, EXTI_Pin_5, EXTI_Pin_6, EXTI_Pin_7, and IS_EXTI_PINNUM.

EXTI_Trigger_TypeDef EXTI_GetPortSensitivity ( EXTI_Port_TypeDef  EXTI_Port)

Gets the external interrupt sensitivity of the selected port.

Parameters:
EXTI_Port: The port number to access. This parameter can be one of the following values:
  • EXTI_Port_B: GPIO Port B
  • EXTI_Port_D: GPIO Port D
  • EXTI_Port_E: GPIO Port E
  • EXTI_Port_F: GPIO Port F
  • EXTI_Port_G: GPIO Port G
  • EXTI_Port_H: GPIO Port H
Return values:
Theexternal interrupt sensitivity of the selected port.

Definition at line 421 of file stm8l15x_exti.c.

References EXTI, and IS_EXTI_PORT.

void EXTI_SelectPort ( EXTI_Port_TypeDef  EXTI_Port)

Selects the port interrupt selection.

Parameters:
EXTI_Port: The port number to access. This parameter can be one of the following values:
  • EXTI_Port_B: GPIO Port B
  • EXTI_Port_D: GPIO Port D
  • EXTI_Port_E: GPIO Port E
  • EXTI_Port_F: GPIO Port F
  • EXTI_Port_G: GPIO Port G
  • EXTI_Port_H: GPIO Port H
Return values:
None

Definition at line 213 of file stm8l15x_exti.c.

References EXTI, EXTI_CONF1_PFES, EXTI_CONF2_PGBS, EXTI_CONF2_PHDS, EXTI_Port_B, EXTI_Port_D, EXTI_Port_E, EXTI_Port_F, EXTI_Port_G, and IS_EXTI_PORT.

void EXTI_SetHalfPortSelection ( EXTI_HalfPort_TypeDef  EXTI_HalfPort,
FunctionalState  NewState 
)

Configures the half port interrupt selection.

Note:
This function should be called once the port sensitivity configured, otherwise it will not have any effect on the port external interrupt.
This function should be called after EXTI_SelectPort() function which selects the port to be used otherwise ports are selected by default
Parameters:
EXTI_HalfPort: The port part to access (MSB or LSB). This parameter can be one of the following values:
  • EXTI_HalfPort_B_LSB: Interrupt selector PB(3:0)
  • EXTI_HalfPort_B_MSB: Interrupt selector PB(7:4)
  • EXTI_HalfPort_D_LSB: Interrupt selector PD(3:0)
  • EXTI_HalfPort_D_MSB: Interrupt selector PD(7:4)
  • EXTI_HalfPort_E_LSB: Interrupt selector PE(3:0)
  • EXTI_HalfPort_E_MSB: Interrupt selector PE(7:4)
  • EXTI_HalfPort_F_LSB: Interrupt selector PF(3:0)
  • EXTI_HalfPort_F_MSB: Interrupt selector PF(7:4)
  • EXTI_HalfPort_G_LSB: Interrupt selector PG(3:0)
  • EXTI_HalfPort_G_MSB: Interrupt selector PG(7:4)
  • EXTI_HalfPort_H_LSB: Interrupt selector PH(3:0)
  • EXTI_HalfPort_H_MSB: Interrupt selector PH(7:4)
NewState: The external interrupt new state. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 274 of file stm8l15x_exti.c.

References DISABLE, EXTI, IS_EXTI_HALFPORT, and IS_FUNCTIONAL_STATE.

void EXTI_SetPinSensitivity ( EXTI_Pin_TypeDef  EXTI_Pin,
EXTI_Trigger_TypeDef  EXTI_Trigger 
)

Sets the external interrupt sensitivity of the selected pin.

Note:
Global interrupts must be disabled before calling this function.
The modification of external interrupt sensitivity is only possible when he interrupts are disabled.
The normal behavior is to disable the interrupts before calling this function, and re-enable them after.
Parameters:
EXTI_Pin: The pin to configure. This parameter can be one of the following values:
  • EXTI_Pin_0: GPIO Pin 0
  • EXTI_Pin_1: GPIO Pin 1
  • EXTI_Pin_2: GPIO Pin 2
  • EXTI_Pin_3: GPIO Pin 3
  • EXTI_Pin_4: GPIO Pin 4
  • EXTI_Pin_5: GPIO Pin 5
  • EXTI_Pin_6: GPIO Pin 6
  • EXTI_Pin_7: GPIO Pin 7
EXTI_Trigger: The external interrupt sensitivity value to set. This parameter can be one of the following values:
  • EXTI_Trigger_Falling_Low: Interrupt on Falling edge and Low level
  • EXTI_Trigger_Rising: Interrupt on Rising edge only
  • EXTI_Trigger_Falling: Interrupt on Falling edge only
  • EXTI_Trigger_Rising_Falling: Interrupt on Rising and Falling edges
Return values:
None

Definition at line 154 of file stm8l15x_exti.c.

References EXTI, EXTI_CR1_P0IS, EXTI_CR1_P1IS, EXTI_CR1_P2IS, EXTI_CR1_P3IS, EXTI_CR2_P4IS, EXTI_CR2_P5IS, EXTI_CR2_P6IS, EXTI_CR2_P7IS, EXTI_Pin_0, EXTI_Pin_1, EXTI_Pin_2, EXTI_Pin_3, EXTI_Pin_4, EXTI_Pin_5, EXTI_Pin_6, EXTI_Pin_7, IS_EXTI_PINNUM, and IS_EXTI_TRIGGER.

void EXTI_SetPortSensitivity ( EXTI_Port_TypeDef  EXTI_Port,
EXTI_Trigger_TypeDef  EXTI_Trigger 
)

Sets the external interrupt sensitivity of the selected port.

Note:
Global interrupts must be disabled before calling this function.
The modification of external interrupt sensitivity is only possible when the interrupts are disabled.
The normal behavior is to disable the interrupts before calling this function, and re-enable them after.
Parameters:
EXTI_Port: The port number to access. This parameter can be one of the following values:
  • EXTI_Port_B: GPIO Port B
  • EXTI_Port_D: GPIO Port D
  • EXTI_Port_E: GPIO Port E
  • EXTI_Port_F: GPIO Port F
  • EXTI_Port_G: GPIO Port G
  • EXTI_Port_H: GPIO Port H
EXTI_Trigger: The external interrupt sensitivity value to set. This parameter can be one of the following values:
  • EXTI_Trigger_Falling_Low: Interrupt on Falling edge and Low level
  • EXTI_Trigger_Rising: Interrupt on Rising edge only
  • EXTI_Trigger_Falling: Interrupt on Falling edge only
  • EXTI_Trigger_Rising_Falling: Interrupt on Rising and Falling edges
Return values:
None

Definition at line 332 of file stm8l15x_exti.c.

References EXTI, IS_EXTI_PORT, and IS_EXTI_TRIGGER.

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com