avr:crc16.h
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
avr:crc16.h [2013/09/18 09:02] – [CRC pour OneWire] sdolt | avr:crc16.h [2013/09/18 09:05] – sdolt | ||
---|---|---|---|
Line 15: | Line 15: | ||
==== CRC pour OneWire ==== | ==== CRC pour OneWire ==== | ||
- | Le protocole OneWire utilise deux types de CRC, un sur 8 bits et l' | + | Le protocole OneWire utilise deux types de CRC, un sur 8 bits et l' |
=== DOW CRC8 === | === DOW CRC8 === | ||
Line 44: | Line 44: | ||
uint8_t make_crc8(void) | uint8_t make_crc8(void) | ||
{ | { | ||
- | uint8_t crc = 0, i; | + | uint8_t crc = 0 |
+ | uint8_t | ||
for (i = 0; i < sizeof serno / sizeof serno[0]; i++) | for (i = 0; i < sizeof serno / sizeof serno[0]; i++) | ||
Line 59: | Line 60: | ||
uint8_t check_crc8(void) | uint8_t check_crc8(void) | ||
{ | { | ||
- | uint8_t crc = 0, i; | + | uint8_t crc = 0 |
+ | uint8_t | ||
for (i = 0; i < sizeof serno / sizeof serno[0]; i++) | for (i = 0; i < sizeof serno / sizeof serno[0]; i++) |
avr/crc16.h.txt · Last modified: 2013/09/18 09:10 by sdolt