From 58b849c451ac1281c14bfc535ab7f411a0b736e0 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 25 Jan 2017 19:32:15 -0500 Subject: Move intrinsic RTC implmentation differences to driver files Some drivers set tm_wday just fine and do not need it coerced to be correct. Others set tm_yday, so don't overwrite what the driver sets; just zero it inside if it can't fill the field. Move calls to set_day_of_week() to the sorts of drivers that presumably required the hammer (FS#11814) in get_time() where the weekday isn't locked to the date. Change-Id: Idd0ded6bfc9d9f48fcc1a6074068164c42fcf24a --- firmware/common/timefuncs.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'firmware/common/timefuncs.c') diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c index ffa6e2a0b3..c8819ea76e 100644 --- a/firmware/common/timefuncs.c +++ b/firmware/common/timefuncs.c @@ -71,9 +71,6 @@ struct tm *get_time(void) /* Once per second, 1/10th of a second off */ timeout = HZ * (current_tick / HZ + 1) + HZ / 5; rtc_read_datetime(&tm); - set_day_of_week(&tm); - - tm.tm_yday = 0; /* Not implemented for now */ tm.tm_isdst = -1; /* Not implemented for now */ } #else /* No RTC */ -- cgit v1.2.3