STM32L443xx HAL User Manual
|
RTC Time and Date functions. More...
Functions | |
HAL_StatusTypeDef | HAL_RTC_SetTime (RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format) |
Set RTC current time. | |
HAL_StatusTypeDef | HAL_RTC_GetTime (RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format) |
Get RTC current time. | |
HAL_StatusTypeDef | HAL_RTC_SetDate (RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format) |
Set RTC current date. | |
HAL_StatusTypeDef | HAL_RTC_GetDate (RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format) |
Get RTC current date. | |
void | HAL_RTC_DST_Add1Hour (RTC_HandleTypeDef *hrtc) |
Daylight Saving Time, Add 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, Substract 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, Set the store operation bit. | |
void | HAL_RTC_DST_ClearStoreOperation (RTC_HandleTypeDef *hrtc) |
Daylight Saving Time, Clear the store operation bit. | |
uint32_t | HAL_RTC_DST_ReadStoreOperation (RTC_HandleTypeDef *hrtc) |
Daylight Saving Time, Read the store operation bit. |
RTC Time and Date functions.
=============================================================================== ##### RTC Time and Date functions ##### =============================================================================== [..] This section provides functions allowing to configure Time and Date features
void HAL_RTC_DST_Add1Hour | ( | RTC_HandleTypeDef * | hrtc | ) |
Daylight Saving Time, Add one hour to the calendar in one single operation without going through the initialization procedure.
hrtc | RTC handle |
None |
Definition at line 2275 of file stm32l4xx_hal_rtc.c.
References __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, and __RTC_HandleTypeDef::Instance.
void HAL_RTC_DST_ClearStoreOperation | ( | RTC_HandleTypeDef * | hrtc | ) |
Daylight Saving Time, Clear the store operation bit.
hrtc | RTC handle |
None |
Definition at line 2313 of file stm32l4xx_hal_rtc.c.
References __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, and __RTC_HandleTypeDef::Instance.
uint32_t HAL_RTC_DST_ReadStoreOperation | ( | RTC_HandleTypeDef * | hrtc | ) |
Daylight Saving Time, Read the store operation bit.
hrtc | RTC handle |
operation | see RTC_StoreOperation_Definitions |
Definition at line 2325 of file stm32l4xx_hal_rtc.c.
References __RTC_HandleTypeDef::Instance.
void HAL_RTC_DST_SetStoreOperation | ( | RTC_HandleTypeDef * | hrtc | ) |
Daylight Saving Time, Set the store operation bit.
hrtc | RTC handle |
None |
Definition at line 2301 of file stm32l4xx_hal_rtc.c.
References __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, and __RTC_HandleTypeDef::Instance.
void HAL_RTC_DST_Sub1Hour | ( | RTC_HandleTypeDef * | hrtc | ) |
Daylight Saving Time, Substract one hour from the calendar in one single operation without going through the initialization procedure.
hrtc | RTC handle |
None |
Definition at line 2288 of file stm32l4xx_hal_rtc.c.
References __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, and __RTC_HandleTypeDef::Instance.
HAL_StatusTypeDef HAL_RTC_GetDate | ( | RTC_HandleTypeDef * | hrtc, |
RTC_DateTypeDef * | sDate, | ||
uint32_t | Format | ||
) |
Get RTC current date.
hrtc | RTC handle |
sDate | Pointer to Date structure |
Format | Specifies the format of the entered parameters. This parameter can be one of the following values:
|
HAL | status |
Definition at line 1680 of file stm32l4xx_hal_rtc.c.
References assert_param, RTC_DateTypeDef::Date, __RTC_HandleTypeDef::Instance, IS_RTC_FORMAT, RTC_DateTypeDef::Month, RTC_Bcd2ToByte(), RTC_DR_RESERVED_MASK, RTC_FORMAT_BIN, RTC_DateTypeDef::WeekDay, and RTC_DateTypeDef::Year.
HAL_StatusTypeDef HAL_RTC_GetTime | ( | RTC_HandleTypeDef * | hrtc, |
RTC_TimeTypeDef * | sTime, | ||
uint32_t | Format | ||
) |
Get RTC current time.
hrtc | RTC handle |
sTime | Pointer to Time structure with Hours, Minutes and Seconds fields returned with input format (BIN or BCD), also SubSeconds field returning the RTC_SSR register content and SecondFraction field the Synchronous pre-scaler factor to be used for second fraction ratio computation. |
Format | Specifies the format of the entered parameters. This parameter can be one of the following values:
|
HAL | status |
Definition at line 1552 of file stm32l4xx_hal_rtc.c.
References assert_param, RTC_TimeTypeDef::Hours, __RTC_HandleTypeDef::Instance, IS_RTC_FORMAT, RTC_TimeTypeDef::Minutes, RTC_Bcd2ToByte(), RTC_FORMAT_BIN, RTC_TR_RESERVED_MASK, RTC_TimeTypeDef::SecondFraction, RTC_TimeTypeDef::Seconds, RTC_TimeTypeDef::SubSeconds, and RTC_TimeTypeDef::TimeFormat.
HAL_StatusTypeDef HAL_RTC_SetDate | ( | RTC_HandleTypeDef * | hrtc, |
RTC_DateTypeDef * | sDate, | ||
uint32_t | Format | ||
) |
Set RTC current date.
hrtc | RTC handle |
sDate | Pointer to date structure |
Format | specifies the format of the entered parameters. This parameter can be one of the following values:
|
HAL | status |
Definition at line 1596 of file stm32l4xx_hal_rtc.c.
References __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, assert_param, RTC_DateTypeDef::Date, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, __RTC_HandleTypeDef::Instance, IS_RTC_DATE, IS_RTC_FORMAT, IS_RTC_MONTH, IS_RTC_WEEKDAY, IS_RTC_YEAR, RTC_DateTypeDef::Month, RTC_Bcd2ToByte(), RTC_ByteToBcd2(), RTC_DR_RESERVED_MASK, RTC_EnterInitMode(), RTC_ExitInitMode(), RTC_FORMAT_BIN, __RTC_HandleTypeDef::State, RTC_DateTypeDef::WeekDay, and RTC_DateTypeDef::Year.
HAL_StatusTypeDef HAL_RTC_SetTime | ( | RTC_HandleTypeDef * | hrtc, |
RTC_TimeTypeDef * | sTime, | ||
uint32_t | Format | ||
) |
Set RTC current time.
hrtc | RTC handle |
sTime | Pointer to Time structure |
Format | Specifies the format of the entered parameters. This parameter can be one of the following values:
|
HAL | status |
Definition at line 1442 of file stm32l4xx_hal_rtc.c.
References __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, assert_param, RTC_TimeTypeDef::DayLightSaving, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, RTC_TimeTypeDef::Hours, __RTC_HandleTypeDef::Instance, IS_RTC_DAYLIGHT_SAVING, IS_RTC_FORMAT, IS_RTC_HOUR12, IS_RTC_HOUR24, IS_RTC_HOURFORMAT12, IS_RTC_MINUTES, IS_RTC_SECONDS, IS_RTC_STORE_OPERATION, RTC_TimeTypeDef::Minutes, RTC_Bcd2ToByte(), RTC_ByteToBcd2(), RTC_EnterInitMode(), RTC_ExitInitMode(), RTC_FORMAT_BIN, RTC_TR_RESERVED_MASK, RTC_TimeTypeDef::Seconds, __RTC_HandleTypeDef::State, RTC_TimeTypeDef::StoreOperation, and RTC_TimeTypeDef::TimeFormat.