SimpleModbusSlave allows you to communicate to any slave using the Modbus RTU protocol. The crc calculation is based on https://os.mbed.com/users/jpelletier/code/CRC/ The functions implemented are functions 3 and 16. read holding registers and preset multiple registers of the Modbus RTU Protocol. This implementation DOES NOT fully comply with the Modbus specifications.
Diff: SimpleModbusSlave.h
- Revision:
- 1:85e226914fb7
- Parent:
- 0:7c5265097fd2
--- a/SimpleModbusSlave.h Tue Oct 10 12:22:31 2017 +0000 +++ b/SimpleModbusSlave.h Wed Oct 25 10:38:11 2017 +0000 @@ -84,6 +84,7 @@ // function definitions void modbus_configure(long baud, char _slaveID, char _TxEnablePin, unsigned int _holdingRegsSize, unsigned char _lowLatency); unsigned int modbus_update(unsigned int *holdingRegs); - +unsigned int newdatarec(void); +unsigned int newdatasent(void); #endif