Functions | |
cy_en_rtc_status_t | Cy_RTC_EnableDstTime (cy_stc_rtc_dst_t const *dstTime, cy_stc_rtc_config_t const *timeDate) |
The function sets the DST time, configures the DST start time when the specified time is outside DST period and configures the ALARM2 interrupt register with the appropriate DST time. More... | |
cy_en_rtc_status_t | Cy_RTC_SetNextDstTime (cy_stc_rtc_dst_format_t const *nextDst) |
A low-level DST function sets ALARM2 for a next DST event. More... | |
bool | Cy_RTC_GetDstStatus (cy_stc_rtc_dst_t const *dstTime, cy_stc_rtc_config_t const *timeDate) |
A low-level DST function returns the current DST status using given time information. More... | |
cy_en_rtc_status_t Cy_RTC_EnableDstTime | ( | cy_stc_rtc_dst_t const * | dstTime, |
cy_stc_rtc_config_t const * | timeDate | ||
) |
The function sets the DST time, configures the DST start time when the specified time is outside DST period and configures the ALARM2 interrupt register with the appropriate DST time.
This function sets the DST stop time if the specified time is already in the DST period. The DST period is a period of time between the DST start time and DST stop time. The DST start time and DST stop time is presented in the DST configuration structure, see cy_stc_rtc_dst_t.
dstTime | The DST configuration structure, see cy_stc_rtc_dst_t. |
timeDate | The time and date structure. The appropriate DST time is set based on this time and date, see cy_stc_rtc_config_t. |
cy_en_rtc_status_t Cy_RTC_SetNextDstTime | ( | cy_stc_rtc_dst_format_t const * | nextDst | ) |
A low-level DST function sets ALARM2 for a next DST event.
If Cy_RTC_GetDSTStatus() is true(=1), the next DST event should be the DST stop, then this function should be called with the DST stop time. Used by the Cy_RTC_EnableDstTime and Cy_RTC_DstInterrupt functions.
If the time format(.format) is relative option(=0), the RelativeToFixed() is called to convert to a fixed date.
nextDst | The structure with time at which a next DST event should occur (ALARM2 interrupt should occur). See cy_stc_rtc_config_t. |
bool Cy_RTC_GetDstStatus | ( | cy_stc_rtc_dst_t const * | dstTime, |
cy_stc_rtc_config_t const * | timeDate | ||
) |
A low-level DST function returns the current DST status using given time information.
This function is used in the initial state of a system. If the DST is enabled, the system sets the DST start or stop as a result of this function. Used by the Cy_RTC_EnableDstTime and Cy_RTC_DstInterrupt functions.
dstTime | The DST configuration structure, see cy_stc_rtc_dst_t. |
timeDate | The time and date structure. The appropriate DST time is set based on this time and date, see cy_stc_rtc_config_t. |