Alarms (Alarm A and Alarm B) configuration functions.
More...
Alarms (Alarm A and Alarm B) configuration functions.
===============================================================================
Alarms (Alarm A and Alarm B) configuration functions
===============================================================================
This section provide functions allowing to program and read the RTC Alarms.
ErrorStatus RTC_AlarmCmd |
( |
uint32_t |
RTC_Alarm, |
|
|
FunctionalState |
NewState |
|
) |
| |
Enables or disables the specified RTC Alarm.
- Parameters
-
RTC_Alarm,: | specifies the alarm to be configured. This parameter can be any combination of the following values:
- RTC_Alarm_A: to select Alarm A
- RTC_Alarm_B: to select Alarm B
|
NewState,: | new state of the specified alarm. This parameter can be: ENABLE or DISABLE. |
- Return values
-
An | ErrorStatus enumeration value:
- SUCCESS: RTC Alarm is enabled/disabled
- ERROR: RTC Alarm is not enabled/disabled
|
Fills each RTC_AlarmStruct member with its default value (Time = 00h:00mn:00sec / Date = 1st day of the month/Mask = all fields are masked).
- Parameters
-
RTC_AlarmStruct,: | pointer to a RTC_AlarmTypeDef structure which will be initialized. |
- Return values
-
void RTC_GetAlarm |
( |
uint32_t |
RTC_Format, |
|
|
uint32_t |
RTC_Alarm, |
|
|
RTC_AlarmTypeDef * |
RTC_AlarmStruct |
|
) |
| |
Get the RTC Alarm value and masks.
- Parameters
-
RTC_Format,: | specifies the format of the output parameters. This parameter can be one of the following values:
- RTC_Format_BIN: Binary data format
- RTC_Format_BCD: BCD data format
|
RTC_Alarm,: | specifies the alarm to be read. This parameter can be one of the following values:
- RTC_Alarm_A: to select Alarm A
- RTC_Alarm_B: to select Alarm B
|
RTC_AlarmStruct,: | pointer to a RTC_AlarmTypeDef structure that will contains the output alarm configuration values. |
- Return values
-
void RTC_SetAlarm |
( |
uint32_t |
RTC_Format, |
|
|
uint32_t |
RTC_Alarm, |
|
|
RTC_AlarmTypeDef * |
RTC_AlarmStruct |
|
) |
| |
Set the specified RTC Alarm.
- Note
- The Alarm register can only be written when the corresponding Alarm is disabled (Use the RTC_AlarmCmd(DISABLE)).
- 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_Alarm,: | specifies the alarm to be configured. This parameter can be one of the following values:
- RTC_Alarm_A: to select Alarm A
- RTC_Alarm_B: to select Alarm B
|
RTC_AlarmStruct,: | pointer to a RTC_AlarmTypeDef structure that contains the alarm configuration parameters. |
- Return values
-