blob: cb0bf63a1d115c3977698de8f25cbd6586cd847e [file] [log] [blame]
Brian Silverman8cbf8332013-12-11 13:59:42 -08001#ifndef BBB_CRC_H_
2#define BBB_CRC_H_
3
Daniel Petti059be422013-12-14 19:47:42 -08004#include <cstring>
Brian Silverman8cbf8332013-12-11 13:59:42 -08005#include <stdint.h>
6
7namespace cape {
8
9// Calculates a CRC32 checksum for data. This is definitely the same one as the
10// cape MCU does in hardware which seems to be the same one as Ethernet etc use.
11uint32_t CalculateChecksum(uint8_t *data, size_t length);
12
13} // namespace cape
14
15#endif // BBB_CRC_H_