Time and Date configuration functions.
More...
Time and Date configuration functions.
===============================================================================
##### Time and Date configuration functions #####
===============================================================================
[..] This section provide functions allowing to program and read the RTC Calendar
(Time and Date).
Fills each RTC_DateStruct member with its default value (Monday, January 01 xx00).
- Parameters
-
RTC_DateStruct | pointer to a RTC_DateTypeDef structure which will be initialized. |
- Return values
-
Definition at line 1036 of file stm32f4xx_rtc.c.
Get the RTC current date.
- Parameters
-
RTC_Format | specifies the format of the returned parameters. This parameter can be one of the following values:
- RTC_Format_BIN: Binary data format
- RTC_Format_BCD: BCD data format
|
RTC_DateStruct | pointer to a RTC_DateTypeDef structure that will contain the returned current date configuration. |
- Return values
-
Definition at line 1055 of file stm32f4xx_rtc.c.
uint32_t RTC_GetSubSecond |
( |
void |
| ) |
|
Gets the RTC current Calendar Sub seconds value.
- Note
- This function freeze the Time and Date registers after reading the SSR register.
- Parameters
-
- Return values
-
RTC | current Calendar Sub seconds value. |
Definition at line 920 of file stm32f4xx_rtc.c.
Get the RTC current Time.
- Parameters
-
RTC_Format | specifies the format of the returned parameters. This parameter can be one of the following values:
- RTC_Format_BIN: Binary data format
- RTC_Format_BCD: BCD data format
|
RTC_TimeStruct | pointer to a RTC_TimeTypeDef structure that will contain the returned current time configuration. |
- Return values
-
Definition at line 887 of file stm32f4xx_rtc.c.
ErrorStatus RTC_SetDate |
( |
uint32_t |
RTC_Format, |
|
|
RTC_DateTypeDef * |
RTC_DateStruct |
|
) |
| |
Set the RTC current date.
- Parameters
-
RTC_Format | specifies the format of the entered parameters. This parameter can be one of the following values:
- RTC_Format_BIN: Binary data format
- RTC_Format_BCD: BCD data format
|
RTC_DateStruct | pointer to a RTC_DateTypeDef structure that contains the date configuration information for the RTC. |
- Return values
-
An | ErrorStatus enumeration value:
- SUCCESS: RTC Date register is configured
- ERROR: RTC Date register is not configured
|
Definition at line 945 of file stm32f4xx_rtc.c.
ErrorStatus RTC_SetTime |
( |
uint32_t |
RTC_Format, |
|
|
RTC_TimeTypeDef * |
RTC_TimeStruct |
|
) |
| |
Set the RTC current time.
- Parameters
-
RTC_Format | specifies the format of the entered parameters. This parameter can be one of the following values:
- RTC_Format_BIN: Binary data format
- RTC_Format_BCD: BCD data format
|
RTC_TimeStruct | pointer to a RTC_TimeTypeDef structure that contains the time configuration information for the RTC. |
- Return values
-
An | ErrorStatus enumeration value:
- SUCCESS: RTC Time register is configured
- ERROR: RTC Time register is not configured
|
Definition at line 765 of file stm32f4xx_rtc.c.
Fills each RTC_TimeStruct member with its default value (Time = 00h:00min:00sec).
- Parameters
-
RTC_TimeStruct | pointer to a RTC_TimeTypeDef structure which will be initialized. |
- Return values
-
Definition at line 868 of file stm32f4xx_rtc.c.