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 (uint8_t *buff, size_t len)
 Calculate checksum of a buffer. More...
 

Public Attributes

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

Detailed Description

Class to calculate CRCs of varying formats.

Member Function Documentation

◆ checksum()

uint32_t RadioLibCRC::checksum ( 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: