MTB CAT1 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.
Note
The function may return CY_RTC_INVALID_STATE if the RTC is busy with previous update. In such situation, user should call this function repetitively with appropriate parameters to ensure that RTC is updated with provided arguments.

◆ 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.