Embedded Template Library  1.0
 All Classes Files Functions Variables Typedefs Friends Modules Pages
etl::crc16_ccitt< ENDIANNESS > Class Template Reference

#include <crc16_ccitt.h>

Public Types

typedef uint16_t value_type
 

Public Member Functions

 crc16_ccitt ()
 Default constructor.
 
template<typename TIterator >
 crc16_ccitt (TIterator begin, const TIterator end)
 
void reset ()
 Resets the CRC to the initial state.
 
template<typename TValue >
void add (TValue value)
 
void add (uint8_t value)
 
template<typename TIterator >
void add (TIterator begin, const TIterator end)
 
value_type value () const
 Gets the CRC value.
 
template<typename TValue >
crc16_ccitt< ENDIANNESS > & operator+= (TValue value)
 
 operator value_type () const
 Conversion operator to value_type.
 

Detailed Description

template<const int ENDIANNESS = endian::little>
class etl::crc16_ccitt< ENDIANNESS >

Calculates CRC-CCITT using polynomial 0x1021

Template Parameters
ENDIANNESSThe endianness of the calculation for input types larger than uint8_t. Default = endian::little.

Constructor & Destructor Documentation

template<const int ENDIANNESS = endian::little>
template<typename TIterator >
etl::crc16_ccitt< ENDIANNESS >::crc16_ccitt ( TIterator  begin,
const TIterator  end 
)
inline

Constructor from range.

Parameters
beginStart of the range.
endEnd of the range.

Member Function Documentation

template<const int ENDIANNESS = endian::little>
template<typename TValue >
void etl::crc16_ccitt< ENDIANNESS >::add ( TValue  value)
inline
Parameters
valueThe value to add to the CRC.
template<const int ENDIANNESS = endian::little>
void etl::crc16_ccitt< ENDIANNESS >::add ( uint8_t  value)
inline
Parameters
valueThe uint8_t to add to the CRC.
template<const int ENDIANNESS = endian::little>
template<typename TIterator >
void etl::crc16_ccitt< ENDIANNESS >::add ( TIterator  begin,
const TIterator  end 
)
inline
Parameters
beginStart of the range.
endEnd of the range.
template<const int ENDIANNESS = endian::little>
template<typename TValue >
crc16_ccitt<ENDIANNESS>& etl::crc16_ccitt< ENDIANNESS >::operator+= ( TValue  value)
inline
Parameters
valueThe value to add to the CRC.

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