OneWire/OneWire.cpp
uint8_t OneWire::crc8( uint8_t *addr, uint8_t len)
{
	uint8_t crc = 0;

	while (len--) {
		crc = pgm_read_byte(dscrc_table + (crc ^ *addr++));
	}
	return crc;
}
//
// Compute a Dallas Semiconductor 8 bit CRC. These show up in the ROM
// and the registers.  (note: this might better be done without to
// table, it would probably be smaller and certainly fast enough
// compared to all those delayMicrosecond() calls.  But I got
// confused, so I use this table from the examples.)
//

Compute a Dallas Semiconductor 8 bit CRC. These show up in the ROM
and the registers.  (note: this might better be done without to
table, it would probably be smaller and certainly fast enough
compared to all those delayMicrosecond() calls.  But I got
confused, so I use this table from the examples.)
Compute a Dallas Semiconductor 8 bit CRC . These show up in the ROM and the registers . ( note : this might better be done without to table it would probably be smaller and certainly fast enough compared to all those delayMicrosecond () calls . But I got confused so I use this table from the examples . )
uint8_t OneWire::crc8( uint8_t *addr, uint8_t len)
{
	uint8_t crc = 0;
	while (len--) {
		crc = pgm_read_byte(dscrc_table + (crc ^ *addr++));
	}
	return crc;
}
uint8_t OneWire :: crc8 ( uint8_t * addr , uint8_t len ) { uint8_t crc = 0 ; while ( len -- ) { crc = pgm_read_byte ( dscrc_table + ( crc ^ * addr ++ ) ) ; } return crc ; }
Compute a Dallas Semiconductor 8 bit CRC.
Compute a Dallas Semiconductor 8 bit CRC .