Debian Codegraph @

docs/modbus_disable_quirks.md

raw symbols SCIP
1 # modbus_disable_quirks
2
3 ## Name
4
5 modbus_disable_quirks - disable a list of quirks according to a mask
6
7 ## Synopsis
8
9 ```c
10 int modbus_disable_quirks(modbus_t *ctx, unsigned int quirks_mask);
11 ```
12
13 ## Description
14
15 The function shall disable the quirks according to the provided mask. It's
16 useful to revert changes applied by a previous call to
17 [modbus_enable_quirks](modbus_enable_quirks.md)
18
19 To reset all quirks, you can use the specific value `MODBUS_QUIRK_ALL`.
20
21 ```c
22 modbus_enable_quirks(ctx, MODBUS_QUIRK_MAX_SLAVE | MODBUS_QUIRK_REPLY_TO_BROADCAST);
23
24 ...
25
26 // Reset all quirks
27 modbus_disable_quirks(ctx, MODBUS_QUIRK_ALL);
28 ```
29
30 ## Return value
31
32 The function shall return 0 if successful. Otherwise it shall return -1 and set
33 errno.
34
35 ## See also
36
37 - [modbus_enable_quirks](modbus_enable_quirks.md)