mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-04-25 20:01:46 +00:00
Restructuring and cleaning out unnecessary files
This commit is contained in:
23
lib/HanReader/src/Crc16.h
Normal file
23
lib/HanReader/src/Crc16.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef _CRC16_h
|
||||
#define _CRC16_h
|
||||
|
||||
#if defined(ARDUINO) && ARDUINO >= 100
|
||||
#include "Arduino.h"
|
||||
#else
|
||||
#include "WProgram.h"
|
||||
#endif
|
||||
|
||||
class Crc16Class
|
||||
{
|
||||
public:
|
||||
Crc16Class();
|
||||
unsigned short ComputeChecksum(byte *data, int start, int length);
|
||||
protected:
|
||||
private:
|
||||
const unsigned short polynomial = 0x8408;
|
||||
unsigned short table[256];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user