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 RTC_ClearFlag (RTC_Flag_TypeDef RTC_FLAG)
 Clears the RTC's pending flags.
void RTC_ClearITPendingBit (RTC_IT_TypeDef RTC_IT)
 Clears the RTC's interrupt pending bits.
FlagStatus RTC_GetFlagStatus (RTC_Flag_TypeDef RTC_FLAG)
 Checks whether the specified RTC flag is set or not.
ITStatus RTC_GetITStatus (RTC_IT_TypeDef RTC_IT)
 Checks whether the specified RTC interrupt has occurred or not.
void RTC_ITConfig (RTC_IT_TypeDef RTC_IT, FunctionalState NewState)
 Enables or Disables the specified RTC interrupts.

Detailed Description

Interrupts and flags management functions.

 ===============================================================================
                       Interrupts and flags management functions
 ===============================================================================  
 
 To enable the RTC Alarm interrupt, the following sequence is required:
   - Configure the RTC to generate RTC alarm (Alarm A) using the RTC_SetAlarm() 
     and RTC_AlarmCmd() functions.

 To enable the RTC Wakeup interrupt, the following sequence is required:
   - Configure the RTC to generate the RTC wakeup timer event using the 
     RTC_WakeUpClockConfig(), RTC_SetWakeUpCounter() and RTC_WakeUpCmd() functions.

 To enable the RTC Tamper interrupt, the following sequence is required:
   - Configure the RTC to detect the RTC tamper event using the 
     RTC_TamperTriggerConfig() and RTC_TamperCmd() functions.




Function Documentation

void RTC_ClearFlag ( RTC_Flag_TypeDef  RTC_FLAG)

Clears the RTC's pending flags.

Parameters:
RTC_FLAG,:specifies the RTC flag to clear. This parameter can be any combination of the RTC_Flag_TypeDef enumeration.
Return values:
None

Definition at line 2116 of file stm8l15x_rtc.c.

References IS_RTC_CLEAR_FLAG, RTC, and RTC_ISR1_INIT.

void RTC_ClearITPendingBit ( RTC_IT_TypeDef  RTC_IT)

Clears the RTC's interrupt pending bits.

Parameters:
RTC_IT,:specifies the RTC interrupt pending bit to clear. This parameter can be any combination of the RTC_IT_TypeDef enumeration.
Return values:
None

Definition at line 2166 of file stm8l15x_rtc.c.

References IS_RTC_CLEAR_IT, and RTC.

FlagStatus RTC_GetFlagStatus ( RTC_Flag_TypeDef  RTC_FLAG)

Checks whether the specified RTC flag is set or not.

Parameters:
RTC_FLAG,:specifies the flag to check. This parameter can be one of the RTC_Flag_TypeDef enumeration.
Return values:
Statusof RTC_FLAG (SET or RESET)

Definition at line 2084 of file stm8l15x_rtc.c.

References IS_RTC_GET_FLAG, RESET, RTC, and SET.

ITStatus RTC_GetITStatus ( RTC_IT_TypeDef  RTC_IT)

Checks whether the specified RTC interrupt has occurred or not.

Parameters:
RTC_IT,:specifies the RTC interrupt source to check. This parameter can be one of the RTC_IT_TypeDef enumeration.
Return values:
Statusof RTC_IT (SET or RESET).

Definition at line 2132 of file stm8l15x_rtc.c.

References IS_RTC_GET_IT, RESET, RTC, and SET.

void RTC_ITConfig ( RTC_IT_TypeDef  RTC_IT,
FunctionalState  NewState 
)

Enables or Disables the specified RTC interrupts.

Parameters:
RTC_IT,:specifies the RTC interrupt sources to be enabled or disabled. This parameter can be any combination of the following values:
  • RTC_IT_ALRA: Alarm A interrupt
  • RTC_IT_TAMP: Tampers interrupt
  • RTC_IT_WUT: WakeUp Timer interrupt
NewState,:new state of the specified RTC interrupts. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 2052 of file stm8l15x_rtc.c.

References DISABLE, IS_FUNCTIONAL_STATE, IS_RTC_CONFIG_IT, RTC, and RTC_TCR1_TAMPIE.

STM8S Firmware Library: Overview

 

 

 

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