stm32f4xx_rtc.h 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881
  1. /**
  2. ******************************************************************************
  3. * @file stm32f4xx_rtc.h
  4. * @author MCD Application Team
  5. * @version V1.5.0
  6. * @date 06-March-2015
  7. * @brief This file contains all the functions prototypes for the RTC firmware
  8. * library.
  9. ******************************************************************************
  10. * @attention
  11. *
  12. * <h2><center>&copy; COPYRIGHT 2015 STMicroelectronics</center></h2>
  13. *
  14. * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  15. * You may not use this file except in compliance with the License.
  16. * You may obtain a copy of the License at:
  17. *
  18. * http://www.st.com/software_license_agreement_liberty_v2
  19. *
  20. * Unless required by applicable law or agreed to in writing, software
  21. * distributed under the License is distributed on an "AS IS" BASIS,
  22. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23. * See the License for the specific language governing permissions and
  24. * limitations under the License.
  25. *
  26. ******************************************************************************
  27. */
  28. /* Define to prevent recursive inclusion -------------------------------------*/
  29. #ifndef __STM32F4xx_RTC_H
  30. #define __STM32F4xx_RTC_H
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. /* Includes ------------------------------------------------------------------*/
  35. #include "stm32f4xx.h"
  36. /** @addtogroup STM32F4xx_StdPeriph_Driver
  37. * @{
  38. */
  39. /** @addtogroup RTC
  40. * @{
  41. */
  42. /* Exported types ------------------------------------------------------------*/
  43. /**
  44. * @brief RTC Init structures definition
  45. */
  46. typedef struct
  47. {
  48. uint32_t RTC_HourFormat; /*!< Specifies the RTC Hour Format.
  49. This parameter can be a value of @ref RTC_Hour_Formats */
  50. uint32_t RTC_AsynchPrediv; /*!< Specifies the RTC Asynchronous Predivider value.
  51. This parameter must be set to a value lower than 0x7F */
  52. uint32_t RTC_SynchPrediv; /*!< Specifies the RTC Synchronous Predivider value.
  53. This parameter must be set to a value lower than 0x7FFF */
  54. }RTC_InitTypeDef;
  55. /**
  56. * @brief RTC Time structure definition
  57. */
  58. typedef struct
  59. {
  60. uint8_t RTC_Hours; /*!< Specifies the RTC Time Hour.
  61. This parameter must be set to a value in the 0-12 range
  62. if the RTC_HourFormat_12 is selected or 0-23 range if
  63. the RTC_HourFormat_24 is selected. */
  64. uint8_t RTC_Minutes; /*!< Specifies the RTC Time Minutes.
  65. This parameter must be set to a value in the 0-59 range. */
  66. uint8_t RTC_Seconds; /*!< Specifies the RTC Time Seconds.
  67. This parameter must be set to a value in the 0-59 range. */
  68. uint8_t RTC_H12; /*!< Specifies the RTC AM/PM Time.
  69. This parameter can be a value of @ref RTC_AM_PM_Definitions */
  70. }RTC_TimeTypeDef;
  71. /**
  72. * @brief RTC Date structure definition
  73. */
  74. typedef struct
  75. {
  76. uint8_t RTC_WeekDay; /*!< Specifies the RTC Date WeekDay.
  77. This parameter can be a value of @ref RTC_WeekDay_Definitions */
  78. uint8_t RTC_Month; /*!< Specifies the RTC Date Month (in BCD format).
  79. This parameter can be a value of @ref RTC_Month_Date_Definitions */
  80. uint8_t RTC_Date; /*!< Specifies the RTC Date.
  81. This parameter must be set to a value in the 1-31 range. */
  82. uint8_t RTC_Year; /*!< Specifies the RTC Date Year.
  83. This parameter must be set to a value in the 0-99 range. */
  84. }RTC_DateTypeDef;
  85. /**
  86. * @brief RTC Alarm structure definition
  87. */
  88. typedef struct
  89. {
  90. RTC_TimeTypeDef RTC_AlarmTime; /*!< Specifies the RTC Alarm Time members. */
  91. uint32_t RTC_AlarmMask; /*!< Specifies the RTC Alarm Masks.
  92. This parameter can be a value of @ref RTC_AlarmMask_Definitions */
  93. uint32_t RTC_AlarmDateWeekDaySel; /*!< Specifies the RTC Alarm is on Date or WeekDay.
  94. This parameter can be a value of @ref RTC_AlarmDateWeekDay_Definitions */
  95. uint8_t RTC_AlarmDateWeekDay; /*!< Specifies the RTC Alarm Date/WeekDay.
  96. If the Alarm Date is selected, this parameter
  97. must be set to a value in the 1-31 range.
  98. If the Alarm WeekDay is selected, this
  99. parameter can be a value of @ref RTC_WeekDay_Definitions */
  100. }RTC_AlarmTypeDef;
  101. /* Exported constants --------------------------------------------------------*/
  102. /** @defgroup RTC_Exported_Constants
  103. * @{
  104. */
  105. /** @defgroup RTC_Hour_Formats
  106. * @{
  107. */
  108. #define RTC_HourFormat_24 ((uint32_t)0x00000000)
  109. #define RTC_HourFormat_12 ((uint32_t)0x00000040)
  110. #define IS_RTC_HOUR_FORMAT(FORMAT) (((FORMAT) == RTC_HourFormat_12) || \
  111. ((FORMAT) == RTC_HourFormat_24))
  112. /**
  113. * @}
  114. */
  115. /** @defgroup RTC_Asynchronous_Predivider
  116. * @{
  117. */
  118. #define IS_RTC_ASYNCH_PREDIV(PREDIV) ((PREDIV) <= 0x7F)
  119. /**
  120. * @}
  121. */
  122. /** @defgroup RTC_Synchronous_Predivider
  123. * @{
  124. */
  125. #define IS_RTC_SYNCH_PREDIV(PREDIV) ((PREDIV) <= 0x7FFF)
  126. /**
  127. * @}
  128. */
  129. /** @defgroup RTC_Time_Definitions
  130. * @{
  131. */
  132. #define IS_RTC_HOUR12(HOUR) (((HOUR) > 0) && ((HOUR) <= 12))
  133. #define IS_RTC_HOUR24(HOUR) ((HOUR) <= 23)
  134. #define IS_RTC_MINUTES(MINUTES) ((MINUTES) <= 59)
  135. #define IS_RTC_SECONDS(SECONDS) ((SECONDS) <= 59)
  136. /**
  137. * @}
  138. */
  139. /** @defgroup RTC_AM_PM_Definitions
  140. * @{
  141. */
  142. #define RTC_H12_AM ((uint8_t)0x00)
  143. #define RTC_H12_PM ((uint8_t)0x40)
  144. #define IS_RTC_H12(PM) (((PM) == RTC_H12_AM) || ((PM) == RTC_H12_PM))
  145. /**
  146. * @}
  147. */
  148. /** @defgroup RTC_Year_Date_Definitions
  149. * @{
  150. */
  151. #define IS_RTC_YEAR(YEAR) ((YEAR) <= 99)
  152. /**
  153. * @}
  154. */
  155. /** @defgroup RTC_Month_Date_Definitions
  156. * @{
  157. */
  158. /* Coded in BCD format */
  159. #define RTC_Month_January ((uint8_t)0x01)
  160. #define RTC_Month_February ((uint8_t)0x02)
  161. #define RTC_Month_March ((uint8_t)0x03)
  162. #define RTC_Month_April ((uint8_t)0x04)
  163. #define RTC_Month_May ((uint8_t)0x05)
  164. #define RTC_Month_June ((uint8_t)0x06)
  165. #define RTC_Month_July ((uint8_t)0x07)
  166. #define RTC_Month_August ((uint8_t)0x08)
  167. #define RTC_Month_September ((uint8_t)0x09)
  168. #define RTC_Month_October ((uint8_t)0x10)
  169. #define RTC_Month_November ((uint8_t)0x11)
  170. #define RTC_Month_December ((uint8_t)0x12)
  171. #define IS_RTC_MONTH(MONTH) (((MONTH) >= 1) && ((MONTH) <= 12))
  172. #define IS_RTC_DATE(DATE) (((DATE) >= 1) && ((DATE) <= 31))
  173. /**
  174. * @}
  175. */
  176. /** @defgroup RTC_WeekDay_Definitions
  177. * @{
  178. */
  179. #define RTC_Weekday_Monday ((uint8_t)0x01)
  180. #define RTC_Weekday_Tuesday ((uint8_t)0x02)
  181. #define RTC_Weekday_Wednesday ((uint8_t)0x03)
  182. #define RTC_Weekday_Thursday ((uint8_t)0x04)
  183. #define RTC_Weekday_Friday ((uint8_t)0x05)
  184. #define RTC_Weekday_Saturday ((uint8_t)0x06)
  185. #define RTC_Weekday_Sunday ((uint8_t)0x07)
  186. #define IS_RTC_WEEKDAY(WEEKDAY) (((WEEKDAY) == RTC_Weekday_Monday) || \
  187. ((WEEKDAY) == RTC_Weekday_Tuesday) || \
  188. ((WEEKDAY) == RTC_Weekday_Wednesday) || \
  189. ((WEEKDAY) == RTC_Weekday_Thursday) || \
  190. ((WEEKDAY) == RTC_Weekday_Friday) || \
  191. ((WEEKDAY) == RTC_Weekday_Saturday) || \
  192. ((WEEKDAY) == RTC_Weekday_Sunday))
  193. /**
  194. * @}
  195. */
  196. /** @defgroup RTC_Alarm_Definitions
  197. * @{
  198. */
  199. #define IS_RTC_ALARM_DATE_WEEKDAY_DATE(DATE) (((DATE) > 0) && ((DATE) <= 31))
  200. #define IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(WEEKDAY) (((WEEKDAY) == RTC_Weekday_Monday) || \
  201. ((WEEKDAY) == RTC_Weekday_Tuesday) || \
  202. ((WEEKDAY) == RTC_Weekday_Wednesday) || \
  203. ((WEEKDAY) == RTC_Weekday_Thursday) || \
  204. ((WEEKDAY) == RTC_Weekday_Friday) || \
  205. ((WEEKDAY) == RTC_Weekday_Saturday) || \
  206. ((WEEKDAY) == RTC_Weekday_Sunday))
  207. /**
  208. * @}
  209. */
  210. /** @defgroup RTC_AlarmDateWeekDay_Definitions
  211. * @{
  212. */
  213. #define RTC_AlarmDateWeekDaySel_Date ((uint32_t)0x00000000)
  214. #define RTC_AlarmDateWeekDaySel_WeekDay ((uint32_t)0x40000000)
  215. #define IS_RTC_ALARM_DATE_WEEKDAY_SEL(SEL) (((SEL) == RTC_AlarmDateWeekDaySel_Date) || \
  216. ((SEL) == RTC_AlarmDateWeekDaySel_WeekDay))
  217. /**
  218. * @}
  219. */
  220. /** @defgroup RTC_AlarmMask_Definitions
  221. * @{
  222. */
  223. #define RTC_AlarmMask_None ((uint32_t)0x00000000)
  224. #define RTC_AlarmMask_DateWeekDay ((uint32_t)0x80000000)
  225. #define RTC_AlarmMask_Hours ((uint32_t)0x00800000)
  226. #define RTC_AlarmMask_Minutes ((uint32_t)0x00008000)
  227. #define RTC_AlarmMask_Seconds ((uint32_t)0x00000080)
  228. #define RTC_AlarmMask_All ((uint32_t)0x80808080)
  229. #define IS_ALARM_MASK(MASK) (((MASK) & 0x7F7F7F7F) == (uint32_t)RESET)
  230. /**
  231. * @}
  232. */
  233. /** @defgroup RTC_Alarms_Definitions
  234. * @{
  235. */
  236. #define RTC_Alarm_A ((uint32_t)0x00000100)
  237. #define RTC_Alarm_B ((uint32_t)0x00000200)
  238. #define IS_RTC_ALARM(ALARM) (((ALARM) == RTC_Alarm_A) || ((ALARM) == RTC_Alarm_B))
  239. #define IS_RTC_CMD_ALARM(ALARM) (((ALARM) & (RTC_Alarm_A | RTC_Alarm_B)) != (uint32_t)RESET)
  240. /**
  241. * @}
  242. */
  243. /** @defgroup RTC_Alarm_Sub_Seconds_Masks_Definitions
  244. * @{
  245. */
  246. #define RTC_AlarmSubSecondMask_All ((uint32_t)0x00000000) /*!< All Alarm SS fields are masked.
  247. There is no comparison on sub seconds
  248. for Alarm */
  249. #define RTC_AlarmSubSecondMask_SS14_1 ((uint32_t)0x01000000) /*!< SS[14:1] are don't care in Alarm
  250. comparison. Only SS[0] is compared. */
  251. #define RTC_AlarmSubSecondMask_SS14_2 ((uint32_t)0x02000000) /*!< SS[14:2] are don't care in Alarm
  252. comparison. Only SS[1:0] are compared */
  253. #define RTC_AlarmSubSecondMask_SS14_3 ((uint32_t)0x03000000) /*!< SS[14:3] are don't care in Alarm
  254. comparison. Only SS[2:0] are compared */
  255. #define RTC_AlarmSubSecondMask_SS14_4 ((uint32_t)0x04000000) /*!< SS[14:4] are don't care in Alarm
  256. comparison. Only SS[3:0] are compared */
  257. #define RTC_AlarmSubSecondMask_SS14_5 ((uint32_t)0x05000000) /*!< SS[14:5] are don't care in Alarm
  258. comparison. Only SS[4:0] are compared */
  259. #define RTC_AlarmSubSecondMask_SS14_6 ((uint32_t)0x06000000) /*!< SS[14:6] are don't care in Alarm
  260. comparison. Only SS[5:0] are compared */
  261. #define RTC_AlarmSubSecondMask_SS14_7 ((uint32_t)0x07000000) /*!< SS[14:7] are don't care in Alarm
  262. comparison. Only SS[6:0] are compared */
  263. #define RTC_AlarmSubSecondMask_SS14_8 ((uint32_t)0x08000000) /*!< SS[14:8] are don't care in Alarm
  264. comparison. Only SS[7:0] are compared */
  265. #define RTC_AlarmSubSecondMask_SS14_9 ((uint32_t)0x09000000) /*!< SS[14:9] are don't care in Alarm
  266. comparison. Only SS[8:0] are compared */
  267. #define RTC_AlarmSubSecondMask_SS14_10 ((uint32_t)0x0A000000) /*!< SS[14:10] are don't care in Alarm
  268. comparison. Only SS[9:0] are compared */
  269. #define RTC_AlarmSubSecondMask_SS14_11 ((uint32_t)0x0B000000) /*!< SS[14:11] are don't care in Alarm
  270. comparison. Only SS[10:0] are compared */
  271. #define RTC_AlarmSubSecondMask_SS14_12 ((uint32_t)0x0C000000) /*!< SS[14:12] are don't care in Alarm
  272. comparison.Only SS[11:0] are compared */
  273. #define RTC_AlarmSubSecondMask_SS14_13 ((uint32_t)0x0D000000) /*!< SS[14:13] are don't care in Alarm
  274. comparison. Only SS[12:0] are compared */
  275. #define RTC_AlarmSubSecondMask_SS14 ((uint32_t)0x0E000000) /*!< SS[14] is don't care in Alarm
  276. comparison.Only SS[13:0] are compared */
  277. #define RTC_AlarmSubSecondMask_None ((uint32_t)0x0F000000) /*!< SS[14:0] are compared and must match
  278. to activate alarm. */
  279. #define IS_RTC_ALARM_SUB_SECOND_MASK(MASK) (((MASK) == RTC_AlarmSubSecondMask_All) || \
  280. ((MASK) == RTC_AlarmSubSecondMask_SS14_1) || \
  281. ((MASK) == RTC_AlarmSubSecondMask_SS14_2) || \
  282. ((MASK) == RTC_AlarmSubSecondMask_SS14_3) || \
  283. ((MASK) == RTC_AlarmSubSecondMask_SS14_4) || \
  284. ((MASK) == RTC_AlarmSubSecondMask_SS14_5) || \
  285. ((MASK) == RTC_AlarmSubSecondMask_SS14_6) || \
  286. ((MASK) == RTC_AlarmSubSecondMask_SS14_7) || \
  287. ((MASK) == RTC_AlarmSubSecondMask_SS14_8) || \
  288. ((MASK) == RTC_AlarmSubSecondMask_SS14_9) || \
  289. ((MASK) == RTC_AlarmSubSecondMask_SS14_10) || \
  290. ((MASK) == RTC_AlarmSubSecondMask_SS14_11) || \
  291. ((MASK) == RTC_AlarmSubSecondMask_SS14_12) || \
  292. ((MASK) == RTC_AlarmSubSecondMask_SS14_13) || \
  293. ((MASK) == RTC_AlarmSubSecondMask_SS14) || \
  294. ((MASK) == RTC_AlarmSubSecondMask_None))
  295. /**
  296. * @}
  297. */
  298. /** @defgroup RTC_Alarm_Sub_Seconds_Value
  299. * @{
  300. */
  301. #define IS_RTC_ALARM_SUB_SECOND_VALUE(VALUE) ((VALUE) <= 0x00007FFF)
  302. /**
  303. * @}
  304. */
  305. /** @defgroup RTC_Wakeup_Timer_Definitions
  306. * @{
  307. */
  308. #define RTC_WakeUpClock_RTCCLK_Div16 ((uint32_t)0x00000000)
  309. #define RTC_WakeUpClock_RTCCLK_Div8 ((uint32_t)0x00000001)
  310. #define RTC_WakeUpClock_RTCCLK_Div4 ((uint32_t)0x00000002)
  311. #define RTC_WakeUpClock_RTCCLK_Div2 ((uint32_t)0x00000003)
  312. #define RTC_WakeUpClock_CK_SPRE_16bits ((uint32_t)0x00000004)
  313. #define RTC_WakeUpClock_CK_SPRE_17bits ((uint32_t)0x00000006)
  314. #define IS_RTC_WAKEUP_CLOCK(CLOCK) (((CLOCK) == RTC_WakeUpClock_RTCCLK_Div16) || \
  315. ((CLOCK) == RTC_WakeUpClock_RTCCLK_Div8) || \
  316. ((CLOCK) == RTC_WakeUpClock_RTCCLK_Div4) || \
  317. ((CLOCK) == RTC_WakeUpClock_RTCCLK_Div2) || \
  318. ((CLOCK) == RTC_WakeUpClock_CK_SPRE_16bits) || \
  319. ((CLOCK) == RTC_WakeUpClock_CK_SPRE_17bits))
  320. #define IS_RTC_WAKEUP_COUNTER(COUNTER) ((COUNTER) <= 0xFFFF)
  321. /**
  322. * @}
  323. */
  324. /** @defgroup RTC_Time_Stamp_Edges_definitions
  325. * @{
  326. */
  327. #define RTC_TimeStampEdge_Rising ((uint32_t)0x00000000)
  328. #define RTC_TimeStampEdge_Falling ((uint32_t)0x00000008)
  329. #define IS_RTC_TIMESTAMP_EDGE(EDGE) (((EDGE) == RTC_TimeStampEdge_Rising) || \
  330. ((EDGE) == RTC_TimeStampEdge_Falling))
  331. /**
  332. * @}
  333. */
  334. /** @defgroup RTC_Output_selection_Definitions
  335. * @{
  336. */
  337. #define RTC_Output_Disable ((uint32_t)0x00000000)
  338. #define RTC_Output_AlarmA ((uint32_t)0x00200000)
  339. #define RTC_Output_AlarmB ((uint32_t)0x00400000)
  340. #define RTC_Output_WakeUp ((uint32_t)0x00600000)
  341. #define IS_RTC_OUTPUT(OUTPUT) (((OUTPUT) == RTC_Output_Disable) || \
  342. ((OUTPUT) == RTC_Output_AlarmA) || \
  343. ((OUTPUT) == RTC_Output_AlarmB) || \
  344. ((OUTPUT) == RTC_Output_WakeUp))
  345. /**
  346. * @}
  347. */
  348. /** @defgroup RTC_Output_Polarity_Definitions
  349. * @{
  350. */
  351. #define RTC_OutputPolarity_High ((uint32_t)0x00000000)
  352. #define RTC_OutputPolarity_Low ((uint32_t)0x00100000)
  353. #define IS_RTC_OUTPUT_POL(POL) (((POL) == RTC_OutputPolarity_High) || \
  354. ((POL) == RTC_OutputPolarity_Low))
  355. /**
  356. * @}
  357. */
  358. /** @defgroup RTC_Digital_Calibration_Definitions
  359. * @{
  360. */
  361. #define RTC_CalibSign_Positive ((uint32_t)0x00000000)
  362. #define RTC_CalibSign_Negative ((uint32_t)0x00000080)
  363. #define IS_RTC_CALIB_SIGN(SIGN) (((SIGN) == RTC_CalibSign_Positive) || \
  364. ((SIGN) == RTC_CalibSign_Negative))
  365. #define IS_RTC_CALIB_VALUE(VALUE) ((VALUE) < 0x20)
  366. /**
  367. * @}
  368. */
  369. /** @defgroup RTC_Calib_Output_selection_Definitions
  370. * @{
  371. */
  372. #define RTC_CalibOutput_512Hz ((uint32_t)0x00000000)
  373. #define RTC_CalibOutput_1Hz ((uint32_t)0x00080000)
  374. #define IS_RTC_CALIB_OUTPUT(OUTPUT) (((OUTPUT) == RTC_CalibOutput_512Hz) || \
  375. ((OUTPUT) == RTC_CalibOutput_1Hz))
  376. /**
  377. * @}
  378. */
  379. /** @defgroup RTC_Smooth_calib_period_Definitions
  380. * @{
  381. */
  382. #define RTC_SmoothCalibPeriod_32sec ((uint32_t)0x00000000) /*!< if RTCCLK = 32768 Hz, Smooth calibation
  383. period is 32s, else 2exp20 RTCCLK seconds */
  384. #define RTC_SmoothCalibPeriod_16sec ((uint32_t)0x00002000) /*!< if RTCCLK = 32768 Hz, Smooth calibration
  385. period is 16s, else 2exp19 RTCCLK seconds */
  386. #define RTC_SmoothCalibPeriod_8sec ((uint32_t)0x00004000) /*!< if RTCCLK = 32768 Hz, Smooth calibation
  387. period is 8s, else 2exp18 RTCCLK seconds */
  388. #define IS_RTC_SMOOTH_CALIB_PERIOD(PERIOD) (((PERIOD) == RTC_SmoothCalibPeriod_32sec) || \
  389. ((PERIOD) == RTC_SmoothCalibPeriod_16sec) || \
  390. ((PERIOD) == RTC_SmoothCalibPeriod_8sec))
  391. /**
  392. * @}
  393. */
  394. /** @defgroup RTC_Smooth_calib_Plus_pulses_Definitions
  395. * @{
  396. */
  397. #define RTC_SmoothCalibPlusPulses_Set ((uint32_t)0x00008000) /*!< The number of RTCCLK pulses added
  398. during a X -second window = Y - CALM[8:0].
  399. with Y = 512, 256, 128 when X = 32, 16, 8 */
  400. #define RTC_SmoothCalibPlusPulses_Reset ((uint32_t)0x00000000) /*!< The number of RTCCLK pulses subbstited
  401. during a 32-second window = CALM[8:0]. */
  402. #define IS_RTC_SMOOTH_CALIB_PLUS(PLUS) (((PLUS) == RTC_SmoothCalibPlusPulses_Set) || \
  403. ((PLUS) == RTC_SmoothCalibPlusPulses_Reset))
  404. /**
  405. * @}
  406. */
  407. /** @defgroup RTC_Smooth_calib_Minus_pulses_Definitions
  408. * @{
  409. */
  410. #define IS_RTC_SMOOTH_CALIB_MINUS(VALUE) ((VALUE) <= 0x000001FF)
  411. /**
  412. * @}
  413. */
  414. /** @defgroup RTC_DayLightSaving_Definitions
  415. * @{
  416. */
  417. #define RTC_DayLightSaving_SUB1H ((uint32_t)0x00020000)
  418. #define RTC_DayLightSaving_ADD1H ((uint32_t)0x00010000)
  419. #define IS_RTC_DAYLIGHT_SAVING(SAVE) (((SAVE) == RTC_DayLightSaving_SUB1H) || \
  420. ((SAVE) == RTC_DayLightSaving_ADD1H))
  421. #define RTC_StoreOperation_Reset ((uint32_t)0x00000000)
  422. #define RTC_StoreOperation_Set ((uint32_t)0x00040000)
  423. #define IS_RTC_STORE_OPERATION(OPERATION) (((OPERATION) == RTC_StoreOperation_Reset) || \
  424. ((OPERATION) == RTC_StoreOperation_Set))
  425. /**
  426. * @}
  427. */
  428. /** @defgroup RTC_Tamper_Trigger_Definitions
  429. * @{
  430. */
  431. #define RTC_TamperTrigger_RisingEdge ((uint32_t)0x00000000)
  432. #define RTC_TamperTrigger_FallingEdge ((uint32_t)0x00000001)
  433. #define RTC_TamperTrigger_LowLevel ((uint32_t)0x00000000)
  434. #define RTC_TamperTrigger_HighLevel ((uint32_t)0x00000001)
  435. #define IS_RTC_TAMPER_TRIGGER(TRIGGER) (((TRIGGER) == RTC_TamperTrigger_RisingEdge) || \
  436. ((TRIGGER) == RTC_TamperTrigger_FallingEdge) || \
  437. ((TRIGGER) == RTC_TamperTrigger_LowLevel) || \
  438. ((TRIGGER) == RTC_TamperTrigger_HighLevel))
  439. /**
  440. * @}
  441. */
  442. /** @defgroup RTC_Tamper_Filter_Definitions
  443. * @{
  444. */
  445. #define RTC_TamperFilter_Disable ((uint32_t)0x00000000) /*!< Tamper filter is disabled */
  446. #define RTC_TamperFilter_2Sample ((uint32_t)0x00000800) /*!< Tamper is activated after 2
  447. consecutive samples at the active level */
  448. #define RTC_TamperFilter_4Sample ((uint32_t)0x00001000) /*!< Tamper is activated after 4
  449. consecutive samples at the active level */
  450. #define RTC_TamperFilter_8Sample ((uint32_t)0x00001800) /*!< Tamper is activated after 8
  451. consecutive samples at the active level. */
  452. #define IS_RTC_TAMPER_FILTER(FILTER) (((FILTER) == RTC_TamperFilter_Disable) || \
  453. ((FILTER) == RTC_TamperFilter_2Sample) || \
  454. ((FILTER) == RTC_TamperFilter_4Sample) || \
  455. ((FILTER) == RTC_TamperFilter_8Sample))
  456. /**
  457. * @}
  458. */
  459. /** @defgroup RTC_Tamper_Sampling_Frequencies_Definitions
  460. * @{
  461. */
  462. #define RTC_TamperSamplingFreq_RTCCLK_Div32768 ((uint32_t)0x00000000) /*!< Each of the tamper inputs are sampled
  463. with a frequency = RTCCLK / 32768 */
  464. #define RTC_TamperSamplingFreq_RTCCLK_Div16384 ((uint32_t)0x000000100) /*!< Each of the tamper inputs are sampled
  465. with a frequency = RTCCLK / 16384 */
  466. #define RTC_TamperSamplingFreq_RTCCLK_Div8192 ((uint32_t)0x00000200) /*!< Each of the tamper inputs are sampled
  467. with a frequency = RTCCLK / 8192 */
  468. #define RTC_TamperSamplingFreq_RTCCLK_Div4096 ((uint32_t)0x00000300) /*!< Each of the tamper inputs are sampled
  469. with a frequency = RTCCLK / 4096 */
  470. #define RTC_TamperSamplingFreq_RTCCLK_Div2048 ((uint32_t)0x00000400) /*!< Each of the tamper inputs are sampled
  471. with a frequency = RTCCLK / 2048 */
  472. #define RTC_TamperSamplingFreq_RTCCLK_Div1024 ((uint32_t)0x00000500) /*!< Each of the tamper inputs are sampled
  473. with a frequency = RTCCLK / 1024 */
  474. #define RTC_TamperSamplingFreq_RTCCLK_Div512 ((uint32_t)0x00000600) /*!< Each of the tamper inputs are sampled
  475. with a frequency = RTCCLK / 512 */
  476. #define RTC_TamperSamplingFreq_RTCCLK_Div256 ((uint32_t)0x00000700) /*!< Each of the tamper inputs are sampled
  477. with a frequency = RTCCLK / 256 */
  478. #define IS_RTC_TAMPER_SAMPLING_FREQ(FREQ) (((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div32768) || \
  479. ((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div16384) || \
  480. ((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div8192) || \
  481. ((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div4096) || \
  482. ((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div2048) || \
  483. ((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div1024) || \
  484. ((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div512) || \
  485. ((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div256))
  486. /**
  487. * @}
  488. */
  489. /** @defgroup RTC_Tamper_Pin_Precharge_Duration_Definitions
  490. * @{
  491. */
  492. #define RTC_TamperPrechargeDuration_1RTCCLK ((uint32_t)0x00000000) /*!< Tamper pins are pre-charged before
  493. sampling during 1 RTCCLK cycle */
  494. #define RTC_TamperPrechargeDuration_2RTCCLK ((uint32_t)0x00002000) /*!< Tamper pins are pre-charged before
  495. sampling during 2 RTCCLK cycles */
  496. #define RTC_TamperPrechargeDuration_4RTCCLK ((uint32_t)0x00004000) /*!< Tamper pins are pre-charged before
  497. sampling during 4 RTCCLK cycles */
  498. #define RTC_TamperPrechargeDuration_8RTCCLK ((uint32_t)0x00006000) /*!< Tamper pins are pre-charged before
  499. sampling during 8 RTCCLK cycles */
  500. #define IS_RTC_TAMPER_PRECHARGE_DURATION(DURATION) (((DURATION) == RTC_TamperPrechargeDuration_1RTCCLK) || \
  501. ((DURATION) == RTC_TamperPrechargeDuration_2RTCCLK) || \
  502. ((DURATION) == RTC_TamperPrechargeDuration_4RTCCLK) || \
  503. ((DURATION) == RTC_TamperPrechargeDuration_8RTCCLK))
  504. /**
  505. * @}
  506. */
  507. /** @defgroup RTC_Tamper_Pins_Definitions
  508. * @{
  509. */
  510. #define RTC_Tamper_1 RTC_TAFCR_TAMP1E
  511. #define IS_RTC_TAMPER(TAMPER) (((TAMPER) == RTC_Tamper_1))
  512. /**
  513. * @}
  514. */
  515. /** @defgroup RTC_Tamper_Pin_Selection
  516. * @{
  517. */
  518. #define RTC_TamperPin_PC13 ((uint32_t)0x00000000)
  519. #define RTC_TamperPin_PI8 ((uint32_t)0x00010000)
  520. #define IS_RTC_TAMPER_PIN(PIN) (((PIN) == RTC_TamperPin_PC13) || \
  521. ((PIN) == RTC_TamperPin_PI8))
  522. /**
  523. * @}
  524. */
  525. /** @defgroup RTC_TimeStamp_Pin_Selection
  526. * @{
  527. */
  528. #define RTC_TimeStampPin_PC13 ((uint32_t)0x00000000)
  529. #define RTC_TimeStampPin_PI8 ((uint32_t)0x00020000)
  530. #define IS_RTC_TIMESTAMP_PIN(PIN) (((PIN) == RTC_TimeStampPin_PC13) || \
  531. ((PIN) == RTC_TimeStampPin_PI8))
  532. /**
  533. * @}
  534. */
  535. /** @defgroup RTC_Output_Type_ALARM_OUT
  536. * @{
  537. */
  538. #define RTC_OutputType_OpenDrain ((uint32_t)0x00000000)
  539. #define RTC_OutputType_PushPull ((uint32_t)0x00040000)
  540. #define IS_RTC_OUTPUT_TYPE(TYPE) (((TYPE) == RTC_OutputType_OpenDrain) || \
  541. ((TYPE) == RTC_OutputType_PushPull))
  542. /**
  543. * @}
  544. */
  545. /** @defgroup RTC_Add_1_Second_Parameter_Definitions
  546. * @{
  547. */
  548. #define RTC_ShiftAdd1S_Reset ((uint32_t)0x00000000)
  549. #define RTC_ShiftAdd1S_Set ((uint32_t)0x80000000)
  550. #define IS_RTC_SHIFT_ADD1S(SEL) (((SEL) == RTC_ShiftAdd1S_Reset) || \
  551. ((SEL) == RTC_ShiftAdd1S_Set))
  552. /**
  553. * @}
  554. */
  555. /** @defgroup RTC_Substract_Fraction_Of_Second_Value
  556. * @{
  557. */
  558. #define IS_RTC_SHIFT_SUBFS(FS) ((FS) <= 0x00007FFF)
  559. /**
  560. * @}
  561. */
  562. /** @defgroup RTC_Backup_Registers_Definitions
  563. * @{
  564. */
  565. #define RTC_BKP_DR0 ((uint32_t)0x00000000)
  566. #define RTC_BKP_DR1 ((uint32_t)0x00000001)
  567. #define RTC_BKP_DR2 ((uint32_t)0x00000002)
  568. #define RTC_BKP_DR3 ((uint32_t)0x00000003)
  569. #define RTC_BKP_DR4 ((uint32_t)0x00000004)
  570. #define RTC_BKP_DR5 ((uint32_t)0x00000005)
  571. #define RTC_BKP_DR6 ((uint32_t)0x00000006)
  572. #define RTC_BKP_DR7 ((uint32_t)0x00000007)
  573. #define RTC_BKP_DR8 ((uint32_t)0x00000008)
  574. #define RTC_BKP_DR9 ((uint32_t)0x00000009)
  575. #define RTC_BKP_DR10 ((uint32_t)0x0000000A)
  576. #define RTC_BKP_DR11 ((uint32_t)0x0000000B)
  577. #define RTC_BKP_DR12 ((uint32_t)0x0000000C)
  578. #define RTC_BKP_DR13 ((uint32_t)0x0000000D)
  579. #define RTC_BKP_DR14 ((uint32_t)0x0000000E)
  580. #define RTC_BKP_DR15 ((uint32_t)0x0000000F)
  581. #define RTC_BKP_DR16 ((uint32_t)0x00000010)
  582. #define RTC_BKP_DR17 ((uint32_t)0x00000011)
  583. #define RTC_BKP_DR18 ((uint32_t)0x00000012)
  584. #define RTC_BKP_DR19 ((uint32_t)0x00000013)
  585. #define IS_RTC_BKP(BKP) (((BKP) == RTC_BKP_DR0) || \
  586. ((BKP) == RTC_BKP_DR1) || \
  587. ((BKP) == RTC_BKP_DR2) || \
  588. ((BKP) == RTC_BKP_DR3) || \
  589. ((BKP) == RTC_BKP_DR4) || \
  590. ((BKP) == RTC_BKP_DR5) || \
  591. ((BKP) == RTC_BKP_DR6) || \
  592. ((BKP) == RTC_BKP_DR7) || \
  593. ((BKP) == RTC_BKP_DR8) || \
  594. ((BKP) == RTC_BKP_DR9) || \
  595. ((BKP) == RTC_BKP_DR10) || \
  596. ((BKP) == RTC_BKP_DR11) || \
  597. ((BKP) == RTC_BKP_DR12) || \
  598. ((BKP) == RTC_BKP_DR13) || \
  599. ((BKP) == RTC_BKP_DR14) || \
  600. ((BKP) == RTC_BKP_DR15) || \
  601. ((BKP) == RTC_BKP_DR16) || \
  602. ((BKP) == RTC_BKP_DR17) || \
  603. ((BKP) == RTC_BKP_DR18) || \
  604. ((BKP) == RTC_BKP_DR19))
  605. /**
  606. * @}
  607. */
  608. /** @defgroup RTC_Input_parameter_format_definitions
  609. * @{
  610. */
  611. #define RTC_Format_BIN ((uint32_t)0x000000000)
  612. #define RTC_Format_BCD ((uint32_t)0x000000001)
  613. #define IS_RTC_FORMAT(FORMAT) (((FORMAT) == RTC_Format_BIN) || ((FORMAT) == RTC_Format_BCD))
  614. /**
  615. * @}
  616. */
  617. /** @defgroup RTC_Flags_Definitions
  618. * @{
  619. */
  620. #define RTC_FLAG_RECALPF ((uint32_t)0x00010000)
  621. #define RTC_FLAG_TAMP1F ((uint32_t)0x00002000)
  622. #define RTC_FLAG_TSOVF ((uint32_t)0x00001000)
  623. #define RTC_FLAG_TSF ((uint32_t)0x00000800)
  624. #define RTC_FLAG_WUTF ((uint32_t)0x00000400)
  625. #define RTC_FLAG_ALRBF ((uint32_t)0x00000200)
  626. #define RTC_FLAG_ALRAF ((uint32_t)0x00000100)
  627. #define RTC_FLAG_INITF ((uint32_t)0x00000040)
  628. #define RTC_FLAG_RSF ((uint32_t)0x00000020)
  629. #define RTC_FLAG_INITS ((uint32_t)0x00000010)
  630. #define RTC_FLAG_SHPF ((uint32_t)0x00000008)
  631. #define RTC_FLAG_WUTWF ((uint32_t)0x00000004)
  632. #define RTC_FLAG_ALRBWF ((uint32_t)0x00000002)
  633. #define RTC_FLAG_ALRAWF ((uint32_t)0x00000001)
  634. #define IS_RTC_GET_FLAG(FLAG) (((FLAG) == RTC_FLAG_TSOVF) || ((FLAG) == RTC_FLAG_TSF) || \
  635. ((FLAG) == RTC_FLAG_WUTF) || ((FLAG) == RTC_FLAG_ALRBF) || \
  636. ((FLAG) == RTC_FLAG_ALRAF) || ((FLAG) == RTC_FLAG_INITF) || \
  637. ((FLAG) == RTC_FLAG_RSF) || ((FLAG) == RTC_FLAG_WUTWF) || \
  638. ((FLAG) == RTC_FLAG_ALRBWF) || ((FLAG) == RTC_FLAG_ALRAWF) || \
  639. ((FLAG) == RTC_FLAG_TAMP1F) || ((FLAG) == RTC_FLAG_RECALPF) || \
  640. ((FLAG) == RTC_FLAG_SHPF))
  641. #define IS_RTC_CLEAR_FLAG(FLAG) (((FLAG) != (uint32_t)RESET) && (((FLAG) & 0xFFFF00DF) == (uint32_t)RESET))
  642. /**
  643. * @}
  644. */
  645. /** @defgroup RTC_Interrupts_Definitions
  646. * @{
  647. */
  648. #define RTC_IT_TS ((uint32_t)0x00008000)
  649. #define RTC_IT_WUT ((uint32_t)0x00004000)
  650. #define RTC_IT_ALRB ((uint32_t)0x00002000)
  651. #define RTC_IT_ALRA ((uint32_t)0x00001000)
  652. #define RTC_IT_TAMP ((uint32_t)0x00000004) /* Used only to Enable the Tamper Interrupt */
  653. #define RTC_IT_TAMP1 ((uint32_t)0x00020000)
  654. #define IS_RTC_CONFIG_IT(IT) (((IT) != (uint32_t)RESET) && (((IT) & 0xFFFF0FFB) == (uint32_t)RESET))
  655. #define IS_RTC_GET_IT(IT) (((IT) == RTC_IT_TS) || ((IT) == RTC_IT_WUT) || \
  656. ((IT) == RTC_IT_ALRB) || ((IT) == RTC_IT_ALRA) || \
  657. ((IT) == RTC_IT_TAMP1))
  658. #define IS_RTC_CLEAR_IT(IT) (((IT) != (uint32_t)RESET) && (((IT) & 0xFFFD0FFF) == (uint32_t)RESET))
  659. /**
  660. * @}
  661. */
  662. /** @defgroup RTC_Legacy
  663. * @{
  664. */
  665. #define RTC_DigitalCalibConfig RTC_CoarseCalibConfig
  666. #define RTC_DigitalCalibCmd RTC_CoarseCalibCmd
  667. /**
  668. * @}
  669. */
  670. /**
  671. * @}
  672. */
  673. /* Exported macro ------------------------------------------------------------*/
  674. /* Exported functions --------------------------------------------------------*/
  675. /* Function used to set the RTC configuration to the default reset state *****/
  676. ErrorStatus RTC_DeInit(void);
  677. /* Initialization and Configuration functions *********************************/
  678. ErrorStatus RTC_Init(RTC_InitTypeDef* RTC_InitStruct);
  679. void RTC_StructInit(RTC_InitTypeDef* RTC_InitStruct);
  680. void RTC_WriteProtectionCmd(FunctionalState NewState);
  681. ErrorStatus RTC_EnterInitMode(void);
  682. void RTC_ExitInitMode(void);
  683. ErrorStatus RTC_WaitForSynchro(void);
  684. ErrorStatus RTC_RefClockCmd(FunctionalState NewState);
  685. void RTC_BypassShadowCmd(FunctionalState NewState);
  686. /* Time and Date configuration functions **************************************/
  687. ErrorStatus RTC_SetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct);
  688. void RTC_TimeStructInit(RTC_TimeTypeDef* RTC_TimeStruct);
  689. void RTC_GetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct);
  690. uint32_t RTC_GetSubSecond(void);
  691. ErrorStatus RTC_SetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct);
  692. void RTC_DateStructInit(RTC_DateTypeDef* RTC_DateStruct);
  693. void RTC_GetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct);
  694. /* Alarms (Alarm A and Alarm B) configuration functions **********************/
  695. void RTC_SetAlarm(uint32_t RTC_Format, uint32_t RTC_Alarm, RTC_AlarmTypeDef* RTC_AlarmStruct);
  696. void RTC_AlarmStructInit(RTC_AlarmTypeDef* RTC_AlarmStruct);
  697. void RTC_GetAlarm(uint32_t RTC_Format, uint32_t RTC_Alarm, RTC_AlarmTypeDef* RTC_AlarmStruct);
  698. ErrorStatus RTC_AlarmCmd(uint32_t RTC_Alarm, FunctionalState NewState);
  699. void RTC_AlarmSubSecondConfig(uint32_t RTC_Alarm, uint32_t RTC_AlarmSubSecondValue, uint32_t RTC_AlarmSubSecondMask);
  700. uint32_t RTC_GetAlarmSubSecond(uint32_t RTC_Alarm);
  701. /* WakeUp Timer configuration functions ***************************************/
  702. void RTC_WakeUpClockConfig(uint32_t RTC_WakeUpClock);
  703. void RTC_SetWakeUpCounter(uint32_t RTC_WakeUpCounter);
  704. uint32_t RTC_GetWakeUpCounter(void);
  705. ErrorStatus RTC_WakeUpCmd(FunctionalState NewState);
  706. /* Daylight Saving configuration functions ************************************/
  707. void RTC_DayLightSavingConfig(uint32_t RTC_DayLightSaving, uint32_t RTC_StoreOperation);
  708. uint32_t RTC_GetStoreOperation(void);
  709. /* Output pin Configuration function ******************************************/
  710. void RTC_OutputConfig(uint32_t RTC_Output, uint32_t RTC_OutputPolarity);
  711. /* Digital Calibration configuration functions *********************************/
  712. ErrorStatus RTC_CoarseCalibConfig(uint32_t RTC_CalibSign, uint32_t Value);
  713. ErrorStatus RTC_CoarseCalibCmd(FunctionalState NewState);
  714. void RTC_CalibOutputCmd(FunctionalState NewState);
  715. void RTC_CalibOutputConfig(uint32_t RTC_CalibOutput);
  716. ErrorStatus RTC_SmoothCalibConfig(uint32_t RTC_SmoothCalibPeriod,
  717. uint32_t RTC_SmoothCalibPlusPulses,
  718. uint32_t RTC_SmouthCalibMinusPulsesValue);
  719. /* TimeStamp configuration functions ******************************************/
  720. void RTC_TimeStampCmd(uint32_t RTC_TimeStampEdge, FunctionalState NewState);
  721. void RTC_GetTimeStamp(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_StampTimeStruct,
  722. RTC_DateTypeDef* RTC_StampDateStruct);
  723. uint32_t RTC_GetTimeStampSubSecond(void);
  724. /* Tampers configuration functions ********************************************/
  725. void RTC_TamperTriggerConfig(uint32_t RTC_Tamper, uint32_t RTC_TamperTrigger);
  726. void RTC_TamperCmd(uint32_t RTC_Tamper, FunctionalState NewState);
  727. void RTC_TamperFilterConfig(uint32_t RTC_TamperFilter);
  728. void RTC_TamperSamplingFreqConfig(uint32_t RTC_TamperSamplingFreq);
  729. void RTC_TamperPinsPrechargeDuration(uint32_t RTC_TamperPrechargeDuration);
  730. void RTC_TimeStampOnTamperDetectionCmd(FunctionalState NewState);
  731. void RTC_TamperPullUpCmd(FunctionalState NewState);
  732. /* Backup Data Registers configuration functions ******************************/
  733. void RTC_WriteBackupRegister(uint32_t RTC_BKP_DR, uint32_t Data);
  734. uint32_t RTC_ReadBackupRegister(uint32_t RTC_BKP_DR);
  735. /* RTC Tamper and TimeStamp Pins Selection and Output Type Config configuration
  736. functions ******************************************************************/
  737. void RTC_TamperPinSelection(uint32_t RTC_TamperPin);
  738. void RTC_TimeStampPinSelection(uint32_t RTC_TimeStampPin);
  739. void RTC_OutputTypeConfig(uint32_t RTC_OutputType);
  740. /* RTC_Shift_control_synchonisation_functions *********************************/
  741. ErrorStatus RTC_SynchroShiftConfig(uint32_t RTC_ShiftAdd1S, uint32_t RTC_ShiftSubFS);
  742. /* Interrupts and flags management functions **********************************/
  743. void RTC_ITConfig(uint32_t RTC_IT, FunctionalState NewState);
  744. FlagStatus RTC_GetFlagStatus(uint32_t RTC_FLAG);
  745. void RTC_ClearFlag(uint32_t RTC_FLAG);
  746. ITStatus RTC_GetITStatus(uint32_t RTC_IT);
  747. void RTC_ClearITPendingBit(uint32_t RTC_IT);
  748. #ifdef __cplusplus
  749. }
  750. #endif
  751. #endif /*__STM32F4xx_RTC_H */
  752. /**
  753. * @}
  754. */
  755. /**
  756. * @}
  757. */
  758. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/