RTEMS 6.1-rc2
|
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_PUSHPULL RTC_OR_ALARMOUTTYPE |
#define | RTC_OUTPUT_TYPE_OPENDRAIN 0x00000000u |
#define | RTC_ALARM_OUTPUT_TYPE RTC_OR_ALARMOUTTYPE |
#define | RTC_OUTPUT_REMAP_NONE 0x00000000u |
#define | RTC_OUTPUT_REMAP_POS1 RTC_OR_OUT_RMP |
#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_ALRA RTC_CR_ALRAIE |
#define | RTC_IT_ALRB RTC_CR_ALRBIE |
#define | RTC_FLAG_RECALPF RTC_ISR_RECALPF |
#define | RTC_FLAG_TSOVF RTC_ISR_TSOVF |
#define | RTC_FLAG_TSF RTC_ISR_TSF |
#define | RTC_FLAG_ITSF RTC_ISR_ITSF |
#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__) ((__HANDLE__)->State = HAL_RTC_STATE_RESET) |
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__) (((((__HANDLE__)->Instance->ISR) & (RTC_FLAG_INITS)) == RTC_FLAG_INITS) ? 1U : 0U) |
Check whether the RTC Calendar is initialized. | |
#define | __HAL_RTC_DAYLIGHT_SAVING_TIME_ADD1H(__HANDLE__, __BKP__) |
Add 1 hour (summer time change). | |
#define | __HAL_RTC_DAYLIGHT_SAVING_TIME_SUB1H(__HANDLE__, __BKP__) |
Subtract 1 hour (winter time change). | |
#define | __HAL_RTC_ALARMA_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRAE)) |
Enable the RTC ALARMA peripheral. | |
#define | __HAL_RTC_ALARMA_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRAE)) |
Disable the RTC ALARMA peripheral. | |
#define | __HAL_RTC_ALARMB_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRBE)) |
Enable the RTC ALARMB peripheral. | |
#define | __HAL_RTC_ALARMB_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRBE)) |
Disable the RTC ALARMB peripheral. | |
#define | __HAL_RTC_ALARM_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__)) |
Enable the RTC Alarm interrupt. | |
#define | __HAL_RTC_ALARM_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__)) |
Disable the RTC Alarm interrupt. | |
#define | __HAL_RTC_ALARM_GET_IT(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->ISR)& (__INTERRUPT__ >> 4)) != 0U)? 1U : 0U) |
Check whether the specified RTC Alarm interrupt has occurred or not. | |
#define | __HAL_RTC_ALARM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != 0U) ? 1U : 0U) |
Check whether the specified RTC Alarm interrupt has been enabled or not. | |
#define | __HAL_RTC_ALARM_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != 0U) ? 1U : 0U) |
Get the selected RTC Alarm's flag status. | |
#define | __HAL_RTC_ALARM_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))) |
Clear the RTC Alarm's pending flags. | |
#define | __HAL_RTC_ALARM_EXTI_ENABLE_IT() (EXTI->IMR1 |= RTC_EXTI_LINE_ALARM_EVENT) |
Enable interrupt on the RTC Alarm associated Exti line. | |
#define | __HAL_RTC_ALARM_EXTI_DISABLE_IT() (EXTI->IMR1 &= ~(RTC_EXTI_LINE_ALARM_EVENT)) |
Disable interrupt on the RTC Alarm associated Exti line. | |
#define | __HAL_RTC_ALARM_EXTI_ENABLE_EVENT() (EXTI->EMR1 |= RTC_EXTI_LINE_ALARM_EVENT) |
Enable event on the RTC Alarm associated Exti line. | |
#define | __HAL_RTC_ALARM_EXTI_DISABLE_EVENT() (EXTI->EMR1 &= ~(RTC_EXTI_LINE_ALARM_EVENT)) |
Disable event on the RTC Alarm associated Exti line. | |
#define | __HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE() (EXTI->FTSR1 |= RTC_EXTI_LINE_ALARM_EVENT) |
Enable falling edge trigger on the RTC Alarm associated Exti line. | |
#define | __HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE() (EXTI->FTSR1 &= ~(RTC_EXTI_LINE_ALARM_EVENT)) |
Disable falling edge trigger on the RTC Alarm associated Exti line. | |
#define | __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE() (EXTI->RTSR1 |= RTC_EXTI_LINE_ALARM_EVENT) |
Enable rising edge trigger on the RTC Alarm associated Exti line. | |
#define | __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE() (EXTI->RTSR1 &= ~(RTC_EXTI_LINE_ALARM_EVENT)) |
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() (EXTI->PR1 & RTC_EXTI_LINE_ALARM_EVENT) |
Check whether the RTC Alarm associated Exti line interrupt flag is set or not. | |
#define | __HAL_RTC_ALARM_EXTI_CLEAR_FLAG() (EXTI->PR1 = (RTC_EXTI_LINE_ALARM_EVENT)) |
Clear the RTC Alarm associated Exti line flag. | |
#define | __HAL_RTC_ALARM_EXTI_GENERATE_SWIT() (EXTI->SWIER1 |= RTC_EXTI_LINE_ALARM_EVENT) |
Generate a Software interrupt on RTC Alarm associated Exti line. | |
#define | RTC_TR_RESERVED_MASK |
#define | RTC_DR_RESERVED_MASK |
#define | RTC_INIT_MASK 0xFFFFFFFFu |
#define | RTC_ISR_RESERVED_MASK 0x0003FFFFu |
#define | RTC_RSF_MASK (~(RTC_ISR_INIT | RTC_ISR_RSF)) |
#define | RTC_TIMEOUT_VALUE 1000u |
#define | RTC_EXTI_LINE_ALARM_EVENT EXTI_IMR1_IM17 |
#define | IS_RTC_OUTPUT(OUTPUT) |
#define | IS_RTC_HOUR_FORMAT(FORMAT) |
#define | IS_RTC_OUTPUT_POL(POL) |
#define | IS_RTC_OUTPUT_TYPE(TYPE) |
#define | IS_RTC_OUTPUT_REMAP(REMAP) |
#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) ((YEAR) <= 99u) |
#define | IS_RTC_MONTH(MONTH) (((MONTH) >= 1u) && ((MONTH) <= 12u)) |
#define | IS_RTC_DATE(DATE) (((DATE) >= 1u) && ((DATE) <= 31u)) |
#define | IS_RTC_WEEKDAY(WEEKDAY) |
#define | IS_RTC_ALARM_DATE_WEEKDAY_DATE(DATE) (((DATE) > 0u) && ((DATE) <= 31u)) |
#define | IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(WEEKDAY) |
#define | IS_RTC_ALARM_DATE_WEEKDAY_SEL(SEL) |
#define | IS_RTC_ALARM_MASK(MASK) (((MASK) & ~(RTC_ALARMMASK_ALL)) == 0u) |
#define | IS_RTC_ALARM(ALARM) |
#define | IS_RTC_ALARM_SUB_SECOND_VALUE(VALUE) ((VALUE) <= RTC_ALRMASSR_SS) |
#define | IS_RTC_ALARM_SUB_SECOND_MASK(MASK) |
#define | IS_RTC_ASYNCH_PREDIV(PREDIV) ((PREDIV) <= (RTC_PRER_PREDIV_A >> RTC_PRER_PREDIV_A_Pos)) |
#define | IS_RTC_SYNCH_PREDIV(PREDIV) ((PREDIV) <= (RTC_PRER_PREDIV_S >> RTC_PRER_PREDIV_S_Pos)) |
#define | IS_RTC_HOUR12(HOUR) (((HOUR) > 0u) && ((HOUR) <= 12u)) |
#define | IS_RTC_HOUR24(HOUR) ((HOUR) <= 23u) |
#define | IS_RTC_MINUTES(MINUTES) ((MINUTES) <= 59u) |
#define | IS_RTC_SECONDS(SECONDS) ((SECONDS) <= 59u) |
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) |
HAL_StatusTypeDef | HAL_RTC_DeInit (RTC_HandleTypeDef *hrtc) |
void | HAL_RTC_MspInit (RTC_HandleTypeDef *hrtc) |
void | HAL_RTC_MspDeInit (RTC_HandleTypeDef *hrtc) |
HAL_StatusTypeDef | HAL_RTC_SetTime (RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format) |
HAL_StatusTypeDef | HAL_RTC_GetTime (RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format) |
HAL_StatusTypeDef | HAL_RTC_SetDate (RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format) |
HAL_StatusTypeDef | HAL_RTC_GetDate (RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format) |
HAL_StatusTypeDef | HAL_RTC_SetAlarm (RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format) |
HAL_StatusTypeDef | HAL_RTC_SetAlarm_IT (RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format) |
HAL_StatusTypeDef | HAL_RTC_DeactivateAlarm (RTC_HandleTypeDef *hrtc, uint32_t Alarm) |
HAL_StatusTypeDef | HAL_RTC_GetAlarm (RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Alarm, uint32_t Format) |
void | HAL_RTC_AlarmIRQHandler (RTC_HandleTypeDef *hrtc) |
void | HAL_RTC_AlarmAEventCallback (RTC_HandleTypeDef *hrtc) |
ALARM A Event Callback in non blocking mode. | |
HAL_StatusTypeDef | HAL_RTC_PollForAlarmAEvent (RTC_HandleTypeDef *hrtc, uint32_t Timeout) |
HAL_StatusTypeDef | HAL_RTC_WaitForSynchro (RTC_HandleTypeDef *hrtc) |
HAL_RTCStateTypeDef | HAL_RTC_GetState (RTC_HandleTypeDef *hrtc) |
HAL_StatusTypeDef | RTC_EnterInitMode (RTC_HandleTypeDef *hrtc) |
HAL_StatusTypeDef | RTC_ExitInitMode (RTC_HandleTypeDef *hrtc) |
uint8_t | RTC_ByteToBcd2 (uint8_t Value) |
uint8_t | RTC_Bcd2ToByte (uint8_t Value) |
Header file of RTC HAL module.
Copyright (c) 2017 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.