Closed Eitol closed 6 years ago
FastCRC16 CRC16;
void setup() { String buf = "123456789"; Serial.begin(9600); Serial.println( CRC16.kermit(reinterpret_cast<const uint8_t *>(buf.c_str()),(const uint16_t)buf.length()), HEX ); }
Out: 0x2189 https://www.lammertbies.nl out: 0x8921
Maybe. As I wrote in the doc, "Attention: sometimes you'll find byteswapped presentation of result in other implementations)". Just swap the Bytes.
FastCRC16 CRC16;
void setup() { String buf = "123456789"; Serial.begin(9600); Serial.println( CRC16.kermit(reinterpret_cast<const uint8_t *>(buf.c_str()),(const uint16_t)buf.length()), HEX ); }
Out: 0x2189 https://www.lammertbies.nl out: 0x8921