PSoC 6 Peripheral Driver Library

General Description

Functions

cy_en_rtc_status_t Cy_RTC_SetAlarmDateAndTime (cy_stc_rtc_alarm_t const *alarmDateTime, cy_en_rtc_alarm_t alarmIndex)
 Sets alarm time and date values into the ALMx_TIME and ALMx_DATE registers. More...
 
void Cy_RTC_GetAlarmDateAndTime (cy_stc_rtc_alarm_t *alarmDateTime, cy_en_rtc_alarm_t alarmIndex)
 Returns the current alarm time and date values from the ALMx_TIME and ALMx_DATE registers. More...
 
cy_en_rtc_status_t Cy_RTC_SetAlarmDateAndTimeDirect (uint32_t sec, uint32_t min, uint32_t hour, uint32_t date, uint32_t month, cy_en_rtc_alarm_t alarmIndex)
 Sets alarm time and date values into the ALMx_TIME and ALMx_DATE registers using direct time parameters. More...
 

Function Documentation

◆ Cy_RTC_SetAlarmDateAndTime()

cy_en_rtc_status_t Cy_RTC_SetAlarmDateAndTime ( cy_stc_rtc_alarm_t const *  alarmDateTime,
cy_en_rtc_alarm_t  alarmIndex 
)

Sets alarm time and date values into the ALMx_TIME and ALMx_DATE registers.

Parameters
alarmDateTimeThe alarm configuration structure, see cy_stc_rtc_alarm_t.
alarmIndexThe alarm index to be configured, see cy_en_rtc_alarm_t.
Returns
A validation check result of date and month. Returns an error, if the date range is invalid. See cy_en_rtc_status_t.

◆ Cy_RTC_GetAlarmDateAndTime()

void Cy_RTC_GetAlarmDateAndTime ( cy_stc_rtc_alarm_t alarmDateTime,
cy_en_rtc_alarm_t  alarmIndex 
)

Returns the current alarm time and date values from the ALMx_TIME and ALMx_DATE registers.

Parameters
alarmDateTimeThe alarm configuration structure, see cy_stc_rtc_alarm_t.
alarmIndexThe alarm index to be configured, see cy_en_rtc_alarm_t.

◆ Cy_RTC_SetAlarmDateAndTimeDirect()

cy_en_rtc_status_t Cy_RTC_SetAlarmDateAndTimeDirect ( uint32_t  sec,
uint32_t  min,
uint32_t  hour,
uint32_t  date,
uint32_t  month,
cy_en_rtc_alarm_t  alarmIndex 
)

Sets alarm time and date values into the ALMx_TIME and ALMx_DATE registers using direct time parameters.

ALM_DAY_EN is default 0 (=ignore) for this function.

Parameters
secThe alarm second valid range is [0-59].
minThe alarm minute valid range is [0-59].
hourThe valid range is [0-23]. This parameter type is always in the 24-hour type. This function reads the current 12/24-hour mode, then converts the hour value properly as the mode.
dateThe valid range is [1-31], if the month of February is selected as the Month parameter, then the valid range is [0-29].
monthThe alarm month valid range is [1-12].
alarmIndexThe alarm index to be configured, see cy_en_rtc_alarm_t.
Returns
A validation check result of date and month. Returns an error, if the date range is invalid. See cy_en_rtc_status_t.