Khangai Robot Play - Naive  01
THe naive play of the Khangai Robot
crc_hash.h
Go to the documentation of this file.
1 #ifndef _CRC_HASH_
2 #define _CRC_HASH_
3 
4 #include "stm32f4xx.h"
5 
6 #define WIDTH (8)
7 #define CRC_HASH_TABLE_SIZE (256)
8 #define TOP_BIT (1 << 7)
9 
10 class CRC_Hash
11 {
12 public:
13  CRC_Hash(uint8_t polynomial);
14  CRC_Hash(CRC_Hash &&) = default;
15  CRC_Hash(const CRC_Hash &) = default;
16  CRC_Hash &operator=(CRC_Hash &&) = default;
17  CRC_Hash &operator=(const CRC_Hash &) = default;
18  ~CRC_Hash() { }
19 
20  uint8_t get_Hash(uint8_t* buf, uint16_t len);
21 
22 private:
24 };
25 
26 #endif
Definition: crc_hash.h:10
CRC_Hash(uint8_t polynomial)
Definition: crc_hash.cpp:4
CRC_Hash & operator=(CRC_Hash &&)=default
~CRC_Hash()
Definition: crc_hash.h:18
#define CRC_HASH_TABLE_SIZE
Definition: crc_hash.h:7
uint8_t table_[CRC_HASH_TABLE_SIZE]
Definition: crc_hash.h:23
uint8_t get_Hash(uint8_t *buf, uint16_t len)
Definition: crc_hash.cpp:24