Brian Silverman | 8cbf833 | 2013-12-11 13:59:42 -0800 | [diff] [blame] | 1 | #ifndef BBB_CRC_H_ |
| 2 | #define BBB_CRC_H_ |
| 3 | |
Brian Silverman | 1662a0e | 2013-12-19 17:50:01 -0800 | [diff] [blame] | 4 | #include <string.h> |
Brian Silverman | 8cbf833 | 2013-12-11 13:59:42 -0800 | [diff] [blame] | 5 | #include <stdint.h> |
| 6 | |
| 7 | namespace 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. |
| 11 | uint32_t CalculateChecksum(uint8_t *data, size_t length); |
| 12 | |
| 13 | } // namespace cape |
| 14 | |
| 15 | #endif // BBB_CRC_H_ |