STM32F4xx HAL Driver master
STM32CubeF4 HAL / LL Drivers API Reference
Loading...
Searching...
No Matches
RTC Exported Macros
Collaboration diagram for RTC Exported Macros:

Macros

#define __HAL_RTC_RESET_HANDLE_STATE(__HANDLE__)
 Reset RTC handle state.
#define __HAL_RTC_WRITEPROTECTION_DISABLE(__HANDLE__)
 Disable the write protection for RTC registers.
#define __HAL_RTC_WRITEPROTECTION_ENABLE(__HANDLE__)
 Enable the write protection for RTC registers.
#define __HAL_RTC_IS_CALENDAR_INITIALIZED(__HANDLE__)
 Check whether the RTC Calendar is initialized.
#define __HAL_RTC_ALARMA_ENABLE(__HANDLE__)
 Enable the RTC ALARMA peripheral.
#define __HAL_RTC_ALARMA_DISABLE(__HANDLE__)
 Disable the RTC ALARMA peripheral.
#define __HAL_RTC_ALARMB_ENABLE(__HANDLE__)
 Enable the RTC ALARMB peripheral.
#define __HAL_RTC_ALARMB_DISABLE(__HANDLE__)
 Disable the RTC ALARMB peripheral.
#define __HAL_RTC_ALARM_ENABLE_IT(__HANDLE__, __INTERRUPT__)
 Enable the RTC Alarm interrupt.
#define __HAL_RTC_ALARM_DISABLE_IT(__HANDLE__, __INTERRUPT__)
 Disable the RTC Alarm interrupt.
#define __HAL_RTC_ALARM_GET_IT(__HANDLE__, __INTERRUPT__)
 Check whether the specified RTC Alarm interrupt has occurred or not.
#define __HAL_RTC_ALARM_GET_FLAG(__HANDLE__, __FLAG__)
 Get the selected RTC Alarm's flag status.
#define __HAL_RTC_ALARM_CLEAR_FLAG(__HANDLE__, __FLAG__)
 Clear the RTC Alarm's pending flags.
#define __HAL_RTC_ALARM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)
 Check whether the specified RTC Alarm interrupt has been enabled or not.
#define __HAL_RTC_ALARM_EXTI_ENABLE_IT()
 Enable interrupt on the RTC Alarm associated EXTI line.
#define __HAL_RTC_ALARM_EXTI_DISABLE_IT()
 Disable interrupt on the RTC Alarm associated EXTI line.
#define __HAL_RTC_ALARM_EXTI_ENABLE_EVENT()
 Enable event on the RTC Alarm associated EXTI line.
#define __HAL_RTC_ALARM_EXTI_DISABLE_EVENT()
 Disable event on the RTC Alarm associated EXTI line.
#define __HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE()
 Enable falling edge trigger on the RTC Alarm associated EXTI line.
#define __HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE()
 Disable falling edge trigger on the RTC Alarm associated EXTI line.
#define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE()
 Enable rising edge trigger on the RTC Alarm associated EXTI line.
#define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE()
 Disable rising edge trigger on the RTC Alarm associated EXTI line.
#define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_FALLING_EDGE()
 Enable rising & falling edge trigger on the RTC Alarm associated EXTI line.
#define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_FALLING_EDGE()
 Disable rising & falling edge trigger on the RTC Alarm associated EXTI line.
#define __HAL_RTC_ALARM_EXTI_GET_FLAG()
 Check whether the RTC Alarm associated EXTI line interrupt flag is set or not.
#define __HAL_RTC_ALARM_EXTI_CLEAR_FLAG()
 Clear the RTC Alarm associated EXTI line flag.
#define __HAL_RTC_ALARM_EXTI_GENERATE_SWIT()
 Generate a Software interrupt on RTC Alarm associated EXTI line.

Detailed Description

Macro Definition Documentation

◆ __HAL_RTC_ALARM_CLEAR_FLAG

#define __HAL_RTC_ALARM_CLEAR_FLAG ( __HANDLE__,
__FLAG__ )
Value:
((__HANDLE__)->Instance->ISR) = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))

Clear the RTC Alarm's pending flags.

Parameters
__HANDLE__specifies the RTC handle.
__FLAG__specifies the RTC Alarm flag to be cleared. This parameter can be:
  • RTC_FLAG_ALRAF
  • RTC_FLAG_ALRBF
Return values
None

Definition at line 582 of file stm32f4xx_hal_rtc.h.

Referenced by HAL_InitTick().

◆ __HAL_RTC_ALARM_DISABLE_IT

#define __HAL_RTC_ALARM_DISABLE_IT ( __HANDLE__,
__INTERRUPT__ )
Value:
((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))

Disable the RTC Alarm interrupt.

Parameters
__HANDLE__specifies the RTC handle.
__INTERRUPT__specifies the RTC Alarm 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_ALRB: Alarm B interrupt
Return values
None

Definition at line 547 of file stm32f4xx_hal_rtc.h.

Referenced by HAL_SuspendTick().

◆ __HAL_RTC_ALARM_ENABLE_IT

#define __HAL_RTC_ALARM_ENABLE_IT ( __HANDLE__,
__INTERRUPT__ )
Value:
((__HANDLE__)->Instance->CR |= (__INTERRUPT__))

Enable the RTC Alarm interrupt.

Parameters
__HANDLE__specifies the RTC handle.
__INTERRUPT__specifies the RTC Alarm 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_ALRB: Alarm B interrupt
Return values
None

Definition at line 536 of file stm32f4xx_hal_rtc.h.

Referenced by HAL_InitTick(), and HAL_ResumeTick().

◆ __HAL_RTC_ALARM_EXTI_CLEAR_FLAG

#define __HAL_RTC_ALARM_EXTI_CLEAR_FLAG ( )
Value:
#define RTC_EXTI_LINE_ALARM_EVENT

Clear the RTC Alarm associated EXTI line flag.

Return values
None.

Definition at line 671 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_ALARM_EXTI_DISABLE_EVENT

#define __HAL_RTC_ALARM_EXTI_DISABLE_EVENT ( )
Value:

Disable event on the RTC Alarm associated EXTI line.

Return values
None.

Definition at line 617 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE

#define __HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE ( )
Value:

Disable falling edge trigger on the RTC Alarm associated EXTI line.

Return values
None.

Definition at line 629 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_ALARM_EXTI_DISABLE_IT

#define __HAL_RTC_ALARM_EXTI_DISABLE_IT ( )
Value:

Disable interrupt on the RTC Alarm associated EXTI line.

Return values
None

Definition at line 605 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE

#define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE ( )
Value:

Disable rising edge trigger on the RTC Alarm associated EXTI line.

Return values
None.

Definition at line 641 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_ALARM_EXTI_DISABLE_RISING_FALLING_EDGE

#define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_FALLING_EDGE ( )
Value:
do { \
__HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE(); \
__HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE(); \
} while(0U)

Disable rising & falling edge trigger on the RTC Alarm associated EXTI line.

Return values
None.

Definition at line 656 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_ALARM_EXTI_ENABLE_EVENT

#define __HAL_RTC_ALARM_EXTI_ENABLE_EVENT ( )
Value:

Enable event on the RTC Alarm associated EXTI line.

Return values
None.

Definition at line 611 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE

#define __HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE ( )
Value:

Enable falling edge trigger on the RTC Alarm associated EXTI line.

Return values
None.

Definition at line 623 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_ALARM_EXTI_ENABLE_IT

#define __HAL_RTC_ALARM_EXTI_ENABLE_IT ( )
Value:

Enable interrupt on the RTC Alarm associated EXTI line.

Return values
None

Definition at line 599 of file stm32f4xx_hal_rtc.h.

Referenced by HAL_InitTick().

◆ __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE

#define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE ( )
Value:

Enable rising edge trigger on the RTC Alarm associated EXTI line.

Return values
None.

Definition at line 635 of file stm32f4xx_hal_rtc.h.

Referenced by HAL_InitTick().

◆ __HAL_RTC_ALARM_EXTI_ENABLE_RISING_FALLING_EDGE

#define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_FALLING_EDGE ( )
Value:
do { \
__HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE(); \
__HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE(); \
} while(0U)

Enable rising & falling edge trigger on the RTC Alarm associated EXTI line.

Return values
None.

Definition at line 647 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_ALARM_EXTI_GENERATE_SWIT

#define __HAL_RTC_ALARM_EXTI_GENERATE_SWIT ( )
Value:
(EXTI->SWIER |= RTC_EXTI_LINE_ALARM_EVENT)

Generate a Software interrupt on RTC Alarm associated EXTI line.

Return values
None.

Definition at line 677 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_ALARM_EXTI_GET_FLAG

#define __HAL_RTC_ALARM_EXTI_GET_FLAG ( )
Value:

Check whether the RTC Alarm associated EXTI line interrupt flag is set or not.

Return values
LineStatus.

Definition at line 665 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_ALARM_GET_FLAG

#define __HAL_RTC_ALARM_GET_FLAG ( __HANDLE__,
__FLAG__ )
Value:
(((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != 0U) ? 1U : 0U)

Get the selected RTC Alarm's flag status.

Parameters
__HANDLE__specifies the RTC handle.
__FLAG__specifies the RTC Alarm Flag to check. This parameter can be:
  • RTC_FLAG_ALRAF: Alarm A interrupt flag
  • RTC_FLAG_ALRAWF: Alarm A 'write allowed' flag
  • RTC_FLAG_ALRBF: Alarm B interrupt flag
  • RTC_FLAG_ALRBWF: Alarm B 'write allowed' flag
Return values
None

Definition at line 571 of file stm32f4xx_hal_rtc.h.

Referenced by HAL_InitTick().

◆ __HAL_RTC_ALARM_GET_IT

#define __HAL_RTC_ALARM_GET_IT ( __HANDLE__,
__INTERRUPT__ )
Value:
(((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__) >> 4U)) != 0U) ? 1U : 0U)

Check whether the specified RTC Alarm interrupt has occurred or not.

Parameters
__HANDLE__specifies the RTC handle.
__INTERRUPT__specifies the RTC Alarm interrupt to check. This parameter can be:
  • RTC_IT_ALRA: Alarm A interrupt
  • RTC_IT_ALRB: Alarm B interrupt
Return values
None

Definition at line 558 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_ALARM_GET_IT_SOURCE

#define __HAL_RTC_ALARM_GET_IT_SOURCE ( __HANDLE__,
__INTERRUPT__ )
Value:
(((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != 0U) ? 1U : 0U)

Check whether the specified RTC Alarm interrupt has been enabled or not.

Parameters
__HANDLE__specifies the RTC handle.
__INTERRUPT__specifies the RTC Alarm interrupt sources to check. This parameter can be:
  • RTC_IT_ALRA: Alarm A interrupt
  • RTC_IT_ALRB: Alarm B interrupt
Return values
None

Definition at line 593 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_ALARMA_DISABLE

#define __HAL_RTC_ALARMA_DISABLE ( __HANDLE__)
Value:
((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRAE))

Disable the RTC ALARMA peripheral.

Parameters
__HANDLE__specifies the RTC handle.
Return values
None

Definition at line 511 of file stm32f4xx_hal_rtc.h.

Referenced by HAL_InitTick().

◆ __HAL_RTC_ALARMA_ENABLE

#define __HAL_RTC_ALARMA_ENABLE ( __HANDLE__)
Value:
((__HANDLE__)->Instance->CR |= (RTC_CR_ALRAE))

Enable the RTC ALARMA peripheral.

Parameters
__HANDLE__specifies the RTC handle.
Return values
None

Definition at line 504 of file stm32f4xx_hal_rtc.h.

Referenced by HAL_InitTick().

◆ __HAL_RTC_ALARMB_DISABLE

#define __HAL_RTC_ALARMB_DISABLE ( __HANDLE__)
Value:
((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRBE))

Disable the RTC ALARMB peripheral.

Parameters
__HANDLE__specifies the RTC handle.
Return values
None

Definition at line 525 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_ALARMB_ENABLE

#define __HAL_RTC_ALARMB_ENABLE ( __HANDLE__)
Value:
((__HANDLE__)->Instance->CR |= (RTC_CR_ALRBE))

Enable the RTC ALARMB peripheral.

Parameters
__HANDLE__specifies the RTC handle.
Return values
None

Definition at line 518 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_IS_CALENDAR_INITIALIZED

#define __HAL_RTC_IS_CALENDAR_INITIALIZED ( __HANDLE__)
Value:
(((((__HANDLE__)->Instance->ISR) & (RTC_FLAG_INITS)) == RTC_FLAG_INITS) ? 1U : 0U)
#define RTC_FLAG_INITS

Check whether the RTC Calendar is initialized.

Parameters
__HANDLE__specifies the RTC handle.
Return values
None

Definition at line 497 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_RESET_HANDLE_STATE

#define __HAL_RTC_RESET_HANDLE_STATE ( __HANDLE__)
Value:
((__HANDLE__)->State = HAL_RTC_STATE_RESET)
@ HAL_RTC_STATE_RESET

Reset RTC handle state.

Parameters
__HANDLE__specifies the RTC handle.
Return values
None

Definition at line 470 of file stm32f4xx_hal_rtc.h.

◆ __HAL_RTC_WRITEPROTECTION_DISABLE

#define __HAL_RTC_WRITEPROTECTION_DISABLE ( __HANDLE__)
Value:
do { \
(__HANDLE__)->Instance->WPR = 0xCAU; \
(__HANDLE__)->Instance->WPR = 0x53U; \
} while(0U)

Disable the write protection for RTC registers.

Parameters
__HANDLE__specifies the RTC handle.
Return values
None

Definition at line 478 of file stm32f4xx_hal_rtc.h.

Referenced by HAL_InitTick(), HAL_ResumeTick(), HAL_RTC_AlarmAEventCallback(), and HAL_SuspendTick().

◆ __HAL_RTC_WRITEPROTECTION_ENABLE

#define __HAL_RTC_WRITEPROTECTION_ENABLE ( __HANDLE__)
Value:
do { \
(__HANDLE__)->Instance->WPR = 0xFFU; \
} while(0U)

Enable the write protection for RTC registers.

Parameters
__HANDLE__specifies the RTC handle.
Return values
None

Definition at line 488 of file stm32f4xx_hal_rtc.h.

Referenced by HAL_InitTick(), HAL_ResumeTick(), HAL_RTC_AlarmAEventCallback(), and HAL_SuspendTick().