EDIT: Now AVR-compatible.
EDIT: Added very fast table crc-algorithms in pure c++ for all supported CRCs. The lib is now compatible to all MCUs. For Teensy 3.0 or 3.1, the fast on-chip-hardware is used (because it's still faster!).
For 32BIT, there are two variants with different table-sizes.
The default uses really big tables with a size of 4KB, but it can be switched to smaller tables with 1KB (but a bit slower)
Link:http://https://github.com/FrankBoesing/FastCRC
Currently supported CRCs:
8 BIT: SMBUS MAXIM (Table size 256 Bytes)
16 BIT: KERMIT (Alias CRC-16/CCITT, CRC-16/CCITT-TRUE, CRC-CCITT) CCITT-FALSE MCRF4XX MODBUS XMODEM (Alias ZMODEM, CRC-16/ACORN) X25 (Alias CRC-16/IBM-SDLC, CRC-16/ISO-HDLC, CRC-B) and all from _avr_libc (Table size 2KB)
32 BIT: CRC32, CRC-32/ADCCP, PKZIP, ETHERNET, 802.3 CKSUM, CRC-32/POSIX (Table size 4KB or 1KB)
Edit: There was a bug in "SMBUS", the nibbles where reversed. I fixed that.
Old Post:
Hi,
i'm developing a FastCRC Library for Cortex M4 (Teensy3).
(see link above)
Since i've never done that before for Arduino, and the Arduino-world is still new for me, iwould like to ask if somebody could have a look at it
and tell me, if the naming of functions and so on (is there a "style guide" ?) is ok.
Tests, tips and comments are welcome.
Thank you,
Frank.
EDIT: Added very fast table crc-algorithms in pure c++ for all supported CRCs. The lib is now compatible to all MCUs. For Teensy 3.0 or 3.1, the fast on-chip-hardware is used (because it's still faster!).
For 32BIT, there are two variants with different table-sizes.
The default uses really big tables with a size of 4KB, but it can be switched to smaller tables with 1KB (but a bit slower)
Code:
// Set this to 0 for smaller 32BIT-CRC-Tables:
#define CRC_BIGTABLES 1
Link:http://https://github.com/FrankBoesing/FastCRC
Currently supported CRCs:
8 BIT: SMBUS MAXIM (Table size 256 Bytes)
16 BIT: KERMIT (Alias CRC-16/CCITT, CRC-16/CCITT-TRUE, CRC-CCITT) CCITT-FALSE MCRF4XX MODBUS XMODEM (Alias ZMODEM, CRC-16/ACORN) X25 (Alias CRC-16/IBM-SDLC, CRC-16/ISO-HDLC, CRC-B) and all from _avr_libc (Table size 2KB)
32 BIT: CRC32, CRC-32/ADCCP, PKZIP, ETHERNET, 802.3 CKSUM, CRC-32/POSIX (Table size 4KB or 1KB)
Edit: There was a bug in "SMBUS", the nibbles where reversed. I fixed that.
Old Post:
Hi,
i'm developing a FastCRC Library for Cortex M4 (Teensy3).
(see link above)
Since i've never done that before for Arduino, and the Arduino-world is still new for me, iwould like to ask if somebody could have a look at it
and tell me, if the naming of functions and so on (is there a "style guide" ?) is ok.
Tests, tips and comments are welcome.
Thank you,
Frank.
Last edited: