openMSX
|
This class calculates CRC numbers for the polygon x^16 + x^12 + x^5 + 1. More...
#include <CRC16.hh>
Public Member Functions | |
constexpr | CRC16 (uint16_t initialCRC=0xffff) |
Create CRC16 with an optional initial value. | |
constexpr void | init (uint16_t initialCRC) |
(Re)initialize the current value | |
constexpr void | init (std::initializer_list< uint8_t > list) |
constexpr void | update (uint8_t value) |
Update CRC with one byte. | |
constexpr void | update (std::span< const uint8_t > data) |
For large blocks (e.g. | |
constexpr uint16_t | getValue () const |
Get current CRC value. | |
This class calculates CRC numbers for the polygon x^16 + x^12 + x^5 + 1.
|
inlineexplicitconstexpr |
|
inlineconstexpr |
Get current CRC value.
Definition at line 89 of file CRC16.hh.
Referenced by openmsx::RawTrack::calcCrc(), openmsx::WD2793::getDataReg(), openmsx::TC8566AF::serialize(), openmsx::WD2793::serialize(), and TEST_CASE().
|
inlineconstexpr |
|
inlineconstexpr |
(Re)initialize the current value
Definition at line 30 of file CRC16.hh.
Referenced by openmsx::TC8566AF::serialize(), openmsx::WD2793::serialize(), and TEST_CASE().
|
inlineconstexpr |
|
inlineconstexpr |
Update CRC with one byte.
Definition at line 45 of file CRC16.hh.
Referenced by openmsx::WD2793::getDataReg(), init(), TEST_CASE(), and openmsx::RawTrack::updateCrc().