Macros
RTC Private Macros
Peripheral Driver » HAL Driver » RTC » Defines

## Macros
#define | __HAL_RTC_DISABLE(RTCx) MODIFY_REG(RTCx->CFG0, 0xFFFFFFFFU, RTC_CFG0_CFG);
| Disable the specified RTC peripheral. More...
#define | __HAL_RTC_ENABLE(RTCx) WRITE_REG(RTCx->CFG0, RTC_CFG0_CFG | RTC_CFG0_EN);
| Enable the specified RTC peripheral. More...
#define | __HAL_RTC_BUSY_FLAG(RTCx) ((READ_BITS(RTCx->STAT, RTC_STAT_BUSY) == RTC_STAT_BUSY))
| Get the specified RTC peripheral busy flag. More...
#define | __HAL_RTC_CLEAR_FLAG(RTCx, __FLAG__) WRITE_REG(RTCx->INT_STAT, (__FLAG__))
| Clear the specified RTC flag. More...
#define | __HAL_RTC_ENABLE_IT(RTCx, __INTERRUPT__) SET_BITS(RTCx->INT_EN, (__INTERRUPT__))
| Enable the specified RTC interrupts. More...
#define | __HAL_RTC_DISABLE_IT(RTCx, __INTERRUPT__) CLEAR_BITS(RTCx->INT_EN, (__INTERRUPT__))
| Disable the specified RTC interrupts. More...
#define | __HAL_RTC_GET_IT_SOURCE(RTCx, __FLAG__) (READ_BITS(RTCx->INT_STAT, (__FLAG__)) == (__FLAG__))
| Check whether the specified RTC interrupt flag is set or not. More...

## Detailed Description

## Macro Definition Documentation

## ◆ __HAL_RTC_BUSY_FLAG

#define __HAL_RTC_BUSY_FLAG | ( |  | RTCx | ) | ((READ_BITS(RTCx->STAT, RTC_STAT_BUSY) == RTC_STAT_BUSY))

Get the specified RTC peripheral busy flag.

Parameters

  RTCx | RTC instance.

Return values

  The | new state of __BUSY__ (TRUE or FALSE).

Definition at line 139 of file hal_rtc.h.

## ◆ __HAL_RTC_CLEAR_FLAG

#define __HAL_RTC_CLEAR_FLAG | ( |  | RTCx,
|  |  | __FLAG__
| ) |  | WRITE_REG(RTCx->INT_STAT, (__FLAG__))

Clear the specified RTC flag.

Parameters

  RTCx | RTC instance.
  __FLAG__ | Specifies the flag to clear. This parameter can be one of the following values: RTC_FLAG_ALARM Alarm Interrupt event RTC_FLAG_WRAP Wrap Interrupt event RTC_FLAG_TICK Tick Interrupt event

Return values

  None |

Definition at line 150 of file hal_rtc.h.

## ◆ __HAL_RTC_DISABLE

#define __HAL_RTC_DISABLE | ( |  | RTCx | ) | MODIFY_REG(RTCx->CFG0, 0xFFFFFFFFU, RTC_CFG0_CFG);

Disable the specified RTC peripheral.

Parameters

  RTCx | RTC instance.

Return values

  None |

Definition at line 127 of file hal_rtc.h.

## ◆ __HAL_RTC_DISABLE_IT

#define __HAL_RTC_DISABLE_IT | ( |  | RTCx,
|  |  | __INTERRUPT__
| ) |  | CLEAR_BITS(RTCx->INT_EN, (__INTERRUPT__))

Disable the specified RTC interrupts.

Parameters

  RTCx | RTC instance.
  __INTERRUPT__ | Specifies the interrupt source to disable. This parameter can be one of the following values: RTC_IT_ALARM Alarm Interrupt RTC_IT_WRAP Wrap Interrupt RTC_IT_TICK Tick Interrupt

Return values

  None |

Definition at line 172 of file hal_rtc.h.

## ◆ __HAL_RTC_ENABLE

#define __HAL_RTC_ENABLE | ( |  | RTCx | ) | WRITE_REG(RTCx->CFG0, RTC_CFG0_CFG | RTC_CFG0_EN);

Enable the specified RTC peripheral.

Parameters

  RTCx | RTC instance.

Return values

  None |

Definition at line 133 of file hal_rtc.h.

## ◆ __HAL_RTC_ENABLE_IT

#define __HAL_RTC_ENABLE_IT | ( |  | RTCx,
|  |  | __INTERRUPT__
| ) |  | SET_BITS(RTCx->INT_EN, (__INTERRUPT__))

Enable the specified RTC interrupts.

Parameters

  RTCx | RTC instance.
  __INTERRUPT__ | Specifies the interrupt source to enable. This parameter can be one of the following values: RTC_IT_ALARM Alarm Interrupt RTC_IT_WRAP Wrap Interrupt RTC_IT_TICK Tick Interrupt

Return values

  None |

Definition at line 161 of file hal_rtc.h.

## ◆ __HAL_RTC_GET_IT_SOURCE

#define __HAL_RTC_GET_IT_SOURCE | ( |  | RTCx,
|  |  | __FLAG__
| ) |  | (READ_BITS(RTCx->INT_STAT, (__FLAG__)) == (__FLAG__))

Check whether the specified RTC interrupt flag is set or not.

Parameters

  RTCx | RTC instance.
  __FLAG__ | Specifies the interrupt source to check. This parameter can be one of the following values: RTC_FLAG_ALARM Alarm Interrupt event RTC_FLAG_WRAP Wrap Interrupt event RTC_FLAG_TICK Tick Interrupt event

Return values

  The | new state of __IT__ (TRUE or FALSE).

Definition at line 183 of file hal_rtc.h.