stm32f4xx_hal_rtc.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef __STM32F4xx_HAL_RTC_H
22 #define __STM32F4xx_HAL_RTC_H
23 
24 #ifdef __cplusplus
25  extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32f4xx_hal_def.h"
30 
39 /* Exported types ------------------------------------------------------------*/
47 typedef enum
48 {
55 
59 typedef struct
60 {
61  uint32_t HourFormat;
64  uint32_t AsynchPrediv;
67  uint32_t SynchPrediv;
70  uint32_t OutPut;
73  uint32_t OutPutPolarity;
76  uint32_t OutPutType;
79 
83 typedef struct
84 {
85  uint8_t Hours;
89  uint8_t Minutes;
92  uint8_t Seconds;
95  uint8_t TimeFormat;
98  uint32_t SubSeconds;
102  uint32_t SecondFraction;
108  uint32_t DayLightSaving;
111  uint32_t StoreOperation;
115 
119 typedef struct
120 {
121  uint8_t WeekDay;
124  uint8_t Month;
127  uint8_t Date;
130  uint8_t Year;
134 
138 typedef struct
139 {
142  uint32_t AlarmMask;
155  uint32_t Alarm;
158 
162 #if (USE_HAL_RTC_REGISTER_CALLBACKS == 1)
163 typedef struct __RTC_HandleTypeDef
164 #else
165 typedef struct
166 #endif /* (USE_HAL_RTC_REGISTER_CALLBACKS) */
167 {
176 #if (USE_HAL_RTC_REGISTER_CALLBACKS == 1)
177  void (* AlarmAEventCallback) ( struct __RTC_HandleTypeDef * hrtc);
179  void (* AlarmBEventCallback) ( struct __RTC_HandleTypeDef * hrtc);
181  void (* TimeStampEventCallback) ( struct __RTC_HandleTypeDef * hrtc);
183  void (* WakeUpTimerEventCallback) ( struct __RTC_HandleTypeDef * hrtc);
185  void (* Tamper1EventCallback) ( struct __RTC_HandleTypeDef * hrtc);
187  void (* Tamper2EventCallback) ( struct __RTC_HandleTypeDef * hrtc);
189  void (* MspInitCallback) ( struct __RTC_HandleTypeDef * hrtc);
191  void (* MspDeInitCallback) ( struct __RTC_HandleTypeDef * hrtc);
193 #endif /* (USE_HAL_RTC_REGISTER_CALLBACKS) */
194 
196 
197 #if (USE_HAL_RTC_REGISTER_CALLBACKS == 1)
198 
201 typedef enum
202 {
203  HAL_RTC_ALARM_A_EVENT_CB_ID = 0x00u,
204  HAL_RTC_ALARM_B_EVENT_CB_ID = 0x01u,
205  HAL_RTC_TIMESTAMP_EVENT_CB_ID = 0x02u,
206  HAL_RTC_WAKEUPTIMER_EVENT_CB_ID = 0x03u,
207  HAL_RTC_TAMPER1_EVENT_CB_ID = 0x04u,
208  HAL_RTC_TAMPER2_EVENT_CB_ID = 0x05u,
209  HAL_RTC_MSPINIT_CB_ID = 0x0Eu,
210  HAL_RTC_MSPDEINIT_CB_ID = 0x0Fu
211 }HAL_RTC_CallbackIDTypeDef;
212 
216 typedef void (*pRTC_CallbackTypeDef)(RTC_HandleTypeDef * hrtc);
217 #endif /* USE_HAL_RTC_REGISTER_CALLBACKS */
218 
223 /* Exported constants --------------------------------------------------------*/
231 #define RTC_HOURFORMAT_24 0x00000000U
232 #define RTC_HOURFORMAT_12 0x00000040U
233 
240 #define RTC_OUTPUT_DISABLE 0x00000000U
241 #define RTC_OUTPUT_ALARMA 0x00200000U
242 #define RTC_OUTPUT_ALARMB 0x00400000U
243 #define RTC_OUTPUT_WAKEUP 0x00600000U
244 
251 #define RTC_OUTPUT_POLARITY_HIGH 0x00000000U
252 #define RTC_OUTPUT_POLARITY_LOW 0x00100000U
253 
260 #define RTC_OUTPUT_TYPE_OPENDRAIN 0x00000000U
261 #define RTC_OUTPUT_TYPE_PUSHPULL 0x00040000U
262 
269 #define RTC_HOURFORMAT12_AM ((uint8_t)0x00)
270 #define RTC_HOURFORMAT12_PM ((uint8_t)0x40)
271 
278 #define RTC_DAYLIGHTSAVING_SUB1H 0x00020000U
279 #define RTC_DAYLIGHTSAVING_ADD1H 0x00010000U
280 #define RTC_DAYLIGHTSAVING_NONE 0x00000000U
281 
288 #define RTC_STOREOPERATION_RESET 0x00000000U
289 #define RTC_STOREOPERATION_SET 0x00040000U
290 
297 #define RTC_FORMAT_BIN 0x00000000U
298 #define RTC_FORMAT_BCD 0x00000001U
299 
306 /* Coded in BCD format */
307 #define RTC_MONTH_JANUARY ((uint8_t)0x01)
308 #define RTC_MONTH_FEBRUARY ((uint8_t)0x02)
309 #define RTC_MONTH_MARCH ((uint8_t)0x03)
310 #define RTC_MONTH_APRIL ((uint8_t)0x04)
311 #define RTC_MONTH_MAY ((uint8_t)0x05)
312 #define RTC_MONTH_JUNE ((uint8_t)0x06)
313 #define RTC_MONTH_JULY ((uint8_t)0x07)
314 #define RTC_MONTH_AUGUST ((uint8_t)0x08)
315 #define RTC_MONTH_SEPTEMBER ((uint8_t)0x09)
316 #define RTC_MONTH_OCTOBER ((uint8_t)0x10)
317 #define RTC_MONTH_NOVEMBER ((uint8_t)0x11)
318 #define RTC_MONTH_DECEMBER ((uint8_t)0x12)
319 
326 #define RTC_WEEKDAY_MONDAY ((uint8_t)0x01)
327 #define RTC_WEEKDAY_TUESDAY ((uint8_t)0x02)
328 #define RTC_WEEKDAY_WEDNESDAY ((uint8_t)0x03)
329 #define RTC_WEEKDAY_THURSDAY ((uint8_t)0x04)
330 #define RTC_WEEKDAY_FRIDAY ((uint8_t)0x05)
331 #define RTC_WEEKDAY_SATURDAY ((uint8_t)0x06)
332 #define RTC_WEEKDAY_SUNDAY ((uint8_t)0x07)
333 
340 #define RTC_ALARMDATEWEEKDAYSEL_DATE 0x00000000U
341 #define RTC_ALARMDATEWEEKDAYSEL_WEEKDAY 0x40000000U
342 
349 #define RTC_ALARMMASK_NONE 0x00000000U
350 #define RTC_ALARMMASK_DATEWEEKDAY RTC_ALRMAR_MSK4
351 #define RTC_ALARMMASK_HOURS RTC_ALRMAR_MSK3
352 #define RTC_ALARMMASK_MINUTES RTC_ALRMAR_MSK2
353 #define RTC_ALARMMASK_SECONDS RTC_ALRMAR_MSK1
354 #define RTC_ALARMMASK_ALL 0x80808080U
355 
362 #define RTC_ALARM_A RTC_CR_ALRAE
363 #define RTC_ALARM_B RTC_CR_ALRBE
364 
371 #define RTC_ALARMSUBSECONDMASK_ALL 0x00000000U
374 #define RTC_ALARMSUBSECONDMASK_SS14_1 0x01000000U
376 #define RTC_ALARMSUBSECONDMASK_SS14_2 0x02000000U
378 #define RTC_ALARMSUBSECONDMASK_SS14_3 0x03000000U
380 #define RTC_ALARMSUBSECONDMASK_SS14_4 0x04000000U
382 #define RTC_ALARMSUBSECONDMASK_SS14_5 0x05000000U
384 #define RTC_ALARMSUBSECONDMASK_SS14_6 0x06000000U
386 #define RTC_ALARMSUBSECONDMASK_SS14_7 0x07000000U
388 #define RTC_ALARMSUBSECONDMASK_SS14_8 0x08000000U
390 #define RTC_ALARMSUBSECONDMASK_SS14_9 0x09000000U
392 #define RTC_ALARMSUBSECONDMASK_SS14_10 0x0A000000U
394 #define RTC_ALARMSUBSECONDMASK_SS14_11 0x0B000000U
396 #define RTC_ALARMSUBSECONDMASK_SS14_12 0x0C000000U
398 #define RTC_ALARMSUBSECONDMASK_SS14_13 0x0D000000U
400 #define RTC_ALARMSUBSECONDMASK_SS14 0x0E000000U
402 #define RTC_ALARMSUBSECONDMASK_NONE 0x0F000000U
411 #define RTC_IT_TS 0x00008000U
412 #define RTC_IT_WUT 0x00004000U
413 #define RTC_IT_ALRB 0x00002000U
414 #define RTC_IT_ALRA 0x00001000U
415 #define RTC_IT_TAMP 0x00000004U /* Used only to Enable the Tamper Interrupt */
416 #define RTC_IT_TAMP1 0x00020000U
417 #define RTC_IT_TAMP2 0x00040000U
418 
425 #define RTC_FLAG_RECALPF 0x00010000U
426 #define RTC_FLAG_TAMP2F 0x00004000U
427 #define RTC_FLAG_TAMP1F 0x00002000U
428 #define RTC_FLAG_TSOVF 0x00001000U
429 #define RTC_FLAG_TSF 0x00000800U
430 #define RTC_FLAG_WUTF 0x00000400U
431 #define RTC_FLAG_ALRBF 0x00000200U
432 #define RTC_FLAG_ALRAF 0x00000100U
433 #define RTC_FLAG_INITF 0x00000040U
434 #define RTC_FLAG_RSF 0x00000020U
435 #define RTC_FLAG_INITS 0x00000010U
436 #define RTC_FLAG_SHPF 0x00000008U
437 #define RTC_FLAG_WUTWF 0x00000004U
438 #define RTC_FLAG_ALRBWF 0x00000002U
439 #define RTC_FLAG_ALRAWF 0x00000001U
440 
448 /* Exported macro ------------------------------------------------------------*/
457 #if (USE_HAL_RTC_REGISTER_CALLBACKS == 1)
458 #define __HAL_RTC_RESET_HANDLE_STATE(__HANDLE__) do{\
459  (__HANDLE__)->State = HAL_RTC_STATE_RESET;\
460  (__HANDLE__)->MspInitCallback = NULL;\
461  (__HANDLE__)->MspDeInitCallback = NULL;\
462  }while(0u)
463 #else
464 #define __HAL_RTC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_RTC_STATE_RESET)
465 #endif /* USE_HAL_RTC_REGISTER_CALLBACKS */
466 
472 #define __HAL_RTC_WRITEPROTECTION_DISABLE(__HANDLE__) \
473  do{ \
474  (__HANDLE__)->Instance->WPR = 0xCAU; \
475  (__HANDLE__)->Instance->WPR = 0x53U; \
476  } while(0U)
477 
483 #define __HAL_RTC_WRITEPROTECTION_ENABLE(__HANDLE__) \
484  do{ \
485  (__HANDLE__)->Instance->WPR = 0xFFU; \
486  } while(0U)
487 
493 #define __HAL_RTC_ALARMA_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRAE))
494 
500 #define __HAL_RTC_ALARMA_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRAE))
501 
507 #define __HAL_RTC_ALARMB_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRBE))
508 
514 #define __HAL_RTC_ALARMB_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRBE))
515 
525 #define __HAL_RTC_ALARM_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))
526 
536 #define __HAL_RTC_ALARM_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))
537 
547 #define __HAL_RTC_ALARM_GET_IT(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->ISR)& ((__INTERRUPT__)>> 4U)) != RESET)? SET : RESET)
548 
560 #define __HAL_RTC_ALARM_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET)? SET : RESET)
561 
571 #define __HAL_RTC_ALARM_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))
572 
573 
583 #define __HAL_RTC_ALARM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != RESET) ? SET : RESET)
584 
589 #define __HAL_RTC_ALARM_EXTI_ENABLE_IT() (EXTI->IMR |= RTC_EXTI_LINE_ALARM_EVENT)
590 
595 #define __HAL_RTC_ALARM_EXTI_DISABLE_IT() (EXTI->IMR &= ~(RTC_EXTI_LINE_ALARM_EVENT))
596 
601 #define __HAL_RTC_ALARM_EXTI_ENABLE_EVENT() (EXTI->EMR |= RTC_EXTI_LINE_ALARM_EVENT)
602 
607 #define __HAL_RTC_ALARM_EXTI_DISABLE_EVENT() (EXTI->EMR &= ~(RTC_EXTI_LINE_ALARM_EVENT))
608 
613 #define __HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE() (EXTI->FTSR |= RTC_EXTI_LINE_ALARM_EVENT)
614 
619 #define __HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE() (EXTI->FTSR &= ~(RTC_EXTI_LINE_ALARM_EVENT))
620 
625 #define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE() (EXTI->RTSR |= RTC_EXTI_LINE_ALARM_EVENT)
626 
631 #define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE() (EXTI->RTSR &= ~(RTC_EXTI_LINE_ALARM_EVENT))
632 
637 #define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_FALLING_EDGE() do { __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE(); \
638  __HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE();\
639  } while(0U)
640 
645 #define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_FALLING_EDGE() do { __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE();\
646  __HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE();\
647  } while(0U)
648 
653 #define __HAL_RTC_ALARM_EXTI_GET_FLAG() (EXTI->PR & RTC_EXTI_LINE_ALARM_EVENT)
654 
659 #define __HAL_RTC_ALARM_EXTI_CLEAR_FLAG() (EXTI->PR = RTC_EXTI_LINE_ALARM_EVENT)
660 
665 #define __HAL_RTC_ALARM_EXTI_GENERATE_SWIT() (EXTI->SWIER |= RTC_EXTI_LINE_ALARM_EVENT)
666 
670 /* Include RTC HAL Extension module */
671 #include "stm32f4xx_hal_rtc_ex.h"
672 
673 /* Exported functions --------------------------------------------------------*/
681 /* Initialization and de-initialization functions ****************************/
686 
687 /* Callbacks Register/UnRegister functions ***********************************/
688 #if (USE_HAL_RTC_REGISTER_CALLBACKS == 1)
689 HAL_StatusTypeDef HAL_RTC_RegisterCallback(RTC_HandleTypeDef *hrtc, HAL_RTC_CallbackIDTypeDef CallbackID, pRTC_CallbackTypeDef pCallback);
690 HAL_StatusTypeDef HAL_RTC_UnRegisterCallback(RTC_HandleTypeDef *hrtc, HAL_RTC_CallbackIDTypeDef CallbackID);
691 #endif /* USE_HAL_RTC_REGISTER_CALLBACKS */
692 
699 /* RTC Time and Date functions ************************************************/
711 /* RTC Alarm functions ********************************************************/
715 HAL_StatusTypeDef HAL_RTC_GetAlarm(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Alarm, uint32_t Format);
726 /* Peripheral Control functions ***********************************************/
735 /* Peripheral State functions *************************************************/
745 /* Private types -------------------------------------------------------------*/
746 /* Private variables ---------------------------------------------------------*/
747 /* Private constants ---------------------------------------------------------*/
751 /* Masks Definition */
752 #define RTC_TR_RESERVED_MASK 0x007F7F7FU
753 #define RTC_DR_RESERVED_MASK 0x00FFFF3FU
754 #define RTC_INIT_MASK 0xFFFFFFFFU
755 #define RTC_RSF_MASK 0xFFFFFF5FU
756 #define RTC_FLAGS_MASK ((uint32_t)(RTC_FLAG_TSOVF | RTC_FLAG_TSF | RTC_FLAG_WUTF | \
757  RTC_FLAG_ALRBF | RTC_FLAG_ALRAF | RTC_FLAG_INITF | \
758  RTC_FLAG_RSF | RTC_FLAG_INITS | RTC_FLAG_WUTWF | \
759  RTC_FLAG_ALRBWF | RTC_FLAG_ALRAWF | RTC_FLAG_TAMP1F | \
760  RTC_FLAG_RECALPF | RTC_FLAG_SHPF))
761 
762 #define RTC_TIMEOUT_VALUE 1000
763 
764 #define RTC_EXTI_LINE_ALARM_EVENT ((uint32_t)EXTI_IMR_MR17)
769 /* Private macros ------------------------------------------------------------*/
770 
777 #define IS_RTC_HOUR_FORMAT(FORMAT) (((FORMAT) == RTC_HOURFORMAT_12) || \
778  ((FORMAT) == RTC_HOURFORMAT_24))
779 #define IS_RTC_OUTPUT(OUTPUT) (((OUTPUT) == RTC_OUTPUT_DISABLE) || \
780  ((OUTPUT) == RTC_OUTPUT_ALARMA) || \
781  ((OUTPUT) == RTC_OUTPUT_ALARMB) || \
782  ((OUTPUT) == RTC_OUTPUT_WAKEUP))
783 #define IS_RTC_OUTPUT_POL(POL) (((POL) == RTC_OUTPUT_POLARITY_HIGH) || \
784  ((POL) == RTC_OUTPUT_POLARITY_LOW))
785 #define IS_RTC_OUTPUT_TYPE(TYPE) (((TYPE) == RTC_OUTPUT_TYPE_OPENDRAIN) || \
786  ((TYPE) == RTC_OUTPUT_TYPE_PUSHPULL))
787 #define IS_RTC_HOUR12(HOUR) (((HOUR) > 0U) && ((HOUR) <= 12U))
788 #define IS_RTC_HOUR24(HOUR) ((HOUR) <= 23U)
789 #define IS_RTC_ASYNCH_PREDIV(PREDIV) ((PREDIV) <= 0x7FU)
790 #define IS_RTC_SYNCH_PREDIV(PREDIV) ((PREDIV) <= 0x7FFFU)
791 #define IS_RTC_MINUTES(MINUTES) ((MINUTES) <= 59U)
792 #define IS_RTC_SECONDS(SECONDS) ((SECONDS) <= 59U)
793 
794 #define IS_RTC_HOURFORMAT12(PM) (((PM) == RTC_HOURFORMAT12_AM) || ((PM) == RTC_HOURFORMAT12_PM))
795 #define IS_RTC_DAYLIGHT_SAVING(SAVE) (((SAVE) == RTC_DAYLIGHTSAVING_SUB1H) || \
796  ((SAVE) == RTC_DAYLIGHTSAVING_ADD1H) || \
797  ((SAVE) == RTC_DAYLIGHTSAVING_NONE))
798 #define IS_RTC_STORE_OPERATION(OPERATION) (((OPERATION) == RTC_STOREOPERATION_RESET) || \
799  ((OPERATION) == RTC_STOREOPERATION_SET))
800 #define IS_RTC_FORMAT(FORMAT) (((FORMAT) == RTC_FORMAT_BIN) || ((FORMAT) == RTC_FORMAT_BCD))
801 #define IS_RTC_YEAR(YEAR) ((YEAR) <= 99U)
802 #define IS_RTC_MONTH(MONTH) (((MONTH) >= 1U) && ((MONTH) <= 12U))
803 #define IS_RTC_DATE(DATE) (((DATE) >= 1U) && ((DATE) <= 31U))
804 #define IS_RTC_WEEKDAY(WEEKDAY) (((WEEKDAY) == RTC_WEEKDAY_MONDAY) || \
805  ((WEEKDAY) == RTC_WEEKDAY_TUESDAY) || \
806  ((WEEKDAY) == RTC_WEEKDAY_WEDNESDAY) || \
807  ((WEEKDAY) == RTC_WEEKDAY_THURSDAY) || \
808  ((WEEKDAY) == RTC_WEEKDAY_FRIDAY) || \
809  ((WEEKDAY) == RTC_WEEKDAY_SATURDAY) || \
810  ((WEEKDAY) == RTC_WEEKDAY_SUNDAY))
811 #define IS_RTC_ALARM_DATE_WEEKDAY_DATE(DATE) (((DATE) > 0U) && ((DATE) <= 31U))
812 #define IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(WEEKDAY) (((WEEKDAY) == RTC_WEEKDAY_MONDAY) || \
813  ((WEEKDAY) == RTC_WEEKDAY_TUESDAY) || \
814  ((WEEKDAY) == RTC_WEEKDAY_WEDNESDAY) || \
815  ((WEEKDAY) == RTC_WEEKDAY_THURSDAY) || \
816  ((WEEKDAY) == RTC_WEEKDAY_FRIDAY) || \
817  ((WEEKDAY) == RTC_WEEKDAY_SATURDAY) || \
818  ((WEEKDAY) == RTC_WEEKDAY_SUNDAY))
819 #define IS_RTC_ALARM_DATE_WEEKDAY_SEL(SEL) (((SEL) == RTC_ALARMDATEWEEKDAYSEL_DATE) || \
820  ((SEL) == RTC_ALARMDATEWEEKDAYSEL_WEEKDAY))
821 #define IS_RTC_ALARM_MASK(MASK) (((MASK) & 0x7F7F7F7FU) == (uint32_t)RESET)
822 #define IS_RTC_ALARM(ALARM) (((ALARM) == RTC_ALARM_A) || ((ALARM) == RTC_ALARM_B))
823 #define IS_RTC_ALARM_SUB_SECOND_VALUE(VALUE) ((VALUE) <= 0x00007FFFU)
824 
825 #define IS_RTC_ALARM_SUB_SECOND_MASK(MASK) (((MASK) == RTC_ALARMSUBSECONDMASK_ALL) || \
826  ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_1) || \
827  ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_2) || \
828  ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_3) || \
829  ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_4) || \
830  ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_5) || \
831  ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_6) || \
832  ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_7) || \
833  ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_8) || \
834  ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_9) || \
835  ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_10) || \
836  ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_11) || \
837  ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_12) || \
838  ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_13) || \
839  ((MASK) == RTC_ALARMSUBSECONDMASK_SS14) || \
840  ((MASK) == RTC_ALARMSUBSECONDMASK_NONE))
841 
849 /* Private functions ---------------------------------------------------------*/
854 uint8_t RTC_ByteToBcd2(uint8_t Value);
855 uint8_t RTC_Bcd2ToByte(uint8_t Value);
868 #ifdef __cplusplus
869 }
870 #endif
871 
872 #endif /* __STM32F4xx_HAL_RTC_H */
873 
874 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
RTC_InitTypeDef::OutPutPolarity
uint32_t OutPutPolarity
Definition: stm32f4xx_hal_rtc.h:73
__IO
#define __IO
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:237
RTC_InitTypeDef
RTC Configuration Structure definition.
Definition: stm32f4xx_hal_rtc.h:59
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:40
RTC_AlarmTypeDef::AlarmTime
RTC_TimeTypeDef AlarmTime
Definition: stm32f4xx_hal_rtc.h:140
HAL_RTC_DeInit
HAL_StatusTypeDef HAL_RTC_DeInit(RTC_HandleTypeDef *hrtc)
HAL_RTC_GetDate
HAL_StatusTypeDef HAL_RTC_GetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format)
RTC_TimeTypeDef::Hours
uint8_t Hours
Definition: stm32f4xx_hal_rtc.h:85
RTC_InitTypeDef::OutPutType
uint32_t OutPutType
Definition: stm32f4xx_hal_rtc.h:76
RTC_HandleTypeDef::Init
RTC_InitTypeDef Init
Definition: stm32f4xx_hal_rtc.h:170
RTC_TimeTypeDef::DayLightSaving
uint32_t DayLightSaving
Definition: stm32f4xx_hal_rtc.h:108
RTC_HandleTypeDef
RTC Handle Structure definition.
Definition: stm32f4xx_hal_rtc.h:165
HAL_RTC_DeactivateAlarm
HAL_StatusTypeDef HAL_RTC_DeactivateAlarm(RTC_HandleTypeDef *hrtc, uint32_t Alarm)
RTC_TimeTypeDef::SecondFraction
uint32_t SecondFraction
Definition: stm32f4xx_hal_rtc.h:102
HAL_RTC_PollForAlarmAEvent
HAL_StatusTypeDef HAL_RTC_PollForAlarmAEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout)
RTC_AlarmTypeDef::AlarmDateWeekDay
uint8_t AlarmDateWeekDay
Definition: stm32f4xx_hal_rtc.h:151
RTC_AlarmTypeDef::AlarmDateWeekDaySel
uint32_t AlarmDateWeekDaySel
Definition: stm32f4xx_hal_rtc.h:148
RTC_EnterInitMode
HAL_StatusTypeDef RTC_EnterInitMode(RTC_HandleTypeDef *hrtc)
RTC_InitTypeDef::SynchPrediv
uint32_t SynchPrediv
Definition: stm32f4xx_hal_rtc.h:67
HAL_LockTypeDef
HAL_LockTypeDef
HAL Lock structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:51
RTC_HandleTypeDef::Lock
HAL_LockTypeDef Lock
Definition: stm32f4xx_hal_rtc.h:172
HAL_RTC_MspDeInit
void HAL_RTC_MspDeInit(RTC_HandleTypeDef *hrtc)
HAL_RTC_WaitForSynchro
HAL_StatusTypeDef HAL_RTC_WaitForSynchro(RTC_HandleTypeDef *hrtc)
RTC_TimeTypeDef::TimeFormat
uint8_t TimeFormat
Definition: stm32f4xx_hal_rtc.h:95
RTC_DateTypeDef::Date
uint8_t Date
Definition: stm32f4xx_hal_rtc.h:127
RTC_InitTypeDef::HourFormat
uint32_t HourFormat
Definition: stm32f4xx_hal_rtc.h:61
HAL_RTC_STATE_ERROR
@ HAL_RTC_STATE_ERROR
Definition: stm32f4xx_hal_rtc.h:53
RTC_TimeTypeDef
RTC Time structure definition.
Definition: stm32f4xx_hal_rtc.h:83
HAL_RTC_AlarmIRQHandler
void HAL_RTC_AlarmIRQHandler(RTC_HandleTypeDef *hrtc)
RTC_Bcd2ToByte
uint8_t RTC_Bcd2ToByte(uint8_t Value)
stm32f4xx_hal_def.h
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_RTC_AlarmAEventCallback
void HAL_RTC_AlarmAEventCallback(RTC_HandleTypeDef *hrtc)
HAL_RTC_STATE_READY
@ HAL_RTC_STATE_READY
Definition: stm32f4xx_hal_rtc.h:50
RTC_TimeTypeDef::StoreOperation
uint32_t StoreOperation
Definition: stm32f4xx_hal_rtc.h:111
RTC_AlarmTypeDef
RTC Alarm structure definition.
Definition: stm32f4xx_hal_rtc.h:138
HAL_RTC_SetAlarm_IT
HAL_StatusTypeDef HAL_RTC_SetAlarm_IT(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format)
RTC_ByteToBcd2
uint8_t RTC_ByteToBcd2(uint8_t Value)
HAL_RTCStateTypeDef
HAL_RTCStateTypeDef
HAL State structures definition.
Definition: stm32f4xx_hal_rtc.h:47
HAL_RTC_MspInit
void HAL_RTC_MspInit(RTC_HandleTypeDef *hrtc)
RTC_TimeTypeDef::Minutes
uint8_t Minutes
Definition: stm32f4xx_hal_rtc.h:89
RTC_AlarmTypeDef::Alarm
uint32_t Alarm
Definition: stm32f4xx_hal_rtc.h:155
HAL_RTC_SetDate
HAL_StatusTypeDef HAL_RTC_SetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format)
RTC_HandleTypeDef::Instance
RTC_TypeDef * Instance
Definition: stm32f4xx_hal_rtc.h:168
HAL_RTC_SetAlarm
HAL_StatusTypeDef HAL_RTC_SetAlarm(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format)
RTC_InitTypeDef::AsynchPrediv
uint32_t AsynchPrediv
Definition: stm32f4xx_hal_rtc.h:64
HAL_RTC_STATE_RESET
@ HAL_RTC_STATE_RESET
Definition: stm32f4xx_hal_rtc.h:49
RTC_DateTypeDef::Year
uint8_t Year
Definition: stm32f4xx_hal_rtc.h:130
HAL_RTC_GetTime
HAL_StatusTypeDef HAL_RTC_GetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format)
RTC_DateTypeDef::WeekDay
uint8_t WeekDay
Definition: stm32f4xx_hal_rtc.h:121
HAL_RTC_STATE_BUSY
@ HAL_RTC_STATE_BUSY
Definition: stm32f4xx_hal_rtc.h:51
RTC_InitTypeDef::OutPut
uint32_t OutPut
Definition: stm32f4xx_hal_rtc.h:70
HAL_RTC_GetState
HAL_RTCStateTypeDef HAL_RTC_GetState(RTC_HandleTypeDef *hrtc)
stm32f4xx_hal_rtc_ex.h
Header file of RTC HAL Extension module.
RTC_DateTypeDef
RTC Date structure definition.
Definition: stm32f4xx_hal_rtc.h:119
RTC_TimeTypeDef::SubSeconds
uint32_t SubSeconds
Definition: stm32f4xx_hal_rtc.h:98
HAL_RTC_Init
HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc)
RTC_DateTypeDef::Month
uint8_t Month
Definition: stm32f4xx_hal_rtc.h:124
RTC_TimeTypeDef::Seconds
uint8_t Seconds
Definition: stm32f4xx_hal_rtc.h:92
HAL_RTC_SetTime
HAL_StatusTypeDef HAL_RTC_SetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format)
HAL_RTC_GetAlarm
HAL_StatusTypeDef HAL_RTC_GetAlarm(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Alarm, uint32_t Format)
RTC_AlarmTypeDef::AlarmMask
uint32_t AlarmMask
Definition: stm32f4xx_hal_rtc.h:142
RTC_TypeDef
Real-Time Clock.
Definition: stm32f407xx.h:635
RTC_HandleTypeDef::State
__IO HAL_RTCStateTypeDef State
Definition: stm32f4xx_hal_rtc.h:174
HAL_RTC_STATE_TIMEOUT
@ HAL_RTC_STATE_TIMEOUT
Definition: stm32f4xx_hal_rtc.h:52
RTC_AlarmTypeDef::AlarmSubSecondMask
uint32_t AlarmSubSecondMask
Definition: stm32f4xx_hal_rtc.h:145


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:52