STM32 : Sunday value is different for STM32F1

pull/7777/head
jeromecoutant 2018-08-13 17:04:56 +02:00
parent 2a824a1ceb
commit e455d74f3d
1 changed files with 2 additions and 2 deletions

View File

@ -250,8 +250,8 @@ void rtc_write(time_t t)
}
// Fill RTC structures
if (timeinfo.tm_wday == 0) {
dateStruct.WeekDay = 7;
if (timeinfo.tm_wday == 0) { /* Sunday specific case */
dateStruct.WeekDay = RTC_WEEKDAY_SUNDAY;
} else {
dateStruct.WeekDay = timeinfo.tm_wday;
}