Swapped RTU CRC byte order

This commit is contained in:
Valerio De Benedetto 2022-05-12 18:59:21 +02:00
parent 452115ca89
commit 3904a6c52f

View File

@ -193,7 +193,7 @@ static uint16_t crc_calc(const uint8_t* data, uint32_t length) {
} }
} }
return crc; return (uint16_t) (crc << 8) | (uint16_t) (crc >> 8);
} }