ModbusMaster
v2.0.1
Arduino library for communicating with Modbus slaves over RS232/485 (via RTU protocol).
|
Functions | |
static uint16_t | crc16_update (uint16_t crc, uint8_t a) |
Processor-independent CRC-16 calculation. More... | |
This header file provides functions for calculating cyclic redundancy checks (CRC) using common polynomials. Modified by Doc Walker to be processor-independent (removed inline assembler to allow it to compile on SAM3X8E processors).
|
static |
Processor-independent CRC-16 calculation.
Polynomial: x^16 + x^15 + x^2 + 1 (0xA001)
Initial value: 0xFFFF
This CRC is normally used in disk-drive controllers.
uint16_t | crc (0x0000..0xFFFF) |
uint8_t | a (0x00..0xFF) |