summaryrefslogtreecommitdiffstats
path: root/pressure_control/firmware/util.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2009-11-22 15:01:38 +0100
committerMichael Buesch <mb@bu3sch.de>2009-11-22 15:01:38 +0100
commit9af43462bd0989a2930afb9e1fdb7bb58fbdf5c4 (patch)
tree9c0c0c1f60f85378a82092ec4b9bd32dbe1d52ac /pressure_control/firmware/util.c
parentf6e560e764e4315c8d50ce26b4894da680efb43a (diff)
downloadcnc-9af43462bd0989a2930afb9e1fdb7bb58fbdf5c4.tar.xz
cnc-9af43462bd0989a2930afb9e1fdb7bb58fbdf5c4.zip
pressure_control: Use 8bit CRC
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'pressure_control/firmware/util.c')
-rw-r--r--pressure_control/firmware/util.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/pressure_control/firmware/util.c b/pressure_control/firmware/util.c
index 0b0bbab..7497740 100644
--- a/pressure_control/firmware/util.c
+++ b/pressure_control/firmware/util.c
@@ -87,15 +87,12 @@ void infinite_sleep(void)
sleep_mode();
}
-uint16_t crc16_block_update(uint16_t crc, const void *_data, uint16_t size)
+uint8_t crc8_block_update(uint8_t crc, const void *_data, uint8_t size)
{
const uint8_t *data = _data;
- while (size) {
- crc = _crc16_update(crc, *data);
- data++;
- size--;
- }
+ while (size--)
+ crc = _crc_ibutton_update(crc, *data++);
return crc;
}
bues.ch cgit interface