Export to GitHub

the-bus-pirate - issue #7

A CRC generator


Posted on Mar 31, 2009 by Happy Giraffe

Add some facility to quickly calculate CRC values of a packet. Could use the PIC24 hardware CRC generator.

Comment #1

Posted on Dec 2, 2011 by Happy Elephant

CRC16? Cant get you away with just a simple function like

    crc ^= a;
    for (i = 0; i < 8; ++i)
    {
        if (crc & 1)
            crc = (crc >> 1) ^ 0xA001;
        else
            crc = (crc >> 1);
    }

    return crc;

or am i confused

Status: Accepted

Labels:
Type-Enhancement Priority-Low