Page 1 of 1

CRC checker for OneWire

Posted: Thu May 23, 2013 10:25 am
by sbrazz
The code attached checks the CRC of the returned data from dallas onewire devices and returns 0 if no errors are found, -1 if all zeros are input or the number of bits remaining set at the end of the cycle.
It assumes the returned data from OWIN is in an Inbytes array of 0-8 = 9 bytes, as per the OWIN example.