R_RTC_Set_AlarmValue


Sets the alarm conditions (weekday, hour, minute).

[Syntax]

#include    "r_cg_macrodriver.h"
#include    "r_cg_rtc.h"
void    R_RTC_Set_AlarmValue ( rtc_alarm_value_t alarm_val );

[Argument(s)]

I/O

Argument

Description

I

rtc_alarm_value_t alarm_val;

Alarm conditions (weekday, hour, minute)

Remark

Below is shown the structure rtc_alarm_value_t (alarm conditions).(The structure is different according to the device.)

typedef struct {
    uint8_t sec;    /* Second */
    uint8_t min;    /* Minute */
    uint8_t hour;   /* Hour */
    uint8_t week;   /* Weekday (0: Sunday, 6: Saturday) */
    uint8_t day;    /* Day */
    uint8_t month;  /* Month */
    uint16_t year;  /* Year */
} rtc_alarm_value_t;

 

-

alarmws (Second)

Below are shown the meanings of each bit of the structure member alarmws.

 

-

alarmwm (Minute)

Below are shown the meanings of each bit of the structure member alarmwm.

 

 

-

alarmwh (Hour)

Below are shown the meanings of each bit of the structure member alarmwh.

If the real-time clock is set to the 12-hour clock, then bit 5 has the following meaning.

0: AM

1: PM

 

-

alarmww (Weekday)

Below are shown the meanings of each bit of the structure member alarmww.

 

-

alarmwd (Day)

Below are shown the meanings of each bit of the structure member alarmwd.

 

-

alarmwmn (Month)

Below are shown the meanings of each bit of the structure member alarmwmn.

 

 

 

-

alarmwy (Year)

Below are shown the meanings of each bit of the structure member alarmwmn.

 

 

[Return value]

None.