MightyPork / TinyFrame

A simple library for building and parsing data frames for serial interfaces (like UART / RS232)
MIT License
343 stars 111 forks source link

Replace the look-up table CRC's with an algorithm #6

Open MightyPork opened 6 years ago

FrozenDroid commented 6 years ago

Hmm, would be very neat if you could supply your own CRC function, in case of STM MCU's with builtin CRC calc unit.

MightyPork commented 6 years ago

hmmm i think that could be done via extern functions that are used for a certain CKSUM type

FrozenDroid commented 6 years ago

As for the CRC8, the number 1 implementation from this has worked well for me. It's a Maxim/Dallas implementation with 0x31 as the polynomial, 0x0 as init and final Xor value, with the input and result reflected.