Lines Matching refs:t
22 int rtc_get_cmos_time(struct rtc_time_t *t) in rtc_get_cmos_time() argument
33 t->year = read_cmos(0x09); in rtc_get_cmos_time()
34 t->month = read_cmos(0x08); in rtc_get_cmos_time()
35 t->day = read_cmos(0x07); in rtc_get_cmos_time()
36 t->hour = read_cmos(0x04); in rtc_get_cmos_time()
37 t->minute = read_cmos(0x02); in rtc_get_cmos_time()
38 t->second = read_cmos(0x00); in rtc_get_cmos_time()
39 } while (t->second != read_cmos(0x00)); // 若读取时间过程中时间发生跳变则重新读取 in rtc_get_cmos_time()
45 t->second = (t->second & 0xf) + (t->second >> 4) * 10; in rtc_get_cmos_time()
46 t->minute = (t->minute & 0xf) + (t->minute >> 4) * 10; in rtc_get_cmos_time()
47 t->hour = ((t->hour & 0xf) + ((t->hour & 0x70) >> 4) * 10) | (t->hour & 0x80); in rtc_get_cmos_time()
48 t->day = (t->day & 0xf) + ((t->day / 16) * 10); in rtc_get_cmos_time()
49 t->month = (t->month & 0xf) + (t->month >> 4) * 10; in rtc_get_cmos_time()
50 t->year = (t->year & 0xf) + (t->year >> 4) * 10; in rtc_get_cmos_time()
52 t->year += 2000; in rtc_get_cmos_time()
54 if ((!is_24h) && t->hour & 0x80) // 将十二小时制转为24小时 in rtc_get_cmos_time()
55 t->hour = ((t->hour & 0x7f) + 12) % 24; in rtc_get_cmos_time()