Lines Matching refs:nvram
40 uint8_t nvram[NVRAM_SIZE]; member
53 VMSTATE_UINT8_ARRAY(nvram, DS1338State, NVRAM_SIZE),
67 s->nvram[0] = to_bcd(now.tm_sec); in capture_current_time()
68 s->nvram[1] = to_bcd(now.tm_min); in capture_current_time()
69 if (s->nvram[2] & HOURS_12) { in capture_current_time()
75 s->nvram[2] = HOURS_12 | to_bcd(tmp); in capture_current_time()
77 s->nvram[2] = HOURS_12 | HOURS_PM | to_bcd(tmp - 12); in capture_current_time()
80 s->nvram[2] = to_bcd(now.tm_hour); in capture_current_time()
82 s->nvram[3] = (now.tm_wday + s->wday_offset) % 7 + 1; in capture_current_time()
83 s->nvram[4] = to_bcd(now.tm_mday); in capture_current_time()
84 s->nvram[5] = to_bcd(now.tm_mon + 1); in capture_current_time()
85 s->nvram[6] = to_bcd(now.tm_year - 100); in capture_current_time()
128 res = s->nvram[s->ptr]; in ds1338_recv()
201 data = (data & ~CTRL_OSF) | (data & s->nvram[s->ptr] & CTRL_OSF); in ds1338_send()
203 s->nvram[s->ptr] = data; in ds1338_send()
205 s->nvram[s->ptr] = data; in ds1338_send()
218 memset(s->nvram, 0, NVRAM_SIZE); in ds1338_reset()