Sets the condition for the alarm interrupt (ALM) and allows detection of ALM (calendar count mode).
[Syntax]
#include "r_cg_rtc.h"
void R_RTC_Set_CalendarAlarm ( rtc_calendar_alarm_enable_t alarm_enable,
rtc_calendar_alarm_value_t alarm_val );
[Argument(s)]
I/O |
Argument |
Description |
I |
rtc_calendar_alarm_enable_t alarm_enable; |
Comparison flags (year, month, date, day-of-the-week, hour, minute, and second). 0x0 : Comparison proceeds 0x1 : Comparison does not proceed |
I |
rtc_calendar_alarm_value_t alarm_val; |
Calendar and time values (year, month, date, day-of-week, time, minute, and second) |
Remark 1. The configuration of the comparison flag structure rtc_calendar_alarm_enable_t is shown below.
typedef struct { uint8_t sec_enb; /* Second */ uint8_t min_enb; /* Minute */ uint8_t hr_enb; /* Time */ uint8_t day_enb; /* Date */ uint8_t wk_enb; /* Day-of-week */ uint8_t mon_enb; /* Month */ uint8_t yr_enb; /* Year */ } rtc_calendar_alarm_enable_t; |
Remark 2. The configuration of the calendar and time values rtc_calendar_alarm_value_t is shown below.
typedef struct { uint8_t rsecar; /* second */ uint8_t rminar; /* Minute */ uint8_t rhrar; /* Time */ uint8_t rdayar; /* Date */ uint8_t rwkar; /* Day-of-week (0: Sunday, 6: Saturday) */ uint8_t rmonar; /* Month */ uint16_t ryrar; /* Year */ } rtc_calendar_alarm_value_t; |
[Return value]
None.