eRPC API Reference  Rev. 1.12.0
NXP Semiconductors
erpc::Crc16 Class Reference

Class for compute crc16. More...

#include <erpc_crc16.hpp>

Public Member Functions

 Crc16 (uint32_t crcStart)
 Constructor. More...
 
 Crc16 (void)
 Constructor.
 
 ~Crc16 (void)
 Crc16 destructor.
 
uint16_t computeCRC16 (const uint8_t *data, uint32_t lengthInBytes)
 Compute a ITU-CCITT CRC-16 over the provided data. More...
 
void setCrcStart (uint32_t crcStart)
 Set crc start number. More...
 

Protected Attributes

uint32_t m_crcStart
 

Detailed Description

Class for compute crc16.

Constructor & Destructor Documentation

Crc16::Crc16 ( uint32_t  crcStart)
explicit

Constructor.

Parameters
[in]crcStartStart value for crc function.

Member Function Documentation

uint16_t Crc16::computeCRC16 ( const uint8_t *  data,
uint32_t  lengthInBytes 
)

Compute a ITU-CCITT CRC-16 over the provided data.

This implementation is slow but small in size.

Parameters
[in]dataPointer to data used for crc16.
[in]lengthInBytesData length.
void Crc16::setCrcStart ( uint32_t  crcStart)

Set crc start number.

Parameters
[in]crcStartCrc start number.

Member Data Documentation

uint32_t erpc::Crc16::m_crcStart
protected

CRC start number.


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