Initial code

This commit is contained in:
2023-12-21 16:43:41 +11:00
parent b69b784056
commit c84c2dfbdc
8 changed files with 390 additions and 0 deletions

18
include/PacketCRC.h Normal file
View File

@@ -0,0 +1,18 @@
#ifndef PACKET_CRC_H
#define PACKET_CRC_H
#include <CRC16.h>
class PacketCRC {
public:
PacketCRC();
~PacketCRC();
// Method to calculate CRC for a packet
bool check(const uint8_t* packet);
uint16_t calculate(const uint8_t* packet);
private:
CRC16 crc;
};
#endif // PACKET_CRC_H