Lines Matching refs:now

454     cy_stc_rtc_config_t now;  in cyhal_rtc_set_alarm_by_seconds()  local
456 Cy_RTC_GetDateAndTime(&now); in cyhal_rtc_set_alarm_by_seconds()
457 const int year = (int)(now.year + _cyhal_rtc_get_century()); in cyhal_rtc_set_alarm_by_seconds()
460 bool nowDst = (NULL != _cyhal_rtc_dst) && Cy_RTC_GetDstStatus(_cyhal_rtc_dst, &now); in cyhal_rtc_set_alarm_by_seconds()
463 remaining = _cyhal_rtc_update_field(remaining, &now.sec, &now.min, 60); in cyhal_rtc_set_alarm_by_seconds()
464 remaining = _cyhal_rtc_update_field(remaining, &now.min, &now.hour, 60); in cyhal_rtc_set_alarm_by_seconds()
465 remaining = _cyhal_rtc_update_field(remaining, &now.hour, &now.date, 24); in cyhal_rtc_set_alarm_by_seconds()
468 now.date += remaining; in cyhal_rtc_set_alarm_by_seconds()
469 while (now.date > (days = Cy_RTC_DaysInMonth(now.month, year))) in cyhal_rtc_set_alarm_by_seconds()
471 now.date -= days; in cyhal_rtc_set_alarm_by_seconds()
472 now.month++; in cyhal_rtc_set_alarm_by_seconds()
473 if (now.month > 12) in cyhal_rtc_set_alarm_by_seconds()
475 now.year++; in cyhal_rtc_set_alarm_by_seconds()
476 now.month = 1; in cyhal_rtc_set_alarm_by_seconds()
485 bool futureDst = Cy_RTC_GetDstStatus(_cyhal_rtc_dst, &now); in cyhal_rtc_set_alarm_by_seconds()
493 if (now.hour == _cyhal_rtc_dst->stopDst.hour) in cyhal_rtc_set_alarm_by_seconds()
498 if (now.hour == 0) in cyhal_rtc_set_alarm_by_seconds()
500 now.hour = 23; in cyhal_rtc_set_alarm_by_seconds()
501 now.date--; in cyhal_rtc_set_alarm_by_seconds()
503 if (now.date < 1) in cyhal_rtc_set_alarm_by_seconds()
505 now.month--; in cyhal_rtc_set_alarm_by_seconds()
506 if (now.month < 1) in cyhal_rtc_set_alarm_by_seconds()
508 now.month = 12; in cyhal_rtc_set_alarm_by_seconds()
509 now.year--; in cyhal_rtc_set_alarm_by_seconds()
512 now.date = Cy_RTC_DaysInMonth(now.month, year); in cyhal_rtc_set_alarm_by_seconds()
517 now.hour--; in cyhal_rtc_set_alarm_by_seconds()
522 now.hour++; in cyhal_rtc_set_alarm_by_seconds()
523 if (now.hour >= 24) in cyhal_rtc_set_alarm_by_seconds()
525 now.hour = 0; in cyhal_rtc_set_alarm_by_seconds()
526 now.date++; in cyhal_rtc_set_alarm_by_seconds()
528 if (now.date > days) in cyhal_rtc_set_alarm_by_seconds()
530 now.date = 1; in cyhal_rtc_set_alarm_by_seconds()
531 now.month++; in cyhal_rtc_set_alarm_by_seconds()
532 if (now.month > 12) in cyhal_rtc_set_alarm_by_seconds()
534 now.month = 1; in cyhal_rtc_set_alarm_by_seconds()
543 _cyhal_rtc_from_pdl_time(&now, year, &future); in cyhal_rtc_set_alarm_by_seconds()