| Patrick Venture | 9b750aa | 2018-12-12 14:26:18 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |||||
| 3 | #include <cstdint> | ||||
| 4 | #include <vector> | ||||
| 5 | |||||
| 6 | /** | ||||
| 7 | * Generate the CRC for a payload (really any bytes). | ||||
| 8 | * | ||||
| 9 | * This is meant to only be called on the payload and not the CRC or the OEM | ||||
| 10 | * header, etc. | ||||
| 11 | * | ||||
| 12 | * @param[in] data - the bytes against to run the CRC | ||||
| 13 | * @return the CRC value | ||||
| 14 | */ | ||||
| 15 | std::uint16_t generateCrc(const std::vector<std::uint8_t>& data); | ||||