Lines Matching refs:w1_buf

64 	u8 w1_buf[2];  in w1_ds2438_get_page()  local
73 w1_buf[0] = W1_DS2438_RECALL_MEMORY; in w1_ds2438_get_page()
74 w1_buf[1] = (u8)pageno; in w1_ds2438_get_page()
75 w1_write_block(sl->master, w1_buf, 2); in w1_ds2438_get_page()
79 w1_buf[0] = W1_DS2438_READ_SCRATCH; in w1_ds2438_get_page()
80 w1_buf[1] = (u8)pageno; in w1_ds2438_get_page()
81 w1_write_block(sl->master, w1_buf, 2); in w1_ds2438_get_page()
98 u8 w1_buf[DS2438_PAGE_SIZE + 1 /*for CRC*/]; in w1_ds2438_get_temperature() local
125 if (w1_ds2438_get_page(sl, 0, w1_buf) == 0) { in w1_ds2438_get_temperature()
126 *temperature = (((int16_t) w1_buf[DS2438_TEMP_MSB]) << 8) | ((uint16_t) w1_buf[DS2438_TEMP_LSB]); in w1_ds2438_get_temperature()
140 u8 w1_buf[3]; in w1_ds2438_change_config_bit() local
147 w1_buf[0] = W1_DS2438_RECALL_MEMORY; in w1_ds2438_change_config_bit()
148 w1_buf[1] = 0x00; in w1_ds2438_change_config_bit()
149 w1_write_block(sl->master, w1_buf, 2); in w1_ds2438_change_config_bit()
153 w1_buf[0] = W1_DS2438_READ_SCRATCH; in w1_ds2438_change_config_bit()
154 w1_buf[1] = 0x00; in w1_ds2438_change_config_bit()
155 w1_write_block(sl->master, w1_buf, 2); in w1_ds2438_change_config_bit()
179 w1_buf[0] = W1_DS2438_WRITE_SCRATCH; in w1_ds2438_change_config_bit()
180 w1_buf[1] = 0x00; in w1_ds2438_change_config_bit()
181 w1_buf[2] = status; in w1_ds2438_change_config_bit()
182 w1_write_block(sl->master, w1_buf, 3); in w1_ds2438_change_config_bit()
186 w1_buf[0] = W1_DS2438_COPY_SCRATCH; in w1_ds2438_change_config_bit()
187 w1_buf[1] = 0x00; in w1_ds2438_change_config_bit()
188 w1_write_block(sl->master, w1_buf, 2); in w1_ds2438_change_config_bit()
199 u8 w1_buf[9]; in w1_ds2438_change_offset_register() local
203 memcpy(&w1_buf[2], w1_page1_buf, DS2438_PAGE_SIZE - 1); /* last register reserved */ in w1_ds2438_change_offset_register()
204 w1_buf[7] = value[0]; /* change only offset register */ in w1_ds2438_change_offset_register()
205 w1_buf[8] = value[1]; in w1_ds2438_change_offset_register()
209 w1_buf[0] = W1_DS2438_WRITE_SCRATCH; in w1_ds2438_change_offset_register()
210 w1_buf[1] = 0x01; /* write to page 1 */ in w1_ds2438_change_offset_register()
211 w1_write_block(sl->master, w1_buf, 9); in w1_ds2438_change_offset_register()
215 w1_buf[0] = W1_DS2438_COPY_SCRATCH; in w1_ds2438_change_offset_register()
216 w1_buf[1] = 0x01; in w1_ds2438_change_offset_register()
217 w1_write_block(sl->master, w1_buf, 2); in w1_ds2438_change_offset_register()
228 u8 w1_buf[DS2438_PAGE_SIZE + 1 /*for CRC*/]; in w1_ds2438_get_voltage() local
260 if (w1_ds2438_get_page(sl, 0, w1_buf) == 0) { in w1_ds2438_get_voltage()
261 …*voltage = (((uint16_t) w1_buf[DS2438_VOLTAGE_MSB]) << 8) | ((uint16_t) w1_buf[DS2438_VOLTAGE_LSB]… in w1_ds2438_get_voltage()
275 u8 w1_buf[DS2438_PAGE_SIZE + 1 /*for CRC*/]; in w1_ds2438_get_current() local
280 if (w1_ds2438_get_page(sl, 0, w1_buf) == 0) { in w1_ds2438_get_current()
282 *voltage = (((int16_t) w1_buf[DS2438_CURRENT_MSB]) << 8) | ((int16_t) w1_buf[DS2438_CURRENT_LSB]); in w1_ds2438_get_current()
341 u8 w1_buf[DS2438_PAGE_SIZE + 1 /*for CRC*/]; in page0_read() local
354 if (w1_ds2438_get_page(sl, 0, w1_buf) == 0) { in page0_read()
355 memcpy(buf, &w1_buf, count); in page0_read()
371 u8 w1_buf[DS2438_PAGE_SIZE + 1 /*for CRC*/]; in page1_read() local
384 if (w1_ds2438_get_page(sl, 1, w1_buf) == 0) { in page1_read()
385 memcpy(buf, &w1_buf, count); in page1_read()