Lines Matching refs:date
146 static uint64_t RtcGetCalendarValue( RTC_DateTypeDef* date, RTC_TimeTypeDef* time );
150 RTC_DateTypeDef date; in RtcInit() local
166 date.Year = 0; in RtcInit()
167 date.Month = RTC_MONTH_JANUARY; in RtcInit()
168 date.Date = 1; in RtcInit()
169 date.WeekDay = RTC_WEEKDAY_MONDAY; in RtcInit()
170 HAL_RTC_SetDate( &RtcHandle, &date, RTC_FORMAT_BIN ); in RtcInit()
315 RTC_DateTypeDef date = RtcTimerContext.CalendarDate; in RtcStartAlarm() local
326 rtcAlarmDays = date.Date; in RtcStartAlarm()
377 if( date.Year % 4 == 0 ) in RtcStartAlarm()
379 if( rtcAlarmDays > DaysInMonthLeapYear[date.Month - 1] ) in RtcStartAlarm()
381 rtcAlarmDays = rtcAlarmDays % DaysInMonthLeapYear[date.Month - 1]; in RtcStartAlarm()
386 if( rtcAlarmDays > DaysInMonth[date.Month - 1] ) in RtcStartAlarm()
388 rtcAlarmDays = rtcAlarmDays % DaysInMonth[date.Month - 1]; in RtcStartAlarm()
413 RTC_DateTypeDef date; in RtcGetTimerValue() local
415 uint32_t calendarValue = ( uint32_t )RtcGetCalendarValue( &date, &time ); in RtcGetTimerValue()
423 RTC_DateTypeDef date; in RtcGetTimerElapsedTime() local
425 uint32_t calendarValue = ( uint32_t )RtcGetCalendarValue( &date, &time ); in RtcGetTimerElapsedTime()
430 static uint64_t RtcGetCalendarValue( RTC_DateTypeDef* date, RTC_TimeTypeDef* time ) in RtcGetCalendarValue() argument
441 HAL_RTC_GetDate( &RtcHandle, date, RTC_FORMAT_BIN ); in RtcGetCalendarValue()
446 seconds = DIVC( ( DAYS_IN_YEAR * 3 + DAYS_IN_LEAP_YEAR ) * date->Year , 4 ); in RtcGetCalendarValue()
448 …correction = ( ( date->Year % 4 ) == 0 ) ? DAYS_IN_MONTH_CORRECTION_LEAP : DAYS_IN_MONTH_CORRECTIO… in RtcGetCalendarValue()
450 …seconds += ( DIVC( ( date->Month-1 ) * ( 30 + 31 ), 2 ) - ( ( ( correction >> ( ( date->Month - 1 … in RtcGetCalendarValue()
452 seconds += ( date->Date -1 ); in RtcGetCalendarValue()
469 RTC_DateTypeDef date; in RtcGetCalendarTime() local
472 uint64_t calendarValue = RtcGetCalendarValue( &date, &time ); in RtcGetCalendarTime()