Implementation of CRC16 using polynomial 0x8005 = X^16 + X^15 + X^2 + 1

Dependents:   Manchester_Transmitter Manchester_Receiver ManchesterUART_Transmitter ManchesterUART_Receiver

Fork of CRC16 by Emilie Laverge

Committer:
EmLa
Date:
Wed Feb 12 21:34:53 2014 +0000
Revision:
0:585ead300cab
Child:
1:352debdce7b3
CRC16 implementation; 123456789 --> 0xFEE8

Who changed what in which revision?

UserRevisionLine numberNew contents of line
EmLa 0:585ead300cab 1 #ifndef CRC16_H
EmLa 0:585ead300cab 2 #define CRC16_H
EmLa 0:585ead300cab 3
EmLa 0:585ead300cab 4 class CRC16
EmLa 0:585ead300cab 5 {
EmLa 0:585ead300cab 6 private:
EmLa 0:585ead300cab 7 const unsigned int SHIFTER = 0x00FF;
EmLa 0:585ead300cab 8 unsigned short crc16table[256];
EmLa 0:585ead300cab 9
EmLa 0:585ead300cab 10 public:
EmLa 0:585ead300cab 11 unsigned short calculateCRC16(char input[], int lenght);
EmLa 0:585ead300cab 12 CRC16();
EmLa 0:585ead300cab 13 ~CRC16();
EmLa 0:585ead300cab 14 };
EmLa 0:585ead300cab 15 #endif