MG32L003 Standard Peripherals Firmware Library

宏定义 | 函数
mg32l003_rtc.c 文件参考

This file provides all the RTC firmware functions. 更多...

`#include "mg32l003_rtc.h"`

## 宏定义
#define | RTC_TIME_RESERVED_MASK ((uint32_t)0x073F7F7F)
#define | RTC_DATE_RESERVED_MASK ((uint32_t)0x00FF9F3F)
#define | RTC_WeekDay_RESERVED_MASK ((uint32_t)0x07000000)
#define | RTC_INIT_MASK ((uint32_t)RTC_ISR_WAIT_Msk)
#define | RTC_ISR_INITF ((uint32_t)RTC_ISR_WAITF)
#define | RTC_ISR_INIT ((uint32_t)RTC_ISR_WAIT)
#define | RTC_RSF_MASK ((uint32_t)0xFFFFFFFA)
#define | RTC_FLAGS_MASK
#define | INITMODE_TIMEOUT ((uint32_t)0x00010000)
#define | SYNCHRO_TIMEOUT ((uint32_t)0x00020000)

## 函数
ErrorStatus | RTC_Init (RTC_InitTypeDef *RTC_InitStruct)
| Initializes the RTC registers according to the specified parameters in RTC_InitStruct. 更多...
void | RTC_WriteProtectionCmd (FunctionalState NewState)
| Enables or disables the RTC registers write protection. 更多...
ErrorStatus | RTC_EnterInitMode (void)
| Enters the RTC Initialization mode. 更多...
void | RTC_ExitInitMode (void)
| Exits the RTC Initialization mode. 更多...
ErrorStatus | RTC_WaitForSynchro (void)
| Waits until the RTC Time and Date registers (RTC_TR and RTC_DR) are synchronized with RTC APB clock. 更多...
void | RTC_BypassShadowCmd (FunctionalState NewState)
| Enables or Disables the Bypass Shadow feature. 更多...
ErrorStatus | RTC_SetTime (uint32_t RTC_Format, RTC_TimeTypeDef *RTC_TimeStruct)
| Set the RTC current time. 更多...
void | RTC_TimeStructInit (RTC_TimeTypeDef *RTC_TimeStruct)
| Fills each RTC_TimeStruct member with its default value (Time = 00h:00min:00sec). 更多...
void | RTC_GetTime (uint32_t RTC_Format, RTC_TimeTypeDef *RTC_TimeStruct)
| Get the RTC current Time. 更多...
ErrorStatus | RTC_SetDate (uint32_t RTC_Format, RTC_DateTypeDef *RTC_DateStruct)
| Set the RTC current date. 更多...
void | RTC_DateStructInit (RTC_DateTypeDef *RTC_DateStruct)
| Fills each RTC_DateStruct member with its default value (Monday, January 01 xx00). 更多...
void | RTC_GetDate (uint32_t RTC_Format, RTC_DateTypeDef *RTC_DateStruct)
| Get the RTC current date. 更多...
void | RTC_SetAlarm1 (uint32_t RTC_Format, RTC_AlarmTypeDef *RTC_AlarmStruct)
| Set the specified RTC Alarm1. 更多...
void | RTC_Alarm1StructInit (RTC_AlarmTypeDef *RTC_AlarmStruct)
| Fills each RTC_AlarmStruct member with its default value (Time = 00h:00mn:00sec / Date = 1st day of the month/Mask = all fields are masked). 更多...
void | RTC_GetAlarm1 (uint32_t RTC_Format, RTC_AlarmTypeDef *RTC_AlarmStruct)
| Get the RTC Alarm value and masks. 更多...
void | RTC_Alarm1Cmd (FunctionalState NewState)
| Enables or disables the specified RTC Alarm. 更多...
void | RTC_SetALARM2Period (uint32_t Period)
| Set the specified RTC Alarm2. 更多...
void | RTC_1HZ_Config (FunctionalState NewState)
| Deactive the specified 1HZ out 更多...
void | RTC_CalibConfig (uint32_t RTC_CalibPeriod, uint32_t RTC_CalibMinusPulsesValue)
| Configures the Calibration Settings. 更多...
FlagStatus | RTC_GetFlagStatus (uint32_t RTC_FLAG)
| Checks whether the specified RTC flag is set or not. 更多...
void | RTC_ITConfig (uint32_t RTC_IT, FunctionalState NewState)
| Enables or disables the specified RTC interrupts. 更多...
void | RTC_ClearITPendingBit (uint32_t RTC_IT)
| Clears the RTC's interrupt pending bits. 更多...

## 详细描述

This file provides all the RTC firmware functions.

作者
  megawin Application Team

版本
  V0.0.5

日期
  13-August-2024