Hi, I want to calculate polynomial 0xEA crc8 checksum with 0x00 initial and final XOR . My char str = { 0x01 , 0x01, 0x00, 0x01} the crc8 should be 1A but is giving me A0 because is not calculating the 0x00 , if I will do calculation just for {0x01 , 0x01,0x01} then will be correct. Can anyone helps me please ?
#include "CRC.h"
char str[8] = {0x01, 0x01, 0x00, 0x01};
CRC8 crc;
void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
test();
}
void loop()
{
}
void test()
{
Serial.println(crc8((uint8_t *)str, 4, 0xEA), HEX);
}```