table of contents
- bookworm 3.1.6-2.1
MODBUS_RTU_SET_SERIA(3) | libmodbus Manual | MODBUS_RTU_SET_SERIA(3) |
NAME¶
modbus_rtu_set_serial_mode - set the serial mode
SYNOPSIS¶
int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode);
DESCRIPTION¶
The modbus_rtu_set_serial_mode() function shall set the selected serial mode:
MODBUS_RTU_RS232
MODBUS_RTU_RS485
This function is only supported on Linux kernels 2.6.28 onwards.
RETURN VALUE¶
The function shall return 0 if successful. Otherwise it shall return -1 and set errno to one of the values defined below.
ERRORS¶
EINVAL
ENOTSUP
If the call to ioctl() fails, the error code of ioctl will be returned.
AUTHORS¶
The libmodbus documentation was written by Stéphane Raimbault <stephane.raimbault@gmail.com>
10/15/2022 | libmodbus v3.1.6 |