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
CRC16.h@1:352debdce7b3, 2017-05-18 (annotated)
- Committer:
- hudakz
- Date:
- Thu May 18 10:44:35 2017 +0000
- Revision:
- 1:352debdce7b3
- Parent:
- 0:585ead300cab
- Child:
- 2:a01521fb2fe1
Fork of the CRC16 library (c) Copyright Emilie Laverge.
Who changed what in which revision?
User | Revision | Line number | New 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 | 1:352debdce7b3 | 19 | unsigned short calc(char input[], int lenght); |
EmLa | 0:585ead300cab | 20 | }; |
hudakz | 1:352debdce7b3 | 21 | #endif // CRC16_H |