diff --git a/doc/libmodbus.txt b/doc/libmodbus.txt index a051391..f8597d0 100644 --- a/doc/libmodbus.txt +++ b/doc/libmodbus.txt @@ -81,6 +81,8 @@ Set the serial mode:: linkmb:modbus_rtu_get_rts[3] linkmb:modbus_rtu_set_rts[3] linkmb:modbus_rtu_set_custom_rts[3] + linkmb:modbus_rtu_get_rts_delay[3] + linkmb:modbus_rtu_set_rts_delay[3] TCP (IPv4) Context diff --git a/src/modbus-rtu.c b/src/modbus-rtu.c index 02516e2..59abf23 100644 --- a/src/modbus-rtu.c +++ b/src/modbus-rtu.c @@ -1262,6 +1262,7 @@ modbus_t* modbus_new_rtu(const char *device, /* Calculate estimated time in micro second to send one byte */ ctx_rtu->onebyte_time = 1000000 * (1 + data_bit + (parity == 'N' ? 0 : 1) + stop_bit) / baud; + /* The internal function is used by default to set RTS */ ctx_rtu->set_rts = _modbus_rtu_ioctl_rts; /* The delay before and after transmission when toggling the RTS pin */