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:
hudakz
Date:
Mon May 22 09:32:41 2017 +0000
Revision:
2:a01521fb2fe1
Parent:
1:352debdce7b3
Child:
3:3f5622979e77
Updated.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hudakz 1:352debdce7b3 1 /*
hudakz 1:352debdce7b3 2 * This is a fork of the CRC16 library COPYRIGHT(c) Emilie Laverge
hudakz 1:352debdce7b3 3 * published at [https://developer.mbed.org/users/EmLa/code/CRC16/]
hudakz 1:352debdce7b3 4 *
hudakz 1:352debdce7b3 5 * Modified by Zoltan Hudak
hudakz 1:352debdce7b3 6 */
hudakz 1:352debdce7b3 7
EmLa 0:585ead300cab 8 #ifndef CRC16_H
EmLa 0:585ead300cab 9 #define CRC16_H
EmLa 0:585ead300cab 10
hudakz 1:352debdce7b3 11 class CRC16
EmLa 0:585ead300cab 12 {
hudakz 1:352debdce7b3 13 private:
hudakz 1:352debdce7b3 14 static const unsigned int SHIFTER;
hudakz 1:352debdce7b3 15 static const unsigned short TABLE[];
hudakz 1:352debdce7b3 16 public:
hudakz 1:352debdce7b3 17 CRC16(void) { };
hudakz 1:352debdce7b3 18 ~CRC16(void){ };
hudakz 2:a01521fb2fe1 19 unsigned short calc(char input[], int length);
EmLa 0:585ead300cab 20 };
hudakz 1:352debdce7b3 21 #endif // CRC16_H