1MODBUS_RTU_SET_CUSTO(3) libmodbus Manual MODBUS_RTU_SET_CUSTO(3)
2
3
4
6 modbus_rtu_set_custom_rts - set a function to be used for custom RTS
7 implementation
8
10 int modbus_rtu_set_custom_rts(modbus_t *ctx, void (set_rts) (modbus_t
11 ctx, int on))
12
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
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
31 EINVAL
32 The libmodbus backend is not RTU.
33
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 07/21/2022 MODBUS_RTU_SET_CUSTO(3)