/*! * @file apm32f0xx_rtc.h * * @brief This file contains all the functions prototypes for the RTC firmware library. * * @version V1.0.2 * * @date 2022-02-21 * * @attention * * Copyright (C) 2020-2022 Geehy Semiconductor * * You may not use this file except in compliance with the * GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE). * * The program is only for reference, which is distributed in the hope * that it will be useful and instructional for customers to develop * their software. Unless required by applicable law or agreed to in * writing, the program is distributed on an "AS IS" BASIS, WITHOUT * ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied. * See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions * and limitations under the License. */ #ifndef __APM32F0XX_RTC_H #define __APM32F0XX_RTC_H #ifdef __cplusplus extern "C" { #endif #include "apm32f0xx.h" /** @addtogroup APM32F0xx_StdPeriphDriver @{ */ /** @addtogroup RTC_Driver RTC Driver @{ */ /** @defgroup RTC_Macros Macros @{ */ /**@} end of group RTC_Macros */ /** @defgroup RTC_Enumerations Enumerations @{ */ /** * @brief RTC Hour Formats */ typedef enum { RTC_HourFormat_24, /*!< 24 hour/day format */ RTC_HourFormat_12 /*!< AM/PM hour format */ } RTC_HOUR_FORMAT_T; /** * @brief RTC Input parameter format */ typedef enum { RTC_FORMAT_BIN, /*!< Format in BIN */ RTC_FORMAT_BCD /*!< Format in BCD */ } RTC_FORMAT_T; /** * @brief RTC_AM_PM */ typedef enum { RTC_H12_AM, /*!< Set RTC time to AM */ RTC_H12_PM /*!< Set RTC time to PM */ } RTC_H12_T; /** * @brief RTC DayLightSaving */ typedef enum { RTC_DLS_SUB1H, /*!< Winter time change */ RTC_DLS_ADD1H /*!< Summer time change */ } RTC_DAYLIGHT_SAVING_T; /** * @brief RTC DayLightSaving */ typedef enum { RTC_SO_RESET = BIT_RESET, /*!< Reset backup value */ RTC_SO_SET = BIT_SET, /*!< Set backup value */ } RTC_STORE_OPERATION_T; /** * @brief RTC Output selection */ typedef enum { RTC_OPSEL_DISABLE = 0x00, /*!< output disable */ RTC_OPSEL_ALARMA = 0x01, /*!< alarma output enable */ RTC_OPSEL_WAKEUP = 0x03, /*!< Only for APM32F072 and APM32F091 devices */ } RTC_OPSEL_T; /** * @brief RTC Output Polarity */ typedef enum { RTC_OPP_HIGH, /*!< output polarity is high */ RTC_OPP_LOW /*!< output polarity is low */ } RTC_OPP_T; /** * @brief RTC Calib Output selection */ typedef enum { RTC_CALIBOUTPUT_512Hz, /*!< calib output is 512Hz */ RTC_CALIBOUTPUT_1Hz /*!< calib output is 1Hz */ } RTC_CALIB_OUTPUT_T; /** * @brief RTC Smooth calib period */ typedef enum { RTC_SCP_16SEC, /*!