TURAG-Feldbus
crc_checksum.h File Reference

Functions and types for CRC checks. More...

#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
Include dependency graph for crc_checksum.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint8_t turag_crc8_calculate (const void *data, size_t length)
 Calculates a CRC8-checksum (using CRC-8/I-CODE) More...
 
uint16_t turag_crc16_calculate (const void *data, size_t length)
 CRC-16/IBM-3740 implementation. More...
 

Detailed Description

Functions and types for CRC checks.

Function Documentation

◆ turag_crc16_calculate()

uint16_t turag_crc16_calculate ( const void *  data,
size_t  length 
)

CRC-16/IBM-3740 implementation.

Generated on Sun May 16 01:32:02 2021 by pycrc v0.9.2, https://pycrc.org using the configuration:

  • Width = 16
  • Poly = 0x1021
  • XorIn = 0xffff
  • ReflectIn = False
  • XorOut = 0x0000
  • ReflectOut = False
  • Algorithm = table-driven Calculates a CRC16-checksum (using CCRC-16/IBM-3740)
    Parameters
    datapointer to data that is to be included in the calculation
    lengthlength in bytes of the given data pointer
    Returns
    checksum

◆ turag_crc8_calculate()

uint8_t turag_crc8_calculate ( const void *  data,
size_t  length 
)

Calculates a CRC8-checksum (using CRC-8/I-CODE)

Parameters
datapointer to data that is to be included in the calculation
lengthlength in bytes of the given data pointer
Returns
checksum