RadioLib
Universal wireless communication library for Arduino
RadioLibCRC Class Reference

Class to calculate CRCs of varying formats. More...

#include <CRC.h>

Public Member Functions

 RadioLibCRC ()
 Default constructor.
 
uint32_t checksum (const uint8_t *buff, size_t len)
 Calculate checksum of a buffer. More...
 

Public Attributes

uint8_t size = 8
 CRC size in bits.
 
uint32_t poly = 0
 CRC polynomial.
 
uint32_t init = 0
 Initial value.
 
uint32_t out = 0
 Final XOR value.
 
bool refIn = false
 Whether to reflect input bytes.
 
bool refOut = false
 Whether to reflect the result.
 

Detailed Description

Class to calculate CRCs of varying formats.

Member Function Documentation

◆ checksum()

uint32_t RadioLibCRC::checksum ( const uint8_t *  buff,
size_t  len 
)

Calculate checksum of a buffer.

Parameters
buffBuffer to calculate the checksum over.
lenSize of the buffer in bytes.
Returns
The resulting checksum.

The documentation for this class was generated from the following files: