Lines Matching refs:res
254 let mut res = RtcTime::default(); in read_time() localVariable
257 res.year = dev.read_cmos(CMOSTimeSelector::Year as u8) as i32; in read_time()
258 res.month = dev.read_cmos(CMOSTimeSelector::Month as u8) as i32; in read_time()
259 res.mday = dev.read_cmos(CMOSTimeSelector::Day as u8) as i32; in read_time()
260 res.hour = dev.read_cmos(CMOSTimeSelector::Hour as u8) as i32; in read_time()
261 res.minute = dev.read_cmos(CMOSTimeSelector::Minute as u8) as i32; in read_time()
262 res.second = dev.read_cmos(CMOSTimeSelector::Second as u8) as i32; in read_time()
264 if res.second == dev.read_cmos(CMOSTimeSelector::Second as u8) as i32 { in read_time()
276 res.second = (res.second & 0xf) + (res.second >> 4) * 10; in read_time()
277 res.minute = (res.minute & 0xf) + (res.minute >> 4) * 10; in read_time()
278 res.hour = ((res.hour & 0xf) + ((res.hour & 0x70) >> 4) * 10) | (res.hour & 0x80); in read_time()
279 res.mday = (res.mday & 0xf) + ((res.mday / 16) * 10); in read_time()
280 res.month = (res.month & 0xf) + (res.month >> 4) * 10; in read_time()
281 res.year = (res.year & 0xf) + (res.year >> 4) * 10; in read_time()
283 res.year += 100; in read_time()
285 if (!is_24h) && (res.hour & 0x80) != 0 { in read_time()
286 res.hour = ((res.hour & 0x7f) + 12) % 24; in read_time()
289 res.month -= 1; in read_time()
293 return Ok(res); in read_time()