blob: 7a8eb95b6e47f8ee776b3d1dd9a40947471ab00d [file] [log] [blame]
Brian Silverman8cbf8332013-12-11 13:59:42 -08001#ifndef BBB_CRC_H_
2#define BBB_CRC_H_
3
Brian Silverman1662a0e2013-12-19 17:50:01 -08004#include <string.h>
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_