File: crc16_ccitt.h

package info (click to toggle)
bglibs 2.04%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,368 kB
  • sloc: ansic: 15,820; perl: 674; sh: 64; makefile: 26
file content (14 lines) | stat: -rw-r--r-- 397 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef CRC16__CCITT__H__
#define CRC16__CCITT__H__

#include "gcrc.h"

#define CRC16_CCITT_POLY ((uint16)0x1021)
#define CRC16_CCITT_INIT ((uint16)0xffff)
#define CRC16_CCITT_POST ((uint16)0)

extern const uint16 crc16_ccitt_table[256];
#define crc16_ccitt_update(C,D,L) gcrc16fwd((C),(D),(L),crc16_ccitt_table)
#define crc16_ccitt_block(B,L) crc16_ccitt_update(CRC16_CCITT_INIT,(B),(L))

#endif