Lines Matching refs:scratchpad
70 struct ds18b20_scratchpad scratchpad; member
75 static int ds18b20_read_scratchpad(const struct device *dev, struct ds18b20_scratchpad *scratchpad);
114 struct ds18b20_scratchpad scratchpad) in ds18b20_write_scratchpad() argument
122 scratchpad.alarm_temp_high, in ds18b20_write_scratchpad()
123 scratchpad.alarm_temp_low, in ds18b20_write_scratchpad()
124 scratchpad.config in ds18b20_write_scratchpad()
132 ret = ds18b20_read_scratchpad(dev, &scratchpad); in ds18b20_write_scratchpad()
138 (scratchpad.config & DS18B20_RESOLUTION_MASK)) { in ds18b20_write_scratchpad()
146 struct ds18b20_scratchpad *scratchpad) in ds18b20_read_scratchpad() argument
155 memset(scratchpad, 0, sizeof(*scratchpad)); in ds18b20_read_scratchpad()
157 (uint8_t *)scratchpad, sizeof(*scratchpad)); in ds18b20_read_scratchpad()
162 if (!slave_responded((uint8_t *)scratchpad, sizeof(*scratchpad))) { in ds18b20_read_scratchpad()
167 crc = w1_crc8((uint8_t *)scratchpad, sizeof(*scratchpad) - 1); in ds18b20_read_scratchpad()
168 if (crc != scratchpad->crc) { in ds18b20_read_scratchpad()
203 data->scratchpad.config &= ~DS18B20_RESOLUTION_MASK; in ds18b20_set_resolution()
204 data->scratchpad.config |= DS18B20_RESOLUTION(resolution); in ds18b20_set_resolution()
241 return ds18b20_read_scratchpad(dev, &data->scratchpad); in ds18b20_sample_fetch()
254 ds18b20_temperature_from_raw(dev, (uint8_t *)&data->scratchpad.temp, val); in ds18b20_channel_get()
288 ret = ds18b20_write_scratchpad(dev, data->scratchpad); in ds18b20_configure()