Skip to content

Commit 134ff0a

Browse files
author
Cruz Monrreal
authored
Merge pull request #7777 from jeromecoutant/PR_SUNDAY
STM32F1 RTC : wrong Sunday value
2 parents c4e814d + e455d74 commit 134ff0a

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)