modbus_rtu_set_custom_rts.txt
1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
modbus_rtu_set_custom_rts(3)
============================
NAME
----
modbus_rtu_set_custom_rts - set a function to be used for custom RTS implementation
SYNOPSIS
--------
*int modbus_rtu_set_custom_rts(modbus_t *'ctx', void (*'set_rts') (modbus_t *ctx, int on))*
DESCRIPTION
-----------
The _modbus_rtu_set_custom_rts()_ function shall set a custom function to be
called when the RTS pin is to be set before and after a transmission. By default
this is set to an internal function that toggles the RTS pin using an ioctl
call.
Note that this function adheres to the RTS mode, the values MODBUS_RTU_RTS_UP or
MODBUS_RTU_RTS_DOWN must be used for the function to be called.
This function can only be used with a context using a RTU backend.
RETURN VALUE
------------
The _modbus_rtu_set_custom_rts()_ function shall return 0 if successful.
Otherwise it shall return -1 and set errno to one of the values defined below.
ERRORS
------
*EINVAL*::
The libmodbus backend is not RTU.
AUTHORS
-------
Jimmy Bergström <jimmy@ekontroll.com>
The libmodbus documentation was written by Stéphane Raimbault
<stephane.raimbault@gmail.com>