1MODBUS_RTU_SET_CUSTO(3)        libmodbus Manual        MODBUS_RTU_SET_CUSTO(3)
2
3
4

NAME

6       modbus_rtu_set_custom_rts - set a function to be used for custom RTS
7       implementation
8

SYNOPSIS

10       int modbus_rtu_set_custom_rts(modbus_t *ctx, void (set_rts) (modbus_t
11       ctx, int on))
12

DESCRIPTION

14       The modbus_rtu_set_custom_rts() function shall set a custom function to
15       be called when the RTS pin is to be set before and after a
16       transmission. By default this is set to an internal function that
17       toggles the RTS pin using an ioctl call.
18
19       Note that this function adheres to the RTS mode, the values
20       MODBUS_RTU_RTS_UP or MODBUS_RTU_RTS_DOWN must be used for the function
21       to be called.
22
23       This function can only be used with a context using a RTU backend.
24

RETURN VALUE

26       The modbus_rtu_set_custom_rts() function shall return 0 if successful.
27       Otherwise it shall return -1 and set errno to one of the values defined
28       below.
29

ERRORS

31       EINVAL
32           The libmodbus backend is not RTU.
33

AUTHORS

35       Jimmy Bergström <jimmy@ekontroll.com>
36
37       The libmodbus documentation was written by Stéphane Raimbault
38       <stephane.raimbault@gmail.com>
39
40
41
42libmodbus v3.1.6                  02/04/2022           MODBUS_RTU_SET_CUSTO(3)
Impressum