1 /*! 2 * @file apm32f0xx_rtc.h 3 * 4 * @brief This file contains all the functions prototypes for the RTC firmware library. 5 * 6 * @version V1.0.2 7 * 8 * @date 2022-02-21 9 * 10 * @attention 11 * 12 * Copyright (C) 2020-2022 Geehy Semiconductor 13 * 14 * You may not use this file except in compliance with the 15 * GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE). 16 * 17 * The program is only for reference, which is distributed in the hope 18 * that it will be useful and instructional for customers to develop 19 * their software. Unless required by applicable law or agreed to in 20 * writing, the program is distributed on an "AS IS" BASIS, WITHOUT 21 * ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied. 22 * See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions 23 * and limitations under the License. 24 */ 25 26 #ifndef __APM32F0XX_RTC_H 27 #define __APM32F0XX_RTC_H 28 29 #ifdef __cplusplus 30 extern "C" { 31 #endif 32 33 #include "apm32f0xx.h" 34 35 /** @addtogroup APM32F0xx_StdPeriphDriver 36 @{ 37 */ 38 39 /** @addtogroup RTC_Driver RTC Driver 40 @{ 41 */ 42 43 /** @defgroup RTC_Macros Macros 44 @{ 45 */ 46 47 /**@} end of group RTC_Macros */ 48 49 /** @defgroup RTC_Enumerations Enumerations 50 @{ 51 */ 52 53 /** 54 * @brief RTC Hour Formats 55 */ 56 typedef enum 57 { 58 RTC_HourFormat_24, /*!< 24 hour/day format */ 59 RTC_HourFormat_12 /*!< AM/PM hour format */ 60 } RTC_HOUR_FORMAT_T; 61 62 /** 63 * @brief RTC Input parameter format 64 */ 65 typedef enum 66 { 67 RTC_FORMAT_BIN, /*!< Format in BIN */ 68 RTC_FORMAT_BCD /*!< Format in BCD */ 69 } RTC_FORMAT_T; 70 71 /** 72 * @brief RTC_AM_PM 73 */ 74 typedef enum 75 { 76 RTC_H12_AM, /*!< Set RTC time to AM */ 77 RTC_H12_PM /*!< Set RTC time to PM */ 78 } RTC_H12_T; 79 80 /** 81 * @brief RTC DayLightSaving 82 */ 83 typedef enum 84 { 85 RTC_DLS_SUB1H, /*!< Winter time change */ 86 RTC_DLS_ADD1H /*!< Summer time change */ 87 } RTC_DAYLIGHT_SAVING_T; 88 89 /** 90 * @brief RTC DayLightSaving 91 */ 92 typedef enum 93 { 94 RTC_SO_RESET = BIT_RESET, /*!< Reset backup value */ 95 RTC_SO_SET = BIT_SET, /*!< Set backup value */ 96 } RTC_STORE_OPERATION_T; 97 98 /** 99 * @brief RTC Output selection 100 */ 101 typedef enum 102 { 103 RTC_OPSEL_DISABLE = 0x00, /*!< output disable */ 104 RTC_OPSEL_ALARMA = 0x01, /*!< alarma output enable */ 105 RTC_OPSEL_WAKEUP = 0x03, /*!< Only for APM32F072 and APM32F091 devices */ 106 } RTC_OPSEL_T; 107 108 /** 109 * @brief RTC Output Polarity 110 */ 111 typedef enum 112 { 113 RTC_OPP_HIGH, /*!< output polarity is high */ 114 RTC_OPP_LOW /*!< output polarity is low */ 115 } RTC_OPP_T; 116 117 /** 118 * @brief RTC Calib Output selection 119 */ 120 typedef enum 121 { 122 RTC_CALIBOUTPUT_512Hz, /*!< calib output is 512Hz */ 123 RTC_CALIBOUTPUT_1Hz /*!< calib output is 1Hz */ 124 } RTC_CALIB_OUTPUT_T; 125 126 /** 127 * @brief RTC Smooth calib period 128 */ 129 typedef enum 130 { 131 RTC_SCP_16SEC, /*!<The smooth calibration periode is 16 */ 132 RTC_SCP_8SEC /*!<The smooth calibration periode is 8 */ 133 } RTC_SCP_T; 134 135 /** 136 * @brief RTC Smooth calib period 137 */ 138 typedef enum 139 { 140 RTC_SCPP_RESET, /*!< Add one RTCCLK puls every 2**11 pulses */ 141 RTC_SCPP_SET /*!< No RTCCLK pulses are added */ 142 } RTC_SCPP_T; 143 144 /** 145 * @brief RTC Time Stamp Edges 146 */ 147 typedef enum 148 { 149 RTC_TIME_STAMPEDGE_RISING, /*!< event occurs on the rising edge */ 150 RTC_TIME_STAMPEDGE_FALLING /*!< event occurs on the falling edge */ 151 } RTC_TIMESTAMP_EDGE_T; 152 153 /** 154 * @brief RTC Tamper Trigger 155 */ 156 typedef enum 157 { 158 RTC_TAMPER_TRIGGER_RISINGEDGE = 0x00, /*!< Rising Edge of the tamper pin causes tamper event */ 159 RTC_TAMPER_TRIGGER_FALLINGEDGE = 0x01, /*!< Falling Edge of the tamper pin causes tamper event */ 160 RTC_TAMPER_TRIGGER_LOWLEVEL = 0x00, /*!< Low Level of the tamper pin causes tamper event */ 161 RTC_TAMPER_TRIGGER_HIGHLEVEL = 0x01 /*!< High Level of the tamper pin causes tamper event */ 162 } RTC_TAMPER_TRIGGER_T; 163 164 /** 165 * @brief RTC Tamper Pins 166 */ 167 typedef enum 168 { 169 RTC_TAMPER_1, /*!< Select Tamper 1 */ 170 RTC_TAMPER_2, /*!< Select Tamper 1 */ 171 RTC_TAMPER_3 /*!< Only for APM32F072 and APM32F091 devices */ 172 } RTC_TAMPER_T; 173 174 /** 175 * @brief Tampers Sampling Frequency 176 */ 177 typedef enum 178 { 179 RTC_TAMPER_FILTER_DISABLE, /*!< Tamper filter is disabled */ 180 RTC_TAMPER_FILTER_2SAMPLE, /*!< Tamper is activated after 2 consecutive samples at the active level */ 181 RTC_TAMPER_FILTER_4SAMPLE, /*!< Tamper is activated after 4 consecutive samples at the active level */ 182 RTC_TAMPER_FILTER_8SAMPLE /*!< Tamper is activated after 8 consecutive samples at the active level */ 183 } RTC_TAMPER_FILTER_T; 184 185 /** 186 * @brief Tampers Sampling Frequency 187 */ 188 typedef enum 189 { 190 RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV32768, /*!< Tampers Sampling Frequency = RTC_CLK / 32768 */ 191 RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV16384, /*!< Tampers Sampling Frequency = RTC_CLK / 16384 */ 192 RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV8192, /*!< Tampers Sampling Frequency = RTC_CLK / 8192 */ 193 RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV4096, /*!< Tampers Sampling Frequency = RTC_CLK / 4096 */ 194 RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV2048, /*!< Tampers Sampling Frequency = RTC_CLK / 2048 */ 195 RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV1024, /*!< Tampers Sampling Frequency = RTC_CLK / 1024 */ 196 RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV512, /*!< Tampers Sampling Frequency = RTC_CLK / 512 */ 197 RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV256 /*!< Tampers Sampling Frequency = RTC_CLK / 256 */ 198 } RTC_TAMPER_SAMPLING_FREQ_T; 199 200 /** 201 * @brief Precharge Duration 202 */ 203 typedef enum 204 { 205 RTC_PRECHARGEDURATION_1RTCCLK, /*!< Duration is 1 RTCCLK cycle */ 206 RTC_PRECHARGEDURATION_2RTCCLK, /*!< Duration is 2 RTCCLK cycle */ 207 RTC_PRECHARGEDURATION_4RTCCLK, /*!< Duration is 4 RTCCLK cycle */ 208 RTC_PRECHARGEDURATION_8RTCCLK /*!< Duration is 8 RTCCLK cycle */ 209 } RTC_PRECHARGE_DURATION_T; 210 211 /** 212 * @brief RTC Add 1 Second Parameter 213 */ 214 typedef enum 215 { 216 RTC_SHIFTADD1S_RESET, /*!< No effect */ 217 RTC_SHIFTADD1S_SET /*!< Add one second to the clock calendar */ 218 } RTC_SHIFT_ADD1S_T; 219 220 /** 221 * @brief 222 */ 223 typedef enum 224 { 225 RTC_OPENDRAIN, /*!< RTC Output is configured in Open Drain mode */ 226 RTC_PUSHPULL /*!< RTC Output is configured in Push Pull mode */ 227 } RTC_OUTPUT_T; 228 229 /** 230 * @brief RTC AlarmDateWeekDay 231 */ 232 typedef enum 233 { 234 RTC_WEEKDAY_SEL_DATE, /*!< Select DAYU to represent the date */ 235 RTC_WEEKDAY_SEL_WEEKDAY /*!< Select DAYU to represent the weekday */ 236 } RTC_WEEKDAY_SEL_T; 237 238 /** 239 * @brief RTC Interrupts Soure 240 */ 241 typedef enum 242 { 243 RTC_INT_ALR = 0x00001000, /*!< ALRMA A interrupt mask */ 244 RTC_INT_WT = 0x00004000, /*!< WakeUp Timer interrupt mask (It's only for APM32F091 devices) */ 245 RTC_INT_TS = 0x00008000, /*!< Time Stamp interrupt mask */ 246 RTC_INT_TAMP = 0x00000004, /*!< Tamper event interrupt mask */ 247 } RTC_INT_T; 248 249 /** 250 * @brief RTC Interrupts Flag 251 */ 252 typedef enum 253 { 254 RTC_INT_FLAG_ALR = 0x00001000, /*!< ALRMA interrupt */ 255 RTC_INT_FLAG_WT = 0x00004000, /*!< WakeUp Timer (It's only for APM32F072 and APM32F091 devices) */ 256 RTC_INT_FLAG_TS = 0x00008000, /*!< Time Stamp interrupt mask */ 257 RTC_INT_FLAG_TAMP1 = 0x00020004, /*!< Tamper1 event interrupt mask */ 258 RTC_INT_FLAG_TAMP2 = 0x00040004, /*!< Tamper2 event interrupt mask */ 259 RTC_INT_FLAG_TAMP3 = 0x00080004, /*!< Tamper3 event interrupt mask, only for APM32F072 and APM32F091 device */ 260 } RTC_INT_FLAG_T; 261 262 /** 263 * @brief RTC flag 264 */ 265 typedef enum 266 { 267 RTC_FLAG_AWF = BIT0, /*!< Alarm Write Flag */ 268 RTC_FLAG_WTWF = BIT2, /*!< Wakeup Timer Write Flag, Only for APM32F072 and APM32F091 devices */ 269 RTC_FLAG_SOPF = BIT3, /*!< Shift Operation Pending Flag */ 270 RTC_FLAG_ISF = BIT4, /*!< Initialization State Flag */ 271 RTC_FLAG_RSF = BIT5, /*!< Registers Synchronization Flag */ 272 RTC_FLAG_INTF = BIT6, /*!< Register Initialization Flag */ 273 RTC_FLAG_ALRF = BIT8, /*!< Alarm Match Flag */ 274 RTC_FLAG_WTF = BIT10, /*!< Wakeup Timer Flag, only for APM32F072 and APM32F091 devices */ 275 RTC_FLAG_TSF = BIT11, /*!< Time Stamp Flag */ 276 RTC_FLAG_TSOF = BIT12, /*!< Time Stamp Overflow Flag */ 277 RTC_FLAG_TP1F = BIT13, /*!< Tamper 1 event Detection Flag */ 278 RTC_FLAG_TP2F = BIT14, /*!< Tamper 2 event Detection Flag */ 279 RTC_FLAG_TP3F = BIT15, /*!< Tamper 3 event Detection Flag, only for APM32F072 and APM32F091 devices */ 280 RTC_FLAG_RPF = BIT16, /*!< Recalibration Pending Flag */ 281 } RTC_FLAG_T; 282 283 /** 284 * @brief RTC_Backup 285 */ 286 typedef enum 287 { 288 RTC_BAKP_DATA0, /*!< set Backup data0 */ 289 RTC_BAKP_DATA1, /*!< set Backup data1 */ 290 RTC_BAKP_DATA2, /*!< set Backup data2 */ 291 RTC_BAKP_DATA3, /*!< set Backup data3 */ 292 RTC_BAKP_DATA4 /*!< set Backup data4 */ 293 } RTC_BAKP_DATA_T; 294 295 /** 296 * @brief RTC_AlarmMask 297 */ 298 typedef enum 299 { 300 RTC_MASK_NONE = 0x00000000, /*!< No mask */ 301 RTC_MASK_DATEWEEK = (int)0x80000000, /*!< Dateweek mask */ 302 RTC_MASK_HOURS = 0x00800000, /*!< Hours mask */ 303 RTC_MASK_MINUTES = 0x00008000, /*!< Minutes mask */ 304 RTC_MASK_SECONDS = 0x00000080, /*!< Seconds mask */ 305 RTC_MASK_ALL = (int)0x80808080, /*!< ALL mask */ 306 } RTC_MASK_T; 307 308 /** 309 * @brief RTC Wakeup clock select (only APM32F072 and APM32F091 devices) 310 */ 311 typedef enum 312 { 313 RTC_WAKEUP_CLOCK_RTCDIV16 = 0x00, /*!< Wakeup Clock select to RTC/16 */ 314 RTC_WAKEUP_CLOCK_RTCDIV8, /*!< Wakeup Clock select to RTC/8 */ 315 RTC_WAKEUP_CLOCK_RTCDIV4, /*!< Wakeup Clock select to RTC/4 */ 316 RTC_WAKEUP_CLOCK_RTCDIV2, /*!< Wakeup Clock select to RTC/2 */ 317 RTC_WAKEUP_CLOCK_CK_SPRE_16B, /*!< Wakeup Clock select to clk_spre */ 318 RTC_WAKEUP_CLOCK_CK_SPRE_17B, /*!< Wakeup Clock select to clk_spre */ 319 } RTC_WAKEUP_CLOCK_T; 320 321 /**@} end of group RTC_Enumerations*/ 322 323 /** @addtogroup RTC_Macros Macros 324 @{ 325 */ 326 327 /** Macros description */ 328 #define RTC_INITMODE_TIMEOUT ((uint32_t) 0x00004000) 329 #define RTC_SYNCHRO_TIMEOUT ((uint32_t) 0x00008000) 330 #define RTC_RECALPF_TIMEOUT ((uint32_t) 0x00001000) 331 #define RTC_SHPF_TIMEOUT ((uint32_t) 0x00001000) 332 333 #define RTC_CTRL_INT ((uint32_t) 0x0000D000) 334 #define RTC_TAFCFG_INT ((uint32_t) 0x00000004) 335 #define RTC_CTRL_INT ((uint32_t) 0x0000D000) 336 #define RTC_TAFCFG_INT ((uint32_t) 0x00000004) 337 338 #define RTC_MONTH_JANUARY ((uint8_t)0x01) 339 #define RTC_MONTH_FEBRUARY ((uint8_t)0x02) 340 #define RTC_MONTH_MARCH ((uint8_t)0x03) 341 #define RTC_MONTH_APRIL ((uint8_t)0x04) 342 #define RTC_MONTH_MAY ((uint8_t)0x05) 343 #define RTC_MONTH_JUNE ((uint8_t)0x06) 344 #define RTC_MONTH_JULY ((uint8_t)0x07) 345 #define RTC_MONTH_AUGUST ((uint8_t)0x08) 346 #define RTC_MONTH_SEPTEMBER ((uint8_t)0x09) 347 #define RTC_MONTH_OCTOBER ((uint8_t)0x0A) 348 #define RTC_MONTH_NOVEMBER ((uint8_t)0x0B) 349 #define RTC_MONTH_DECEMBER ((uint8_t)0x0C) 350 351 #define RTC_WEEKDAY_MONDAY ((uint8_t)0x01) 352 #define RTC_WEEKDAY_TUESDAY ((uint8_t)0x02) 353 #define RTC_WEEKDAY_WEDNESDAY ((uint8_t)0x03) 354 #define RTC_WEEKDAY_THURSDAY ((uint8_t)0x04) 355 #define RTC_WEEKDAY_FRIDAY ((uint8_t)0x05) 356 #define RTC_WEEKDAY_SATURDAY ((uint8_t)0x06) 357 #define RTC_WEEKDAY_SUNDAY ((uint8_t)0x07) 358 359 /**@} end of group RTC_Macros*/ 360 361 /** @defgroup RTC_Enumerations Enumerations 362 @{ 363 */ 364 365 /**@} end of group RTC_Enumerations */ 366 367 /** @defgroup RTC_Structures Structures 368 @{ 369 */ 370 371 /** 372 * @brief RTC Init structures definition 373 */ 374 typedef struct 375 { 376 RTC_HOUR_FORMAT_T format; /*!< RTC hour formats selection */ 377 uint32_t AsynchPrediv; /*!< Asynchronous prescaler coefficient setting */ 378 uint32_t SynchPrediv; /*!< Synchronous prescaler coefficient setting */ 379 } RTC_Config_T; 380 381 /** 382 * @brief RTC Time structure definition 383 */ 384 typedef struct 385 { 386 uint8_t hours; /*!< Set hours of RTC time */ 387 uint8_t minutes; /*!< Set minutes of RTC time */ 388 uint8_t seconds; /*!< Set seconds of RTC time */ 389 uint8_t H12; /*!< Set RTC time to AM or PM */ 390 } RTC_TIME_T; 391 392 /** 393 * @brief RTC Date structure definition 394 */ 395 typedef struct 396 { 397 uint8_t weekday; /*!< Set weekday of RTC date */ 398 uint8_t month; /*!< Set month of RTC date */ 399 uint8_t date; /*!< Set data of RTC date */ 400 uint8_t year; /*!< Set year of RTC date */ 401 } RTC_DATE_T; 402 403 /** 404 * @brief RTC ALRMA structure definition 405 */ 406 typedef struct 407 { 408 RTC_TIME_T time; /*!< Set RTC time */ 409 uint32_t AlarmMask; /*!< Set alarm mask */ 410 RTC_WEEKDAY_SEL_T AlarmDateWeekDaySel; /*!< Set weekday's DAYU of alarm date */ 411 uint8_t AlarmDateWeekDay; /*!< Set weekday of alarm date */ 412 } RTC_ALARM_T; 413 414 /**@} end of group RTC_Structures*/ 415 416 /** @defgroup RTC_Variables Variables 417 @{ 418 */ 419 420 /**@} end of group RTC_Variables */ 421 422 /** @defgroup RTC_Fuctions Fuctions 423 @{ 424 */ 425 426 /** Initialization and Configuration functions */ 427 uint8_t RTC_Reset(void); 428 429 uint8_t RTC_Config(RTC_Config_T* Struct); 430 void RTC_ConfigStructInit(RTC_Config_T* Struct); 431 void RTC_EnableWriteProtection(void); 432 void RTC_DisableWriteProtection(void); 433 434 uint8_t RTC_EnableInit(void); 435 void RTC_DisableInit(void); 436 437 uint8_t RTC_WaitForSynchro(void); 438 uint8_t RTC_EnableRefClock(void); 439 uint8_t RTC_DisableRefClock(void); 440 void RTC_EnableBypassShadow(void); 441 void RTC_DisableBypassShadow(void); 442 443 /** Time and Date configuration functions */ 444 uint8_t RTC_ConfigTime(RTC_FORMAT_T format, RTC_TIME_T* timeStruct); 445 void RTC_ConfigTimeStructInit(RTC_TIME_T* timeStruct); 446 void RTC_ReadTime(RTC_FORMAT_T format, RTC_TIME_T* timeStruct); 447 uint32_t RTC_ReadSubSecond(void); 448 uint8_t RTC_ConfigDate(RTC_FORMAT_T format, RTC_DATE_T* dateStruct); 449 void RTC_ConfigDateStructInit(RTC_DATE_T* dateStruct); 450 void RTC_ReadDate(RTC_FORMAT_T format, RTC_DATE_T* dateStruct); 451 452 /** Alarms (ALRMA A) configuration functions */ 453 void RTC_ConfigAlarm(RTC_FORMAT_T format, RTC_ALARM_T* alarmStruct); 454 void RTC_ConfigAlarmStructInit(RTC_ALARM_T* alarmStruct); 455 void RTC_ReadAlarm(RTC_FORMAT_T format, RTC_ALARM_T* alarmStruct); 456 void RTC_EnableAlarm(void); 457 uint8_t RTC_DisableAlarm(void); 458 void RTC_ConfigAlarmSubSecond(uint32_t val, uint8_t mask); 459 uint32_t RTC_ReadAlarmSubSecond(void); 460 461 /** WakeUp Timer configuration functions */ 462 void RTC_ConfigWakeUpClock(RTC_WAKEUP_CLOCK_T wakeUpClock); //!< Only for APM32F072 and APM32F091 devices 463 void RTC_SetWakeUpValue(uint32_t wakeUpValue); //!< Only for APM32F072 and APM32F091 devices 464 uint32_t RTC_ReadWakeUpValue(void); //!< Only for APM32F072 and APM32F091 devices 465 void RTC_EnableWakeUp(void); //!< Only for APM32F072 and APM32F091 devices 466 uint8_t RTC_DisableWakeUp(void); //!< Only for APM32F072 and APM32F091 devices 467 468 /** Daylight Saving configuration functions */ 469 void RTC_ConfigDayLightSaving(RTC_DAYLIGHT_SAVING_T sav, RTC_STORE_OPERATION_T bit); 470 uint32_t RTC_ReadStoreOperation(void); 471 472 /** Output pin Configuration function */ 473 void RTC_ConfigOutput(RTC_OPSEL_T opsel, RTC_OPP_T opp); 474 475 /** Digital Calibration configuration functions */ 476 void RTC_EnableCalibOutput(void); 477 void RTC_DisableCalibOutput(void); 478 void RTC_ConfigCalibOutput(RTC_CALIB_OUTPUT_T calib); 479 uint8_t RTC_ConfigSmoothCalib(RTC_SCP_T period, RTC_SCPP_T bit, uint32_t value); 480 481 /** TimeStamp configuration functions */ 482 void RTC_EnableTimeStamp(RTC_TIMESTAMP_EDGE_T edge); 483 void RTC_DisableTimeStamp(RTC_TIMESTAMP_EDGE_T edge); 484 void RTC_ReadTimeDate(RTC_FORMAT_T format, RTC_TIME_T* timeStruct, 485 RTC_DATE_T* dateStruct); 486 uint32_t RTC_ReadTimeStampSubSecond(void); 487 488 /** Tampers configuration functions */ 489 void RTC_ConfigTamperTrigger(RTC_TAMPER_T tamper, RTC_TAMPER_TRIGGER_T trigger); 490 void RTC_EnableTamper(RTC_TAMPER_T tamper); 491 void RTC_DisableTamper(RTC_TAMPER_T tamper); 492 void RTC_ConfigFilter(RTC_TAMPER_FILTER_T filter); 493 void RTC_ConfigSamplingFreq(RTC_TAMPER_SAMPLING_FREQ_T freq); 494 void RTC_PinsPrechargeDuration(RTC_PRECHARGE_DURATION_T duration); 495 void RTC_EnableTDE(void); 496 void RTC_DisableTDE(void); 497 void RTC_EnablePullUp(void); 498 void RTC_DisablePullUp(void); 499 500 /** Backup Data Registers configuration functions */ 501 void RTC_WriteBackup(RTC_BAKP_DATA_T backup, uint32_t data); 502 uint32_t RTC_ReadBackup(RTC_BAKP_DATA_T backup); 503 504 /** Output Type Config configuration functions */ 505 void RTC_ConfigOutputType(RTC_OUTPUT_T output); 506 507 /** RTC Shift control synchonisation functions */ 508 uint8_t RTC_ConfigSynchroShift(RTC_SHIFT_ADD1S_T add1S, uint32_t subFS); 509 510 /** Interrupts and flags management functions */ 511 void RTC_EnableInterrupt(uint32_t interrupt); 512 void RTC_DisableInterrupt(uint32_t interrupt); 513 uint8_t RTC_ReadStatusFlag(RTC_FLAG_T flag); 514 void RTC_ClearStatusFlag(uint32_t flag); 515 uint8_t RTC_ReadIntFlag(RTC_INT_FLAG_T flag); 516 void RTC_ClearIntFlag(uint32_t flag); 517 518 #ifdef __cplusplus 519 } 520 #endif 521 522 #endif /* __APM32F0XX_RTC_H */ 523 524 /**@} end of group RTC_Functions */ 525 /**@} end of group RTC_Driver */ 526 /**@} end of group APM32F0xx_StdPeriphDriver */ 527