Skip to content

Commit e455d74

Browse files
committed
STM32 : Sunday value is different for STM32F1
1 parent 2a824a1 commit e455d74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

targets/TARGET_STM/rtc_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ void rtc_write(time_t t)
250250
}
251251

252252
// Fill RTC structures
253-
if (timeinfo.tm_wday == 0) {
254-
dateStruct.WeekDay = 7;
253+
if (timeinfo.tm_wday == 0) { /* Sunday specific case */
254+
dateStruct.WeekDay = RTC_WEEKDAY_SUNDAY;
255255
} else {
256256
dateStruct.WeekDay = timeinfo.tm_wday;
257257
}

0 commit comments

Comments
 (0)