STM8L15x Standard Peripherals Drivers: RTC_Exported_Macros

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

RTC_Exported_Macros

Defines

#define IS_RTC_ALARM_DATEWEEKDAY_SEL(SEL)
 Macro used by the assert_param function in order to check the used Alarm Date/week day selection.
#define IS_RTC_ALARM_MASK(MASK)   (((MASK) & 0x0F) == (uint8_t)(RESET))
 Macro used by the assert_param function in order to check the used Alarm Mask.
#define IS_RTC_ALARM_SS_MASK(MASK)   ((MASK) <= 0x0F)
 Macro used by the assert_param function in order to check the used Alarm sub second mask.
#define IS_RTC_ALARM_SS_VALUE(SS)   ((SS) <= 0x7FFF)
 Macro used by the assert_param function in order to check the used Alarm sub second value.
#define IS_RTC_ASYNCH_PREDIV(PREDIV)   ((PREDIV) <= 0x7F)
 Macro used by the assert_param function in order to check the used Asynchronous Predivider.
#define IS_RTC_CALOUTPUT_SELECT(SEL)
 Macro used by the assert_param function in order to check the used calibration Output Selection.
#define IS_RTC_CLEAR_FLAG(FLAG)   (((FLAG) != RESET) && ((uint16_t)((FLAG) & (uint16_t)(~(RTC_FLAG_CLRBLE))) == RESET))
#define IS_RTC_CLEAR_IT(IT)   (((IT) != RESET) && ((uint16_t)((IT) & (uint16_t)(~(uint16_t)(RTC_IT_WUT|RTC_IT_ALRA|RTC_IT_TAMP))) == RESET))
 Macro used by the assert_param function in order to check the used Interrupt to clear.
#define IS_RTC_CONFIG_IT(IT)   (((uint16_t)(IT) != (uint8_t)RESET) && ((uint16_t)((uint16_t)(IT) & (uint16_t)(~(uint16_t)(RTC_IT_WUT|RTC_IT_ALRA|RTC_IT_TAMP))) == (uint8_t)RESET))
 Macro used by the assert_param function in order to check the used Interrupt to configure.
#define IS_RTC_DATE_MAX(DATE)   ((DATE) <= (uint8_t)31)
 Macro used by the assert_param function in order to check the used Calender Date value.
#define IS_RTC_DATE_MIN(DATE)   ((DATE) >= (uint8_t)1)
#define IS_RTC_DAYLIGHT_SAVING(SAVE)
 Macro used by the assert_param function in order to check the used Daylight saving mode.
#define IS_RTC_FORMAT(FORMAT)
 Macro used by the assert_param function in order to check the used format (bin/bcd) for data user insert.
#define IS_RTC_GET_FLAG(FLAG)
 Macro used by the assert_param function in order to check the used Flag to get.
#define IS_RTC_GET_IT(IT)
 Macro used by the assert_param function in order to check the used Interrupt to get.
#define IS_RTC_H12(PM)   (((PM) == (RTC_H12_AM)) || ((PM) == (RTC_H12_PM)))
 Macro used by the assert_param function in order to check the used Calender H12 mode.
#define IS_RTC_HOUR12_MAX(HOUR)   ((HOUR) <= (uint8_t)12)
 Macro used by the assert_param function in order to check the used Calender Hours value (format 12h)
#define IS_RTC_HOUR12_MIN(HOUR)   ((HOUR) > (uint8_t)0)
#define IS_RTC_HOUR24(HOUR)   ((HOUR) <= 23)
 Macro used by the assert_param function in order to check the used Calender Hours value (format 24h)
#define IS_RTC_HOUR_FORMAT(FORMAT)
 Macro used by the assert_param function in order to check the used Calender Hour format.
#define IS_RTC_MINUTES(MINUTES)   ((MINUTES) <= 59)
 Macro used by the assert_param function in order to check the used Calender minutes value.
#define IS_RTC_MONTH_MAX(MONTH)   ((MONTH) <= (uint8_t)12)
 Macro used by the assert_param function in order to check the used Calender month value.
#define IS_RTC_MONTH_MIN(MONTH)   ((MONTH) >= (uint8_t)1)
#define IS_RTC_OUTPUT_POL(POL)
 Macro used by the assert_param function in order to check the used Output polarity.
#define IS_RTC_OUTPUT_SEL(SEL)
 Macro used by the assert_param function in order to check the used Output selection.
#define IS_RTC_OUTPUT_SELECT(SEL)
 Macro used by the assert_param function in order to check the used Output Selection.
#define IS_RTC_SECONDS(SECONDS)   ((SECONDS) <= 59)
 Macro used by the assert_param function in order to check the used Calender seconds value.
#define IS_RTC_SHIFT_ADD1S(VAL)
 Macro used by the assert_param function in order to check the parameter of 1 second to add.
#define IS_RTC_SHIFT_SUBFS(FS)   ((FS) <= 0x7FFF)
 Macro used by the assert_param function in order to check the used fraction of seconds to sub.
#define IS_RTC_SMOOTH_CALIB_MINUS(VALUE)   ((VALUE) <= 0x01FF)
 Macro used by the assert_param function in order to check the used Smooth calibration Minus pulses.
#define IS_RTC_SMOOTH_CALIB_PERIOD(SEL)
 Macro used by the assert_param function in order to check the used Smooth calibration period.
#define IS_RTC_SMOOTH_CALIB_PLUS(SEL)
 Macro used by the assert_param function in order to check the used Smooth calibration Plus pulses.
#define IS_RTC_STORE_OPERATION(OP)
 Macro used by the assert_param function in order to check the used Store Operation status.
#define IS_RTC_SYNCH_PREDIV(PREDIV)   ((PREDIV) <= 0x7FFF)
 Macro used by the assert_param function in order to check the used Synchronous Predivider.
#define IS_RTC_TAMPER(TAMPER)   (((uint8_t)((TAMPER) & NOT_CORRECT_TAMPER) == RESET) && ((TAMPER) != RESET))
#define IS_RTC_TAMPER_FILTER(SEL)
 Macro used by the assert_param function in order to check the used Tampers Filter.
#define IS_RTC_TAMPER_LEVEL(LEVEL)
 Macro used by the assert_param function in order to check the used Tamper Levels.
#define IS_RTC_TAMPER_PINS_PRECHAR_DURATION(SEL)
 Macro used by the assert_param function in order to check the used Tampers Pins precharge duration.
#define IS_RTC_TAMPER_SAMPLING_FREQ(SEL)   ((SEL) <= RTC_TamperSamplingFreq_RTCCLK_Div256)
 Macro used by the assert_param function in order to check the used Tampers Sampling Frequencies.
#define IS_RTC_WAKEUP_CLOCK(CLOCK)
 Macro used by the assert_param function in order to check the used wakeup clock source.
#define IS_RTC_WEEKDAY(WEEKDAY)
 Macro used by the assert_param function in order to check the used Calender Week day value.
#define IS_RTC_YEAR(YEAR)   ((YEAR) <= 99)
 Macro used by the assert_param function in order to check the used Calender Year value.
#define NOT_CORRECT_TAMPER
 Macro used by the assert_param function in order to check the used Tamper.
#define RTC_FLAG_CLRBLE   (RTC_FLAG_RSF | RTC_FLAG_ALRAF | RTC_FLAG_WUTF| RTC_FLAG_TAMP1F|RTC_FLAG_TAMP2F|RTC_FLAG_TAMP3F)
 Macro used by the assert_param function in order to check the used Flag to clear.

Define Documentation

#define IS_RTC_ALARM_DATEWEEKDAY_SEL (   SEL)
Value:

Macro used by the assert_param function in order to check the used Alarm Date/week day selection.

Definition at line 656 of file stm8l15x_rtc.h.

Referenced by RTC_SetAlarm().

#define IS_RTC_ALARM_MASK (   MASK)    (((MASK) & 0x0F) == (uint8_t)(RESET))

Macro used by the assert_param function in order to check the used Alarm Mask.

Definition at line 663 of file stm8l15x_rtc.h.

Referenced by RTC_SetAlarm().

#define IS_RTC_ALARM_SS_MASK (   MASK)    ((MASK) <= 0x0F)

Macro used by the assert_param function in order to check the used Alarm sub second mask.

Definition at line 846 of file stm8l15x_rtc.h.

Referenced by RTC_AlarmSubSecondConfig().

#define IS_RTC_ALARM_SS_VALUE (   SS)    ((SS) <= 0x7FFF)

Macro used by the assert_param function in order to check the used Alarm sub second value.

Definition at line 840 of file stm8l15x_rtc.h.

Referenced by RTC_AlarmSubSecondConfig().

#define IS_RTC_ASYNCH_PREDIV (   PREDIV)    ((PREDIV) <= 0x7F)

Macro used by the assert_param function in order to check the used Asynchronous Predivider.

Definition at line 580 of file stm8l15x_rtc.h.

Referenced by RTC_Init().

#define IS_RTC_CALOUTPUT_SELECT (   SEL)
Value:
(((SEL) == RTC_CalibOutput_512Hz) || \
                                       ((SEL) == RTC_CalibOutput_1Hz))

Macro used by the assert_param function in order to check the used calibration Output Selection.

Definition at line 833 of file stm8l15x_rtc.h.

Referenced by RTC_CalibOutputConfig().

#define IS_RTC_CLEAR_FLAG (   FLAG)    (((FLAG) != RESET) && ((uint16_t)((FLAG) & (uint16_t)(~(RTC_FLAG_CLRBLE))) == RESET))

Definition at line 737 of file stm8l15x_rtc.h.

Referenced by RTC_ClearFlag().

#define IS_RTC_CLEAR_IT (   IT)    (((IT) != RESET) && ((uint16_t)((IT) & (uint16_t)(~(uint16_t)(RTC_IT_WUT|RTC_IT_ALRA|RTC_IT_TAMP))) == RESET))

Macro used by the assert_param function in order to check the used Interrupt to clear.

Definition at line 757 of file stm8l15x_rtc.h.

Referenced by RTC_ClearITPendingBit().

#define IS_RTC_CONFIG_IT (   IT)    (((uint16_t)(IT) != (uint8_t)RESET) && ((uint16_t)((uint16_t)(IT) & (uint16_t)(~(uint16_t)(RTC_IT_WUT|RTC_IT_ALRA|RTC_IT_TAMP))) == (uint8_t)RESET))

Macro used by the assert_param function in order to check the used Interrupt to configure.

Definition at line 743 of file stm8l15x_rtc.h.

Referenced by RTC_ITConfig().

#define IS_RTC_DATE_MAX (   DATE)    ((DATE) <= (uint8_t)31)

Macro used by the assert_param function in order to check the used Calender Date value.

Definition at line 637 of file stm8l15x_rtc.h.

Referenced by RTC_SetAlarm(), and RTC_SetDate().

#define IS_RTC_DATE_MIN (   DATE)    ((DATE) >= (uint8_t)1)

Definition at line 638 of file stm8l15x_rtc.h.

Referenced by RTC_SetAlarm(), and RTC_SetDate().

#define IS_RTC_DAYLIGHT_SAVING (   SAVE)
Value:
(((SAVE) ==  RTC_DayLightSaving_SUB1H) || \
                                      ((SAVE) == RTC_DayLightSaving_ADD1H))

Macro used by the assert_param function in order to check the used Daylight saving mode.

Definition at line 694 of file stm8l15x_rtc.h.

Referenced by RTC_DayLightSavingConfig().

#define IS_RTC_FORMAT (   FORMAT)
Value:
(((FORMAT) == RTC_Format_BIN) || \
                               ((FORMAT) == RTC_Format_BCD))

Macro used by the assert_param function in order to check the used format (bin/bcd) for data user insert.

Definition at line 709 of file stm8l15x_rtc.h.

Referenced by RTC_GetAlarm(), RTC_GetDate(), RTC_GetTime(), RTC_SetAlarm(), RTC_SetDate(), and RTC_SetTime().

#define IS_RTC_GET_FLAG (   FLAG)
Value:
(((FLAG) == RTC_FLAG_WUTF)  || \
                               ((FLAG) == RTC_FLAG_ALRAF) || \
                               ((FLAG) == RTC_FLAG_INITF) || \
                               ((FLAG) == RTC_FLAG_RSF)   || \
                               ((FLAG) == RTC_FLAG_INITS) || \
                               ((FLAG) == RTC_FLAG_WUTWF) || \
                               ((FLAG) == RTC_FLAG_TAMP3F)|| \
                               ((FLAG) == RTC_FLAG_TAMP2F)|| \
                               ((FLAG) == RTC_FLAG_TAMP1F)|| \
                               ((FLAG) == RTC_FLAG_SHPF)  || \
                               ((FLAG) == RTC_FLAG_RECALPF) || \
                               ((FLAG) == RTC_FLAG_ALRAWF))

Macro used by the assert_param function in order to check the used Flag to get.

Definition at line 716 of file stm8l15x_rtc.h.

Referenced by RTC_GetFlagStatus().

#define IS_RTC_GET_IT (   IT)
Value:
(((IT) == RTC_IT_WUT) || \
                           ((IT) == RTC_IT_ALRA)|| \
                           ((IT) == RTC_IT_TAMP) )

Macro used by the assert_param function in order to check the used Interrupt to get.

Definition at line 749 of file stm8l15x_rtc.h.

Referenced by RTC_GetITStatus().

#define IS_RTC_H12 (   PM)    (((PM) == (RTC_H12_AM)) || ((PM) == (RTC_H12_PM)))

Macro used by the assert_param function in order to check the used Calender H12 mode.

Definition at line 617 of file stm8l15x_rtc.h.

Referenced by RTC_SetAlarm(), and RTC_SetTime().

#define IS_RTC_HOUR12_MAX (   HOUR)    ((HOUR) <= (uint8_t)12)

Macro used by the assert_param function in order to check the used Calender Hours value (format 12h)

Definition at line 592 of file stm8l15x_rtc.h.

Referenced by RTC_SetAlarm(), and RTC_SetTime().

#define IS_RTC_HOUR12_MIN (   HOUR)    ((HOUR) > (uint8_t)0)

Definition at line 593 of file stm8l15x_rtc.h.

Referenced by RTC_SetAlarm(), and RTC_SetTime().

#define IS_RTC_HOUR24 (   HOUR)    ((HOUR) <= 23)

Macro used by the assert_param function in order to check the used Calender Hours value (format 24h)

Definition at line 599 of file stm8l15x_rtc.h.

Referenced by RTC_SetAlarm(), and RTC_SetTime().

#define IS_RTC_HOUR_FORMAT (   FORMAT)
Value:
(((FORMAT) == RTC_HourFormat_12) || \
                                    ((FORMAT) == RTC_HourFormat_24))

Macro used by the assert_param function in order to check the used Calender Hour format.

Definition at line 573 of file stm8l15x_rtc.h.

Referenced by RTC_Init().

#define IS_RTC_MINUTES (   MINUTES)    ((MINUTES) <= 59)

Macro used by the assert_param function in order to check the used Calender minutes value.

Definition at line 605 of file stm8l15x_rtc.h.

Referenced by RTC_SetAlarm(), and RTC_SetTime().

#define IS_RTC_MONTH_MAX (   MONTH)    ((MONTH) <= (uint8_t)12)

Macro used by the assert_param function in order to check the used Calender month value.

Definition at line 630 of file stm8l15x_rtc.h.

Referenced by RTC_SetDate().

#define IS_RTC_MONTH_MIN (   MONTH)    ((MONTH) >= (uint8_t)1)

Definition at line 631 of file stm8l15x_rtc.h.

Referenced by RTC_SetDate().

#define IS_RTC_OUTPUT_POL (   POL)
Value:
(((POL) == RTC_OutputPolarity_High) || \
                                ((POL) == RTC_OutputPolarity_Low))

Macro used by the assert_param function in order to check the used Output polarity.

Definition at line 687 of file stm8l15x_rtc.h.

Referenced by RTC_OutputConfig().

#define IS_RTC_OUTPUT_SEL (   SEL)
Value:
(((SEL) == RTC_Output_Disable) || \
                                ((SEL) == RTC_Output_Alarm) || \
                                ((SEL) == RTC_Output_WakeUp))

Macro used by the assert_param function in order to check the used Output selection.

Definition at line 680 of file stm8l15x_rtc.h.

Referenced by RTC_OutputConfig().

#define IS_RTC_OUTPUT_SELECT (   SEL)
Value:
(((SEL) == RTC_Output_Disable) || \
                                    ((SEL) == RTC_Output_Alarm) || \
                                    ((SEL) == RTC_Output_WakeUp))

Macro used by the assert_param function in order to check the used Output Selection.

Definition at line 825 of file stm8l15x_rtc.h.

#define IS_RTC_SECONDS (   SECONDS)    ((SECONDS) <= 59)

Macro used by the assert_param function in order to check the used Calender seconds value.

Definition at line 611 of file stm8l15x_rtc.h.

Referenced by RTC_SetAlarm(), and RTC_SetTime().

#define IS_RTC_SHIFT_ADD1S (   VAL)
Value:
(((VAL) == RTC_ShiftAdd1S_Set) || \
                                 ((VAL) == RTC_ShiftAdd1S_Reset))

Macro used by the assert_param function in order to check the parameter of 1 second to add.

Definition at line 858 of file stm8l15x_rtc.h.

Referenced by RTC_SynchroShiftConfig().

#define IS_RTC_SHIFT_SUBFS (   FS)    ((FS) <= 0x7FFF)

Macro used by the assert_param function in order to check the used fraction of seconds to sub.

Definition at line 852 of file stm8l15x_rtc.h.

Referenced by RTC_SynchroShiftConfig().

#define IS_RTC_SMOOTH_CALIB_MINUS (   VALUE)    ((VALUE) <= 0x01FF)

Macro used by the assert_param function in order to check the used Smooth calibration Minus pulses.

Definition at line 819 of file stm8l15x_rtc.h.

Referenced by RTC_SmoothCalibConfig().

#define IS_RTC_SMOOTH_CALIB_PERIOD (   SEL)
Value:

Macro used by the assert_param function in order to check the used Smooth calibration period.

Definition at line 805 of file stm8l15x_rtc.h.

Referenced by RTC_SmoothCalibConfig().

#define IS_RTC_SMOOTH_CALIB_PLUS (   SEL)
Value:

Macro used by the assert_param function in order to check the used Smooth calibration Plus pulses.

Definition at line 813 of file stm8l15x_rtc.h.

Referenced by RTC_SmoothCalibConfig().

#define IS_RTC_STORE_OPERATION (   OP)
Value:

Macro used by the assert_param function in order to check the used Store Operation status.

Definition at line 701 of file stm8l15x_rtc.h.

Referenced by RTC_DayLightSavingConfig().

#define IS_RTC_SYNCH_PREDIV (   PREDIV)    ((PREDIV) <= 0x7FFF)

Macro used by the assert_param function in order to check the used Synchronous Predivider.

Definition at line 586 of file stm8l15x_rtc.h.

Referenced by RTC_Init().

#define IS_RTC_TAMPER (   TAMPER)    (((uint8_t)((TAMPER) & NOT_CORRECT_TAMPER) == RESET) && ((TAMPER) != RESET))

Definition at line 773 of file stm8l15x_rtc.h.

Referenced by RTC_TamperCmd(), and RTC_TamperLevelConfig().

#define IS_RTC_TAMPER_FILTER (   SEL)
Value:
(((SEL) == RTC_TamperFilter_1Sample) || \
                                   ((SEL) == RTC_TamperFilter_2Sample) || \
                                   ((SEL) == RTC_TamperFilter_4Sample) || \
                                   ((SEL) == RTC_TamperFilter_8Sample))

Macro used by the assert_param function in order to check the used Tampers Filter.

Definition at line 779 of file stm8l15x_rtc.h.

Referenced by RTC_TamperFilterConfig().

#define IS_RTC_TAMPER_LEVEL (   LEVEL)
Value:
(((LEVEL) == RTC_TamperLevel_Low) || \
                                    ((LEVEL) == RTC_TamperLevel_High))

Macro used by the assert_param function in order to check the used Tamper Levels.

Definition at line 763 of file stm8l15x_rtc.h.

Referenced by RTC_TamperLevelConfig().

#define IS_RTC_TAMPER_PINS_PRECHAR_DURATION (   SEL)
Value:

Macro used by the assert_param function in order to check the used Tampers Pins precharge duration.

Definition at line 795 of file stm8l15x_rtc.h.

Referenced by RTC_TamperPinsPrechargeDuration().

#define IS_RTC_TAMPER_SAMPLING_FREQ (   SEL)    ((SEL) <= RTC_TamperSamplingFreq_RTCCLK_Div256)

Macro used by the assert_param function in order to check the used Tampers Sampling Frequencies.

Definition at line 788 of file stm8l15x_rtc.h.

Referenced by RTC_TamperSamplingFreqConfig().

#define IS_RTC_WAKEUP_CLOCK (   CLOCK)
Value:

Macro used by the assert_param function in order to check the used wakeup clock source.

Definition at line 669 of file stm8l15x_rtc.h.

Referenced by RTC_WakeUpClockConfig().

#define IS_RTC_WEEKDAY (   WEEKDAY)
Value:
(((WEEKDAY) ==   RTC_Weekday_Monday)    || \
                                 ((WEEKDAY) ==   RTC_Weekday_Tuesday)   || \
                                 ((WEEKDAY) ==   RTC_Weekday_Wednesday) || \
                                 ((WEEKDAY) ==   RTC_Weekday_Thursday)  || \
                                 ((WEEKDAY) ==   RTC_Weekday_Friday)    || \
                                 ((WEEKDAY) ==   RTC_Weekday_Saturday)  || \
                                 ((WEEKDAY) ==   RTC_Weekday_Sunday))

Macro used by the assert_param function in order to check the used Calender Week day value.

Definition at line 644 of file stm8l15x_rtc.h.

Referenced by RTC_SetAlarm(), and RTC_SetDate().

#define IS_RTC_YEAR (   YEAR)    ((YEAR) <= 99)

Macro used by the assert_param function in order to check the used Calender Year value.

Definition at line 624 of file stm8l15x_rtc.h.

Referenced by RTC_SetDate().

#define NOT_CORRECT_TAMPER
Value:

Macro used by the assert_param function in order to check the used Tamper.

Definition at line 770 of file stm8l15x_rtc.h.

#define RTC_FLAG_CLRBLE   (RTC_FLAG_RSF | RTC_FLAG_ALRAF | RTC_FLAG_WUTF| RTC_FLAG_TAMP1F|RTC_FLAG_TAMP2F|RTC_FLAG_TAMP3F)

Macro used by the assert_param function in order to check the used Flag to clear.

Definition at line 736 of file stm8l15x_rtc.h.

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com