STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
|
Header file of RTC HAL module. More...
Go to the source code of this file.
Data Structures | |
struct | RTC_InitTypeDef |
RTC Configuration Structure definition. More... | |
struct | RTC_TimeTypeDef |
RTC Time structure definition. More... | |
struct | RTC_DateTypeDef |
RTC Date structure definition. More... | |
struct | RTC_AlarmTypeDef |
RTC Alarm structure definition. More... | |
struct | RTC_HandleTypeDef |
RTC Handle Structure definition. More... | |
Macros | |
#define | RTC_HOURFORMAT_24 0x00000000U |
#define | RTC_HOURFORMAT_12 RTC_CR_FMT |
#define | RTC_OUTPUT_DISABLE 0x00000000U |
#define | RTC_OUTPUT_ALARMA RTC_CR_OSEL_0 |
#define | RTC_OUTPUT_ALARMB RTC_CR_OSEL_1 |
#define | RTC_OUTPUT_WAKEUP RTC_CR_OSEL |
#define | RTC_OUTPUT_POLARITY_HIGH 0x00000000U |
#define | RTC_OUTPUT_POLARITY_LOW RTC_CR_POL |
#define | RTC_OUTPUT_TYPE_OPENDRAIN 0x00000000U |
#define | RTC_OUTPUT_TYPE_PUSHPULL RTC_TAFCR_ALARMOUTTYPE |
#define | RTC_HOURFORMAT12_AM ((uint8_t)0x00) |
#define | RTC_HOURFORMAT12_PM ((uint8_t)0x01) |
#define | RTC_DAYLIGHTSAVING_SUB1H RTC_CR_SUB1H |
#define | RTC_DAYLIGHTSAVING_ADD1H RTC_CR_ADD1H |
#define | RTC_DAYLIGHTSAVING_NONE 0x00000000U |
#define | RTC_STOREOPERATION_RESET 0x00000000U |
#define | RTC_STOREOPERATION_SET RTC_CR_BKP |
#define | RTC_FORMAT_BIN 0x00000000U |
#define | RTC_FORMAT_BCD 0x00000001U |
#define | RTC_MONTH_JANUARY ((uint8_t)0x01) |
#define | RTC_MONTH_FEBRUARY ((uint8_t)0x02) |
#define | RTC_MONTH_MARCH ((uint8_t)0x03) |
#define | RTC_MONTH_APRIL ((uint8_t)0x04) |
#define | RTC_MONTH_MAY ((uint8_t)0x05) |
#define | RTC_MONTH_JUNE ((uint8_t)0x06) |
#define | RTC_MONTH_JULY ((uint8_t)0x07) |
#define | RTC_MONTH_AUGUST ((uint8_t)0x08) |
#define | RTC_MONTH_SEPTEMBER ((uint8_t)0x09) |
#define | RTC_MONTH_OCTOBER ((uint8_t)0x10) |
#define | RTC_MONTH_NOVEMBER ((uint8_t)0x11) |
#define | RTC_MONTH_DECEMBER ((uint8_t)0x12) |
#define | RTC_WEEKDAY_MONDAY ((uint8_t)0x01) |
#define | RTC_WEEKDAY_TUESDAY ((uint8_t)0x02) |
#define | RTC_WEEKDAY_WEDNESDAY ((uint8_t)0x03) |
#define | RTC_WEEKDAY_THURSDAY ((uint8_t)0x04) |
#define | RTC_WEEKDAY_FRIDAY ((uint8_t)0x05) |
#define | RTC_WEEKDAY_SATURDAY ((uint8_t)0x06) |
#define | RTC_WEEKDAY_SUNDAY ((uint8_t)0x07) |
#define | RTC_ALARMDATEWEEKDAYSEL_DATE 0x00000000U |
#define | RTC_ALARMDATEWEEKDAYSEL_WEEKDAY RTC_ALRMAR_WDSEL |
#define | RTC_ALARMMASK_NONE 0x00000000U |
#define | RTC_ALARMMASK_DATEWEEKDAY RTC_ALRMAR_MSK4 |
#define | RTC_ALARMMASK_HOURS RTC_ALRMAR_MSK3 |
#define | RTC_ALARMMASK_MINUTES RTC_ALRMAR_MSK2 |
#define | RTC_ALARMMASK_SECONDS RTC_ALRMAR_MSK1 |
#define | RTC_ALARMMASK_ALL |
#define | RTC_ALARM_A RTC_CR_ALRAE |
#define | RTC_ALARM_B RTC_CR_ALRBE |
#define | RTC_ALARMSUBSECONDMASK_ALL 0x00000000U |
#define | RTC_ALARMSUBSECONDMASK_SS14_1 RTC_ALRMASSR_MASKSS_0 |
#define | RTC_ALARMSUBSECONDMASK_SS14_2 RTC_ALRMASSR_MASKSS_1 |
#define | RTC_ALARMSUBSECONDMASK_SS14_3 (RTC_ALRMASSR_MASKSS_0 | RTC_ALRMASSR_MASKSS_1) |
#define | RTC_ALARMSUBSECONDMASK_SS14_4 RTC_ALRMASSR_MASKSS_2 |
#define | RTC_ALARMSUBSECONDMASK_SS14_5 (RTC_ALRMASSR_MASKSS_0 | RTC_ALRMASSR_MASKSS_2) |
#define | RTC_ALARMSUBSECONDMASK_SS14_6 (RTC_ALRMASSR_MASKSS_1 | RTC_ALRMASSR_MASKSS_2) |
#define | RTC_ALARMSUBSECONDMASK_SS14_7 (RTC_ALRMASSR_MASKSS_0 | RTC_ALRMASSR_MASKSS_1 | RTC_ALRMASSR_MASKSS_2) |
#define | RTC_ALARMSUBSECONDMASK_SS14_8 RTC_ALRMASSR_MASKSS_3 |
#define | RTC_ALARMSUBSECONDMASK_SS14_9 (RTC_ALRMASSR_MASKSS_0 | RTC_ALRMASSR_MASKSS_3) |
#define | RTC_ALARMSUBSECONDMASK_SS14_10 (RTC_ALRMASSR_MASKSS_1 | RTC_ALRMASSR_MASKSS_3) |
#define | RTC_ALARMSUBSECONDMASK_SS14_11 (RTC_ALRMASSR_MASKSS_0 | RTC_ALRMASSR_MASKSS_1 | RTC_ALRMASSR_MASKSS_3) |
#define | RTC_ALARMSUBSECONDMASK_SS14_12 (RTC_ALRMASSR_MASKSS_2 | RTC_ALRMASSR_MASKSS_3) |
#define | RTC_ALARMSUBSECONDMASK_SS14_13 (RTC_ALRMASSR_MASKSS_0 | RTC_ALRMASSR_MASKSS_2 | RTC_ALRMASSR_MASKSS_3) |
#define | RTC_ALARMSUBSECONDMASK_SS14 (RTC_ALRMASSR_MASKSS_1 | RTC_ALRMASSR_MASKSS_2 | RTC_ALRMASSR_MASKSS_3) |
#define | RTC_ALARMSUBSECONDMASK_NONE RTC_ALRMASSR_MASKSS |
#define | RTC_IT_TS RTC_CR_TSIE |
#define | RTC_IT_WUT RTC_CR_WUTIE |
#define | RTC_IT_ALRB RTC_CR_ALRBIE |
#define | RTC_IT_ALRA RTC_CR_ALRAIE |
#define | RTC_FLAG_RECALPF RTC_ISR_RECALPF |
#define | RTC_FLAG_TAMP1F RTC_ISR_TAMP1F |
#define | RTC_FLAG_TSOVF RTC_ISR_TSOVF |
#define | RTC_FLAG_TSF RTC_ISR_TSF |
#define | RTC_FLAG_WUTF RTC_ISR_WUTF |
#define | RTC_FLAG_ALRBF RTC_ISR_ALRBF |
#define | RTC_FLAG_ALRAF RTC_ISR_ALRAF |
#define | RTC_FLAG_INITF RTC_ISR_INITF |
#define | RTC_FLAG_RSF RTC_ISR_RSF |
#define | RTC_FLAG_INITS RTC_ISR_INITS |
#define | RTC_FLAG_SHPF RTC_ISR_SHPF |
#define | RTC_FLAG_WUTWF RTC_ISR_WUTWF |
#define | RTC_FLAG_ALRBWF RTC_ISR_ALRBWF |
#define | RTC_FLAG_ALRAWF RTC_ISR_ALRAWF |
#define | __HAL_RTC_RESET_HANDLE_STATE(__HANDLE__) |
Reset RTC handle state. | |
#define | __HAL_RTC_WRITEPROTECTION_DISABLE(__HANDLE__) |
Disable the write protection for RTC registers. | |
#define | __HAL_RTC_WRITEPROTECTION_ENABLE(__HANDLE__) |
Enable the write protection for RTC registers. | |
#define | __HAL_RTC_IS_CALENDAR_INITIALIZED(__HANDLE__) |
Check whether the RTC Calendar is initialized. | |
#define | __HAL_RTC_ALARMA_ENABLE(__HANDLE__) |
Enable the RTC ALARMA peripheral. | |
#define | __HAL_RTC_ALARMA_DISABLE(__HANDLE__) |
Disable the RTC ALARMA peripheral. | |
#define | __HAL_RTC_ALARMB_ENABLE(__HANDLE__) |
Enable the RTC ALARMB peripheral. | |
#define | __HAL_RTC_ALARMB_DISABLE(__HANDLE__) |
Disable the RTC ALARMB peripheral. | |
#define | __HAL_RTC_ALARM_ENABLE_IT(__HANDLE__, __INTERRUPT__) |
Enable the RTC Alarm interrupt. | |
#define | __HAL_RTC_ALARM_DISABLE_IT(__HANDLE__, __INTERRUPT__) |
Disable the RTC Alarm interrupt. | |
#define | __HAL_RTC_ALARM_GET_IT(__HANDLE__, __INTERRUPT__) |
Check whether the specified RTC Alarm interrupt has occurred or not. | |
#define | __HAL_RTC_ALARM_GET_FLAG(__HANDLE__, __FLAG__) |
Get the selected RTC Alarm's flag status. | |
#define | __HAL_RTC_ALARM_CLEAR_FLAG(__HANDLE__, __FLAG__) |
Clear the RTC Alarm's pending flags. | |
#define | __HAL_RTC_ALARM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) |
Check whether the specified RTC Alarm interrupt has been enabled or not. | |
#define | __HAL_RTC_ALARM_EXTI_ENABLE_IT() |
Enable interrupt on the RTC Alarm associated EXTI line. | |
#define | __HAL_RTC_ALARM_EXTI_DISABLE_IT() |
Disable interrupt on the RTC Alarm associated EXTI line. | |
#define | __HAL_RTC_ALARM_EXTI_ENABLE_EVENT() |
Enable event on the RTC Alarm associated EXTI line. | |
#define | __HAL_RTC_ALARM_EXTI_DISABLE_EVENT() |
Disable event on the RTC Alarm associated EXTI line. | |
#define | __HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE() |
Enable falling edge trigger on the RTC Alarm associated EXTI line. | |
#define | __HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE() |
Disable falling edge trigger on the RTC Alarm associated EXTI line. | |
#define | __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE() |
Enable rising edge trigger on the RTC Alarm associated EXTI line. | |
#define | __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE() |
Disable rising edge trigger on the RTC Alarm associated EXTI line. | |
#define | __HAL_RTC_ALARM_EXTI_ENABLE_RISING_FALLING_EDGE() |
Enable rising & falling edge trigger on the RTC Alarm associated EXTI line. | |
#define | __HAL_RTC_ALARM_EXTI_DISABLE_RISING_FALLING_EDGE() |
Disable rising & falling edge trigger on the RTC Alarm associated EXTI line. | |
#define | __HAL_RTC_ALARM_EXTI_GET_FLAG() |
Check whether the RTC Alarm associated EXTI line interrupt flag is set or not. | |
#define | __HAL_RTC_ALARM_EXTI_CLEAR_FLAG() |
Clear the RTC Alarm associated EXTI line flag. | |
#define | __HAL_RTC_ALARM_EXTI_GENERATE_SWIT() |
Generate a Software interrupt on RTC Alarm associated EXTI line. | |
#define | RTC_TR_RESERVED_MASK |
#define | RTC_DR_RESERVED_MASK |
#define | RTC_ISR_RESERVED_MASK ((uint32_t)(RTC_FLAGS_MASK | RTC_ISR_INIT)) |
#define | RTC_INIT_MASK 0xFFFFFFFFU |
#define | RTC_RSF_MASK ((uint32_t)~(RTC_ISR_INIT | RTC_ISR_RSF)) |
#define | RTC_FLAGS_MASK |
#define | RTC_TIMEOUT_VALUE 1000U |
#define | RTC_EXTI_LINE_ALARM_EVENT EXTI_IMR_MR17 |
#define | IS_RTC_HOUR_FORMAT(FORMAT) |
#define | IS_RTC_OUTPUT(OUTPUT) |
#define | IS_RTC_OUTPUT_POL(POL) |
#define | IS_RTC_OUTPUT_TYPE(TYPE) |
#define | IS_RTC_ASYNCH_PREDIV(PREDIV) |
#define | IS_RTC_SYNCH_PREDIV(PREDIV) |
#define | IS_RTC_HOUR12(HOUR) |
#define | IS_RTC_HOUR24(HOUR) |
#define | IS_RTC_MINUTES(MINUTES) |
#define | IS_RTC_SECONDS(SECONDS) |
#define | IS_RTC_HOURFORMAT12(PM) |
#define | IS_RTC_DAYLIGHT_SAVING(SAVE) |
#define | IS_RTC_STORE_OPERATION(OPERATION) |
#define | IS_RTC_FORMAT(FORMAT) |
#define | IS_RTC_YEAR(YEAR) |
#define | IS_RTC_MONTH(MONTH) |
#define | IS_RTC_DATE(DATE) |
#define | IS_RTC_WEEKDAY(WEEKDAY) |
#define | IS_RTC_ALARM_DATE_WEEKDAY_DATE(DATE) |
#define | IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(WEEKDAY) |
#define | IS_RTC_ALARM_DATE_WEEKDAY_SEL(SEL) |
#define | IS_RTC_ALARM_MASK(MASK) |
#define | IS_RTC_ALARM(ALARM) |
#define | IS_RTC_ALARM_SUB_SECOND_VALUE(VALUE) |
#define | IS_RTC_ALARM_SUB_SECOND_MASK(MASK) |
Enumerations | |
enum | HAL_RTCStateTypeDef { HAL_RTC_STATE_RESET = 0x00U , HAL_RTC_STATE_READY = 0x01U , HAL_RTC_STATE_BUSY = 0x02U , HAL_RTC_STATE_TIMEOUT = 0x03U , HAL_RTC_STATE_ERROR = 0x04U } |
HAL State structures definition. More... | |
Functions | |
HAL_StatusTypeDef | HAL_RTC_Init (RTC_HandleTypeDef *hrtc) |
Initializes the RTC peripheral. | |
HAL_StatusTypeDef | HAL_RTC_DeInit (RTC_HandleTypeDef *hrtc) |
DeInitializes the RTC peripheral. | |
void | HAL_RTC_MspInit (RTC_HandleTypeDef *hrtc) |
Initializes the RTC MSP. | |
void | HAL_RTC_MspDeInit (RTC_HandleTypeDef *hrtc) |
DeInitializes the RTC MSP. | |
HAL_StatusTypeDef | HAL_RTC_SetTime (RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format) |
Sets RTC current time. | |
HAL_StatusTypeDef | HAL_RTC_GetTime (RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format) |
Gets RTC current time. | |
HAL_StatusTypeDef | HAL_RTC_SetDate (RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format) |
Sets RTC current date. | |
HAL_StatusTypeDef | HAL_RTC_GetDate (RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format) |
Gets RTC current date. | |
HAL_StatusTypeDef | HAL_RTC_SetAlarm (RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format) |
Sets the specified RTC Alarm. | |
HAL_StatusTypeDef | HAL_RTC_SetAlarm_IT (RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format) |
Sets the specified RTC Alarm with Interrupt. | |
HAL_StatusTypeDef | HAL_RTC_DeactivateAlarm (RTC_HandleTypeDef *hrtc, uint32_t Alarm) |
Deactivates the specified RTC Alarm. | |
HAL_StatusTypeDef | HAL_RTC_GetAlarm (RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Alarm, uint32_t Format) |
Gets the RTC Alarm value and masks. | |
void | HAL_RTC_AlarmIRQHandler (RTC_HandleTypeDef *hrtc) |
Handles Alarm interrupt request. | |
HAL_StatusTypeDef | HAL_RTC_PollForAlarmAEvent (RTC_HandleTypeDef *hrtc, uint32_t Timeout) |
Handles Alarm A Polling request. | |
void | HAL_RTC_AlarmAEventCallback (RTC_HandleTypeDef *hrtc) |
Alarm A callback. | |
HAL_StatusTypeDef | HAL_RTC_WaitForSynchro (RTC_HandleTypeDef *hrtc) |
Waits until the RTC Time and Date registers (RTC_TR and RTC_DR) are synchronized with RTC APB clock. | |
void | HAL_RTC_DST_Add1Hour (RTC_HandleTypeDef *hrtc) |
Daylight Saving Time, adds one hour to the calendar in one single operation without going through the initialization procedure. | |
void | HAL_RTC_DST_Sub1Hour (RTC_HandleTypeDef *hrtc) |
Daylight Saving Time, subtracts one hour from the calendar in one single operation without going through the initialization procedure. | |
void | HAL_RTC_DST_SetStoreOperation (RTC_HandleTypeDef *hrtc) |
Daylight Saving Time, sets the store operation bit. | |
void | HAL_RTC_DST_ClearStoreOperation (RTC_HandleTypeDef *hrtc) |
Daylight Saving Time, clears the store operation bit. | |
uint32_t | HAL_RTC_DST_ReadStoreOperation (RTC_HandleTypeDef *hrtc) |
Daylight Saving Time, reads the store operation bit. | |
HAL_RTCStateTypeDef | HAL_RTC_GetState (RTC_HandleTypeDef *hrtc) |
Returns the RTC state. | |
HAL_StatusTypeDef | RTC_EnterInitMode (RTC_HandleTypeDef *hrtc) |
Enters the RTC Initialization mode. | |
HAL_StatusTypeDef | RTC_ExitInitMode (RTC_HandleTypeDef *hrtc) |
Exits the RTC Initialization mode. | |
uint8_t | RTC_ByteToBcd2 (uint8_t number) |
Converts a 2-digit number from decimal to BCD format. | |
uint8_t | RTC_Bcd2ToByte (uint8_t number) |
Converts a 2-digit number from BCD to decimal format. | |
Header file of RTC HAL module.
Copyright (c) 2016 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
Definition in file stm32f4xx_hal_rtc.h.