GY-63_MS5611/libraries/CRC/examples/CRC32_test/CRC32_test.ino
Rob Tillaart 8c94067119 1.0.1 CRC
2023-08-01 17:27:01 +02:00

49 lines
606 B
C++

//
// FILE: CRC32_test.ino
// AUTHOR: Rob Tillaart
// PURPOSE: demo
// DATE: 2021-01-20
// (c) : MIT
#include "CRC32.h"
char str[24] = "123456789";
CRC32 crc;
void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
// Serial.println("Verified with - http://zorc.breitbandkatze.de/crc.html \n");
test();
}
void loop()
{
}
void test()
{
crc.add((uint8_t*)str, 9);
Serial.println(crc.calc(), HEX);
crc.restart();
for (int i = 0; i < 9; i++)
{
crc.add(str[i]);
}
Serial.println(crc.calc(), HEX);
Serial.println(crc.count());
}
// -- END OF FILE --