1. Martin Scharrer
  2. CRC

Commits

Martin Scharrer  committed ec3c686

Moved defines from header to source file.

  • Participants
  • Parent commits 8d6347a
  • Branches default

Comments (0)

Files changed (2)

File crc.c

View file
  • Ignore whitespace
 #include "crc.h"
 
-
+#define CRC16_INIT      0xFFFF
+#define CRC16_POLY      0x1021
+#define CRC16_POLYREV   0x8408
 
 void crc16_init(uint16_t* crc)
 {
 
 }
 
+
 // Most Significant Bit first
 void crc16_update(uint16_t* crc, uint8_t* data, size_t length)
 {
     }
 }
 
+
 uint16_t crc16(uint8_t* data, size_t length)
 {
     uint16_t crc;

File crc.h

View file
  • Ignore whitespace
 #include <string.h>
 #include <stdint.h>
 
-#define CRC16_INIT      0xFFFF
-#define CRC16_POLY      0x1021
-#define CRC16_POLYREV   0x8408
-
 extern void crc16_init(uint16_t* crc);
 extern void crc16_finish(uint16_t* crc);
 extern void crc16_update(uint16_t* crc, uint8_t* data, size_t length);