Lines Matching refs:time
16 static int sandbox_rtc_get(struct udevice *dev, struct rtc_time *time) in sandbox_rtc_get() argument
25 time->tm_sec = buf[REG_SEC - REG_SEC]; in sandbox_rtc_get()
26 time->tm_min = buf[REG_MIN - REG_SEC]; in sandbox_rtc_get()
27 time->tm_hour = buf[REG_HOUR - REG_SEC]; in sandbox_rtc_get()
28 time->tm_mday = buf[REG_MDAY - REG_SEC]; in sandbox_rtc_get()
29 time->tm_mon = buf[REG_MON - REG_SEC]; in sandbox_rtc_get()
30 time->tm_year = buf[REG_YEAR - REG_SEC] + 1900; in sandbox_rtc_get()
31 time->tm_wday = buf[REG_WDAY - REG_SEC]; in sandbox_rtc_get()
36 static int sandbox_rtc_set(struct udevice *dev, const struct rtc_time *time) in sandbox_rtc_set() argument
41 buf[REG_SEC - REG_SEC] = time->tm_sec; in sandbox_rtc_set()
42 buf[REG_MIN - REG_SEC] = time->tm_min; in sandbox_rtc_set()
43 buf[REG_HOUR - REG_SEC] = time->tm_hour; in sandbox_rtc_set()
44 buf[REG_MDAY - REG_SEC] = time->tm_mday; in sandbox_rtc_set()
45 buf[REG_MON - REG_SEC] = time->tm_mon; in sandbox_rtc_set()
46 buf[REG_YEAR - REG_SEC] = time->tm_year - 1900; in sandbox_rtc_set()
47 buf[REG_WDAY - REG_SEC] = time->tm_wday; in sandbox_rtc_set()