summaryrefslogtreecommitdiff
path: root/firmware/drivers/rtc/rtc_pcf50605.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/rtc/rtc_pcf50605.c')
-rw-r--r--firmware/drivers/rtc/rtc_pcf50605.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/drivers/rtc/rtc_pcf50605.c b/firmware/drivers/rtc/rtc_pcf50605.c
index 8c54a590c6..daa35fb13f 100644
--- a/firmware/drivers/rtc/rtc_pcf50605.c
+++ b/firmware/drivers/rtc/rtc_pcf50605.c
@@ -24,7 +24,7 @@
24#include "kernel.h" 24#include "kernel.h"
25#include "system.h" 25#include "system.h"
26#include "pcf50605.h" 26#include "pcf50605.h"
27#include <stdbool.h> 27#include "timefuncs.h"
28 28
29/* Values which each disable one alarm time register */ 29/* Values which each disable one alarm time register */
30static const char alarm_disable[] = { 30static const char alarm_disable[] = {
@@ -49,10 +49,12 @@ int rtc_read_datetime(struct tm *tm)
49 tm->tm_sec = buf[0]; 49 tm->tm_sec = buf[0];
50 tm->tm_min = buf[1]; 50 tm->tm_min = buf[1];
51 tm->tm_hour = buf[2]; 51 tm->tm_hour = buf[2];
52 tm->tm_wday = buf[3];
53 tm->tm_mday = buf[4]; 52 tm->tm_mday = buf[4];
54 tm->tm_mon = buf[5] - 1; 53 tm->tm_mon = buf[5] - 1;
55 tm->tm_year = buf[6] + 100; 54 tm->tm_year = buf[6] + 100;
55 tm->tm_yday = 0; /* Not implemented for now */
56
57 set_day_of_week(tm);
56 58
57 return rc; 59 return rc;
58} 60}