STM8L15x Standard Peripherals Drivers
|
Alarms (Alarm A and Alarm B) configuration functions. More...
Functions | |
ErrorStatus | RTC_AlarmCmd (FunctionalState NewState) |
Enables or disables the RTC Alarm. | |
void | RTC_AlarmStructInit (RTC_AlarmTypeDef *RTC_AlarmStruct) |
Fills each RTC_AlarmStruct member with its default value (Time = 00h:00mn:00sec / Date = 1st day of the month/Mask = all fields are masked). | |
ErrorStatus | RTC_AlarmSubSecondConfig (uint16_t RTC_AlarmSubSecondValue, RTC_AlarmSubSecondMask_TypeDef RTC_AlarmSubSecondMask) |
Configure the RTC Alarm Subseconds value and mask. | |
void | RTC_GetAlarm (RTC_Format_TypeDef RTC_Format, RTC_AlarmTypeDef *RTC_AlarmStruct) |
Gets the RTC Alarm configuration. | |
void | RTC_SetAlarm (RTC_Format_TypeDef RTC_Format, RTC_AlarmTypeDef *RTC_AlarmStruct) |
Sets the RTC Alarm configuration. |
Detailed Description
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.
Function Documentation
ErrorStatus RTC_AlarmCmd | ( | FunctionalState | NewState | ) |
Enables or disables the RTC Alarm.
Definition at line 1236 of file stm8l15x_rtc.c.
References __IO, ALRAWF_TIMEOUT, DISABLE, ERROR, IS_FUNCTIONAL_STATE, RESET, RTC, RTC_CR2_ALRAE, RTC_ISR1_ALRAWF, and SUCCESS.
void RTC_AlarmStructInit | ( | RTC_AlarmTypeDef * | RTC_AlarmStruct | ) |
Fills each RTC_AlarmStruct member with its default value (Time = 00h:00mn:00sec / Date = 1st day of the month/Mask = all fields are masked).
Definition at line 1159 of file stm8l15x_rtc.c.
References RTC_AlarmTypeDef::RTC_AlarmDateWeekDay, RTC_AlarmTypeDef::RTC_AlarmDateWeekDaySel, RTC_AlarmDateWeekDaySel_Date, RTC_AlarmTypeDef::RTC_AlarmMask, RTC_AlarmMask_All, RTC_AlarmTypeDef::RTC_AlarmTime, RTC_TimeTypeDef::RTC_H12, RTC_H12_AM, RTC_TimeTypeDef::RTC_Hours, RTC_TimeTypeDef::RTC_Minutes, and RTC_TimeTypeDef::RTC_Seconds.
ErrorStatus RTC_AlarmSubSecondConfig | ( | uint16_t | RTC_AlarmSubSecondValue, |
RTC_AlarmSubSecondMask_TypeDef | RTC_AlarmSubSecondMask | ||
) |
Configure the RTC Alarm Subseconds value and mask.
Definition at line 1292 of file stm8l15x_rtc.c.
References ERROR, IS_RTC_ALARM_SS_MASK, IS_RTC_ALARM_SS_VALUE, RESET, RTC, RTC_CR2_ALRAE, RTC_ISR1_INITF, and SUCCESS.
void RTC_GetAlarm | ( | RTC_Format_TypeDef | RTC_Format, |
RTC_AlarmTypeDef * | RTC_AlarmStruct | ||
) |
Gets the RTC Alarm configuration.
Definition at line 1182 of file stm8l15x_rtc.c.
References Bcd2ToByte(), IS_RTC_FORMAT, RTC, RTC_AlarmTypeDef::RTC_AlarmDateWeekDay, RTC_AlarmTypeDef::RTC_AlarmDateWeekDaySel, RTC_AlarmTypeDef::RTC_AlarmMask, RTC_AlarmTypeDef::RTC_AlarmTime, RTC_ALRMAR1_MSK1, RTC_ALRMAR1_ST, RTC_ALRMAR1_SU, RTC_ALRMAR2_MNT, RTC_ALRMAR2_MNU, RTC_ALRMAR2_MSK2, RTC_ALRMAR3_HT, RTC_ALRMAR3_HU, RTC_ALRMAR3_MSK3, RTC_ALRMAR3_PM, RTC_ALRMAR4_DT, RTC_ALRMAR4_DU, RTC_ALRMAR4_MSK4, RTC_ALRMAR4_WDSEL, RTC_Format_BIN, RTC_TimeTypeDef::RTC_H12, RTC_TimeTypeDef::RTC_Hours, RTC_TimeTypeDef::RTC_Minutes, and RTC_TimeTypeDef::RTC_Seconds.
void RTC_SetAlarm | ( | RTC_Format_TypeDef | RTC_Format, |
RTC_AlarmTypeDef * | RTC_AlarmStruct | ||
) |
Sets the RTC Alarm configuration.
- Note:
- Before configuring the Alarm settings, the Alarm Unit must be disabled (if enabled) using RTC_AlarmCmd(DISABLE) function.
Definition at line 1038 of file stm8l15x_rtc.c.
References Bcd2ToByte(), ByteToBcd2(), IS_RTC_ALARM_DATEWEEKDAY_SEL, IS_RTC_ALARM_MASK, IS_RTC_DATE_MAX, IS_RTC_DATE_MIN, IS_RTC_FORMAT, IS_RTC_H12, IS_RTC_HOUR12_MAX, IS_RTC_HOUR12_MIN, IS_RTC_HOUR24, IS_RTC_MINUTES, IS_RTC_SECONDS, IS_RTC_WEEKDAY, RESET, RTC, RTC_AlarmTypeDef::RTC_AlarmDateWeekDay, RTC_AlarmTypeDef::RTC_AlarmDateWeekDaySel, RTC_AlarmDateWeekDaySel_WeekDay, RTC_AlarmTypeDef::RTC_AlarmMask, RTC_AlarmMask_DateWeekDay, RTC_AlarmTypeDef::RTC_AlarmTime, RTC_ALRMAR1_MSK1, RTC_ALRMAR2_MSK2, RTC_ALRMAR3_MSK3, RTC_ALRMAR4_MSK4, RTC_CR1_FMT, RTC_Format_BIN, RTC_TimeTypeDef::RTC_H12, RTC_TimeTypeDef::RTC_Hours, RTC_TimeTypeDef::RTC_Minutes, and RTC_TimeTypeDef::RTC_Seconds.