STM8L15x Standard Peripherals Drivers: Interrupts and flags management functions

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

Interrupts and flags management functions

Interrupts and flags management functions. More...

Functions

void COMP_ClearFlag (COMP_Selection_TypeDef COMP_Selection)
 Clears the comparator�s pending flag.
void COMP_ClearITPendingBit (COMP_Selection_TypeDef COMP_Selection)
 Clears the interrupt pending bits of the comparator.
FlagStatus COMP_GetFlagStatus (COMP_Selection_TypeDef COMP_Selection)
 Checks whether the comparator flag is set or not.
ITStatus COMP_GetITStatus (COMP_Selection_TypeDef COMP_Selection)
 Checks whether the comparator interrupt has occurred or not.
void COMP_ITConfig (COMP_Selection_TypeDef COMP_Selection, FunctionalState NewState)
 Enables or disables the interrupt generation when an event is detected.

Detailed Description

Interrupts and flags management functions.

 ===============================================================================
                   Interrupts and flags management functions
 ===============================================================================


Function Documentation

void COMP_ClearFlag ( COMP_Selection_TypeDef  COMP_Selection)

Clears the comparator�s pending flag.

Parameters:
COMP_Selection: selects the comparator This parameter can be one of the following values:
  • COMP_Selection_COMP1: Selection of Comparator 1
  • COMP_Selection_COMP2: Selection of Comparator 2
Return values:
None.

Definition at line 605 of file stm8l15x_comp.c.

References COMP, COMP_CSR1_EF1, COMP_CSR2_EF2, COMP_Selection_COMP1, and IS_COMP_ALL_PERIPH.

void COMP_ClearITPendingBit ( COMP_Selection_TypeDef  COMP_Selection)

Clears the interrupt pending bits of the comparator.

Parameters:
COMP_Selection: selects the comparator This parameter can be one of the following values:
  • COMP_Selection_COMP1: Selection of Comparator 1
  • COMP_Selection_COMP2: Selection of Comparator 2
Return values:
None

Definition at line 689 of file stm8l15x_comp.c.

References COMP, COMP_CSR1_EF1, COMP_CSR2_EF2, COMP_Selection_COMP1, and IS_COMP_ALL_PERIPH.

FlagStatus COMP_GetFlagStatus ( COMP_Selection_TypeDef  COMP_Selection)

Checks whether the comparator flag is set or not.

Parameters:
COMP_Selection: selects the comparator This parameter can be one of the following values:
  • COMP_Selection_COMP1: Selection of Comparator 1
  • COMP_Selection_COMP2: Selection of Comparator 2
Return values:
Thenew state of COMPx event flag (SET or RESET).

Definition at line 558 of file stm8l15x_comp.c.

References COMP, COMP_CSR1_EF1, COMP_CSR2_EF2, COMP_Selection_COMP1, IS_COMP_ALL_PERIPH, RESET, and SET.

ITStatus COMP_GetITStatus ( COMP_Selection_TypeDef  COMP_Selection)

Checks whether the comparator interrupt has occurred or not.

Parameters:
COMP_Selection: selects the comparator This parameter can be one of the following values:
  • COMP_Selection_COMP1: Selection of Comparator 1
  • COMP_Selection_COMP2: Selection of Comparator 2
Return values:
ITStatus: The state of the COMPx event flag (SET or RESET).

Definition at line 630 of file stm8l15x_comp.c.

References COMP, COMP_CSR1_EF1, COMP_CSR1_IE1, COMP_CSR2_EF2, COMP_CSR2_IE2, COMP_Selection_COMP1, IS_COMP_ALL_PERIPH, RESET, and SET.

void COMP_ITConfig ( COMP_Selection_TypeDef  COMP_Selection,
FunctionalState  NewState 
)

Enables or disables the interrupt generation when an event is detected.

Parameters:
COMP_Selection: selects the comparator This parameter can be one of the following values:
  • COMP_Selection_COMP1: Selection of Comparator 1
  • COMP_Selection_COMP2: Selection of Comparator 2
NewState: new state of the COMPx interrupt. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 515 of file stm8l15x_comp.c.

References COMP, COMP_CSR1_IE1, COMP_CSR2_IE2, COMP_Selection_COMP1, DISABLE, IS_COMP_ALL_PERIPH, and IS_FUNCTIONAL_STATE.

STM8S Firmware Library: Overview

 

 

 

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