1.8.17.10 RTC_ALARM_MASK Enum

C

typedef enum
{
    /* Alarm mask to compare seconds field (SS) - Generates alarm once per minute */
    RTC_ALARM_MASK_SS,
    
    /* Alarm mask to compare minutes and seconds field (MMSS) - Generates alarm once per hour */
    RTC_ALARM_MASK_MMSS,
    
    /* Alarm mask to compare hours, minutes and seconds field (HHMMSS) - Generates alarm once per day */
    RTC_ALARM_MASK_HHMMSS,
    
    /* Alarm mask to compare date, hours, minutes, and seconds field (DDHHMMSS) - Generates alarm once per month */
    RTC_ALARM_MASK_DDHHMMSS,
    
    /* Alarm mask to compare month, date, hours, minutes and seconds (MMDDHHMMSS) - Generates alarm once per year */
    RTC_ALARM_MASK_MMDDHHMMSS,
    
    /* Alarm mask to compare year, month, date, hours, minutes and seconds (YYMMDDHHMMSS) - Generates alarm on exact day and time */
    RTC_ALARM_MASK_YYMMDDHHMMSS
    
} RTC_ALARM_MASK;

/* OR */

typedef enum
{
    RTC_ALARM_MASK_OFF = 0x00, // NO Alarm
    RTC_ALARM_MASK_SS = 0x01 , // Every minute, seconds alarm enable
    RTC_ALARM_MASK_MI = 0x02, // Minute alarm enable
    RTC_ALARM_MASK_HH = 0x04, // Hour alarm enable
    RTC_ALARM_MASK_DD = 0x08, // Date alarm enable
    RTC_ALARM_MASK_MO = 0x10, // Month alarm enable
    RTC_ALARM_MASK_MISS = 0x03, // Every hour
    RTC_ALARM_MASK_HHMISS = 0x07, // Every day
    RTC_ALARM_MASK_DDHHMISS = 0x0f, // Every month
    RTC_ALARM_MASK_MODDHHMISS = 0x1f // Every year
} RTC_ALARM_MASK;

Summary

Possible RTC Alarm Mask Settings.

Description

The RTC peripheral while operating in RTCC mode will generate an alarm by matching the configured alarm time and date with current time and date. The date and time field to be considered while matching are specified with the RTC Alarm Mask. This mask should be specified in the RTC_RTCCAlarmSet() function.

For example, setting the mask to RTC_ALARM_MASK_MMSS will only match the minute and the seconds field of the specified alarm time and will ignore all other fields.

Remarks

None.