MG32F10x Standard Peripherals Firmware Library

函数
RTC_Private_Functions
MG32F10x_StdPeriph_Driver » RTC

## 函数
void | RTC_ITConfig (uint16_t RTC_IT, FunctionalState NewState)
| Enables or disables the specified RTC interrupts. 更多...
void | RTC_EnterConfigMode (void)
| Enters the RTC configuration mode. 更多...
void | RTC_ExitConfigMode (void)
| Exits from the RTC configuration mode. 更多...
uint32_t | RTC_GetCounter (void)
| Gets the RTC counter value. 更多...
void | RTC_SetCounter (uint32_t CounterValue)
| Sets the RTC counter value. 更多...
void | RTC_SetPrescaler (uint32_t PrescalerValue)
| Sets the RTC prescaler value. 更多...
void | RTC_SetAlarm (uint32_t AlarmValue)
| Sets the RTC alarm value. 更多...
uint32_t | RTC_GetDivider (void)
| Gets the RTC divider value. 更多...
void | RTC_WaitForLastTask (void)
| Waits until last write operation on RTC registers has finished. 更多...
void | RTC_WaitForSynchro (void)
| Waits until the RTC registers (RTC_CNT, RTC_ALR and RTC_PRL) are synchronized with RTC APB clock. 更多...
FlagStatus | RTC_GetFlagStatus (uint16_t RTC_FLAG)
| Checks whether the specified RTC flag is set or not. 更多...
void | RTC_ClearFlag (uint16_t RTC_FLAG)
| Clears the RTC's pending flags. 更多...
ITStatus | RTC_GetITStatus (uint16_t RTC_IT)
| Checks whether the specified RTC interrupt has occurred or not. 更多...
void | RTC_ClearITPendingBit (uint16_t RTC_IT)
| Clears the RTC's interrupt pending bits. 更多...

## 详细描述

## 函数说明

## ◆ RTC_ClearFlag()

void RTC_ClearFlag | ( | uint16_t | RTC_FLAG | ) |

Clears the RTC's pending flags.

参数

  RTC_FLAG | specifies the flag to clear. This parameter can be any combination of the following values: RTC_FLAG_RSF: Registers Synchronized flag. This flag is cleared only after an APB reset or an APB Clock stop. RTC_FLAG_OW: Overflow flag RTC_FLAG_ALR: Alarm flag RTC_FLAG_SEC: Second flag

返回值

  None |

## ◆ RTC_ClearITPendingBit()

void RTC_ClearITPendingBit | ( | uint16_t | RTC_IT | ) |

Clears the RTC's interrupt pending bits.

参数

  RTC_IT | specifies the interrupt pending bit to clear. This parameter can be any combination of the following values: RTC_IT_OW: Overflow interrupt RTC_IT_ALR: Alarm interrupt RTC_IT_SEC: Second interrupt

返回值

  None |

## ◆ RTC_EnterConfigMode()

void RTC_EnterConfigMode | ( | void |  | ) |

Enters the RTC configuration mode.

参数

  None |

返回值

  None |

## ◆ RTC_ExitConfigMode()

void RTC_ExitConfigMode | ( | void |  | ) |

Exits from the RTC configuration mode.

参数

  None |

返回值

  None |

## ◆ RTC_GetCounter()

uint32_t RTC_GetCounter | ( | void |  | ) |

Gets the RTC counter value.

参数

  None |

返回值

  RTC | counter value.

## ◆ RTC_GetDivider()

uint32_t RTC_GetDivider | ( | void |  | ) |

Gets the RTC divider value.

参数

  None |

返回值

  RTC | Divider value.

## ◆ RTC_GetFlagStatus()

FlagStatus RTC_GetFlagStatus | ( | uint16_t | RTC_FLAG | ) |

Checks whether the specified RTC flag is set or not.

参数

  RTC_FLAG | specifies the flag to check. This parameter can be one the following values: RTC_FLAG_RTOFF: RTC Operation OFF flag RTC_FLAG_RSF: Registers Synchronized flag RTC_FLAG_OW: Overflow flag RTC_FLAG_ALR: Alarm flag RTC_FLAG_SEC: Second flag

返回值

  The | new state of RTC_FLAG (SET or RESET).

## ◆ RTC_GetITStatus()

ITStatus RTC_GetITStatus | ( | uint16_t | RTC_IT | ) |

Checks whether the specified RTC interrupt has occurred or not.

参数

  RTC_IT | specifies the RTC interrupts sources to check. This parameter can be one of the following values: RTC_IT_OW: Overflow interrupt RTC_IT_ALR: Alarm interrupt RTC_IT_SEC: Second interrupt

返回值

  The | new state of the RTC_IT (SET or RESET).

## ◆ RTC_ITConfig()

void RTC_ITConfig | ( | uint16_t | RTC_IT,
|  | FunctionalState | NewState
| ) |  |

Enables or disables the specified RTC interrupts.

参数

  RTC_IT | specifies the RTC interrupts sources to be enabled or disabled. This parameter can be any combination of the following values: RTC_IT_OW: Overflow interrupt RTC_IT_ALR: Alarm interrupt RTC_IT_SEC: Second interrupt
  NewState | new state of the specified RTC interrupts. This parameter can be: ENABLE or DISABLE.

返回值

  None |

## ◆ RTC_SetAlarm()

void RTC_SetAlarm | ( | uint32_t | AlarmValue | ) |

Sets the RTC alarm value.

参数

  AlarmValue | RTC alarm new value.

返回值

  None |

## ◆ RTC_SetCounter()

void RTC_SetCounter | ( | uint32_t | CounterValue | ) |

Sets the RTC counter value.

参数

  CounterValue | RTC counter new value.

返回值

  None |

## ◆ RTC_SetPrescaler()

void RTC_SetPrescaler | ( | uint32_t | PrescalerValue | ) |

Sets the RTC prescaler value.

参数

  PrescalerValue | RTC prescaler new value.

返回值

  None |

## ◆ RTC_WaitForLastTask()

void RTC_WaitForLastTask | ( | void |  | ) |

Waits until last write operation on RTC registers has finished.

注解
  This function must be called before any write to RTC registers.

参数

  None |

返回值

  None |

## ◆ RTC_WaitForSynchro()

void RTC_WaitForSynchro | ( | void |  | ) |

Waits until the RTC registers (RTC_CNT, RTC_ALR and RTC_PRL) are synchronized with RTC APB clock.

注解
  This function must be called before any read operation after an APB reset or an APB clock stop.

参数

  None |

返回值

  None |