8 #if defined(USE_SOFTWARE_TWI) 50 for (uint8_t i = 0; i < 8; i++) {
52 crc = (crc >> 1) ^ 0x8C;
81 #if defined(DS2482_800) 92 Serial.print(F(
"read_rom="));
93 for (
size_t i = 0; i <
sizeof(rom); i++) {
95 if (rom[i] < 0x10) Serial.print(0);
96 Serial.print(rom[i], HEX);
113 Serial.print(F(
"search_rom="));
118 nid = (res & 2) != 0;
119 value = (value >> 1);
120 if (dir) value |= 0x80;
124 if (rom[ix] < 0x10) Serial.print(0);
125 Serial.print(rom[ix], HEX);
150 uint8_t* p = (uint8_t*) &scratchpad;
152 Serial.print(F(
"read_scratchpad="));
153 for (
size_t i = 0; i <
sizeof(scratchpad); i++) {
155 if (i ==
sizeof(scratchpad) - 1) Serial.print(F(
",crc="));
156 if (p[i] < 0x10) Serial.print(
'0');
157 Serial.print(p[i], HEX);
164 float temperature = scratchpad.temperature * 0.0625;
bool write_configuration(bool apu=true, bool spu=false, bool iws=false)
uint8_t one_wire_crc_update(uint8_t crc, uint8_t data)
bool set_read_pointer(Register addr, uint8_t &value)
bool one_wire_write_byte(uint8_t value)
int8_t one_wire_triplet(uint8_t &dir)
virtual bool one_wire_read_byte(uint8_t &value)