Diff for /libelwix/inc/elwix/acrc.h between versions 1.7 and 1.7.36.1

version 1.7, 2019/12/30 18:11:16 version 1.7.36.1, 2024/10/10 23:53:00
Line 12  terms: Line 12  terms:
 All of the documentation and software included in the ELWIX and AITNET  All of the documentation and software included in the ELWIX and AITNET
 Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>  Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>
   
Copyright 2004 - 2019Copyright 2004 - 2024
         by Michael Pounov <misho@elwix.org>.  All rights reserved.          by Michael Pounov <misho@elwix.org>.  All rights reserved.
   
 Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
Line 81  unsigned int crcReflect(unsigned int crcNum, unsigned  Line 81  unsigned int crcReflect(unsigned int crcNum, unsigned 
 unsigned int crcCalc(unsigned char * __restrict psBuf, unsigned int bufLen,   unsigned int crcCalc(unsigned char * __restrict psBuf, unsigned int bufLen, 
                 unsigned char crcBits, unsigned char RevOpts,                   unsigned char crcBits, unsigned char RevOpts, 
                 unsigned int initCRC, unsigned int xorCRC);                  unsigned int initCRC, unsigned int xorCRC);
   #define crc_32(x, l)            crcCalc((x), (l), 32, REVOPTS_REVERTBYTE|REVOPTS_REVERTCRC, 0xFFFFFFFF, 0xFFFFFFFF)
   #define crc_16(x, l)            crcCalc((x), (l), 16, REVOPTS_REVERTBYTE|REVOPTS_REVERTCRC, 0x0, 0x0)
   #define crc_16_ccitt(x, l)      crcCalc((x), (l), 161, 0, 0x0, 0x0)
   #define crc_16_xmodem(x, l)     crcCalc((x), (l), 162, REVOPTS_REVERTBYTE|REVOPTS_REVERTCRC, 0x0, 0x0)
   
 /*  /*
 * crc16() - Checksum calculation in X/Y modem communication * crc16_ccitt() - Checksum calculation
  *   *
  * @buf = Data for calculation   * @buf = Data for calculation
  * @bufLen = Length of data   * @bufLen = Length of data
  * return: Checksum   * return: Checksum
  */   */
unsigned short crc16(unsigned char * __restrict buf, int bufLen);unsigned short crc16_ccitt(unsigned char * __restrict buf, int bufLen);
 /*  /*
 * crc16_ext() - Checksum ver.2 calculation in X/Y modem communication * crc16_xy() - Checksum calculation in X/Y modem communication
  *   *
  * @buf = Data for calculation   * @buf = Data for calculation
  * @bufLen = Length of data   * @bufLen = Length of data
  * return: Checksum   * return: Checksum
  */   */
unsigned short crc16_ext(unsigned char * __restrict buf, int bufLen);unsigned short crc16_xy(unsigned char * __restrict buf, int bufLen);
 /*  /*
  * crcIP() - Checksum in IP communication   * crcIP() - Checksum in IP communication
  *   *
Line 162  unsigned int crcAdler(unsigned char * __restrict psBuf Line 166  unsigned int crcAdler(unsigned char * __restrict psBuf
 #define crcEther(psBuf, bufLen) crcCalc((psBuf), (bufLen), 32, 3, 0xFFFFFFFF, 0xFFFFFFFF)  #define crcEther(psBuf, bufLen) crcCalc((psBuf), (bufLen), 32, 3, 0xFFFFFFFF, 0xFFFFFFFF)
   
 /*  /*
 * crc_32() - CRC32 calculation from table * crc32tbl() - CRC32 calculation from table
  *   *
  * @crc = Initial crc value   * @crc = Initial crc value
  * @buf = Data for calculation   * @buf = Data for calculation
  * @len = Length of data   * @len = Length of data
  * return: calculated CRC32   * return: calculated CRC32
  */   */
unsigned int crc_32(unsigned int crc, const unsigned char * __restrict buf, unsigned int len);unsigned int crc32tbl(unsigned int crc, const unsigned char * __restrict buf, unsigned int len);
   
 /*  /*
  * crcPelco() - Calculate Pelco D/P CRC   * crcPelco() - Calculate Pelco D/P CRC

Removed from v.1.7  
changed lines
  Added in v.1.7.36.1


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>