From aaaec44ba554e3c06edc5780b9c0c11fad5f8e1e Mon Sep 17 00:00:00 2001 From: qeeg Date: Thu, 11 Mar 2021 15:55:01 -0600 Subject: [PATCH] Add in weekday stuff to tc8521_time_get. --- src/machine/m_xt_t1000.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/machine/m_xt_t1000.c b/src/machine/m_xt_t1000.c index e285285e3..e4f1201fa 100644 --- a/src/machine/m_xt_t1000.c +++ b/src/machine/m_xt_t1000.c @@ -239,8 +239,7 @@ tc8521_time_get(uint8_t *regs, struct tm *tm) else tm->tm_hour = ((nibbles(TC8521_HOUR) % 12) + (regs[TC8521_HOUR10] & 0x02) ? 12 : 0); -//FIXME: wday - tm->tm_wday = 1; /* Dummy value so it is not uninitialized. */ + tm->tm_wday = nibbles(TC8521_WEEKDAY); tm->tm_mday = nibbles(TC8521_DAY); tm->tm_mon = (nibbles(TC8521_MONTH) - 1); tm->tm_year = (nibbles(TC8521_YEAR) + 1980);