1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-10-31 20:16:07 +00:00

Generalised CRC generation and created specific subclasses for the CCITT CRC16 and CRC32.

This commit is contained in:
Thomas Harte
2018-05-23 22:21:57 -04:00
parent d3c5e4267f
commit 853261364e
10 changed files with 89 additions and 40 deletions

View File

@@ -14,8 +14,7 @@ using namespace Storage::Disk;
MFMController::MFMController(Cycles clock_rate) :
Storage::Disk::Controller(clock_rate),
shifter_(&crc_generator_),
crc_generator_(0x1021, 0xffff) {
shifter_(&crc_generator_) {
}
void MFMController::process_index_hole() {
@@ -49,7 +48,7 @@ MFMController::Token MFMController::get_latest_token() {
return latest_token_;
}
NumberTheory::CRC16 &MFMController::get_crc_generator() {
CRC::CCITT &MFMController::get_crc_generator() {
return crc_generator_;
}