1# Copyright (c) 2020 PHYTEC Messtechnik GmbH 2# SPDX-License-Identifier: Apache-2.0 3 4DT_COMPAT_MODBUS_RTU := zephyr,modbus-serial 5 6menuconfig MODBUS 7 bool "Modbus support" 8 9if MODBUS 10 11config MODBUS_BUFFER_SIZE 12 int "Modbus buffer size" 13 default 256 14 range 64 256 15 help 16 Modbus buffer size. 17 18choice 19 prompt "Supported node roles" 20 default MODBUS_ROLE_CLIENT_SERVER 21 help 22 Specify the type of supported node roles. 23 24config MODBUS_ROLE_CLIENT 25 bool "Client support" 26 27config MODBUS_ROLE_SERVER 28 bool "Server support" 29 30config MODBUS_ROLE_CLIENT_SERVER 31 bool "Client and server support" 32 33endchoice 34 35config MODBUS_SERVER 36 bool 37 default y if MODBUS_ROLE_SERVER || MODBUS_ROLE_CLIENT_SERVER 38 39config MODBUS_CLIENT 40 bool 41 default y if MODBUS_ROLE_CLIENT || MODBUS_ROLE_CLIENT_SERVER 42 43config MODBUS_SERIAL 44 bool "Modbus over serial line support" 45 depends on SERIAL && SERIAL_HAS_DRIVER 46 default $(dt_compat_enabled,$(DT_COMPAT_MODBUS_RTU)) 47 help 48 Enable Modbus over serial line support. 49 50config MODBUS_ASCII_MODE 51 depends on MODBUS_SERIAL 52 bool "Modbus transmission mode ASCII" 53 help 54 Enable ASCII transmission mode. 55 56config MODBUS_RAW_ADU 57 bool "Modbus raw ADU support" 58 help 59 Enable Modbus raw ADU support. 60 61config MODBUS_NUMOF_RAW_ADU 62 int "Number of raw ADU instances" 63 depends on MODBUS_RAW_ADU 64 range 1 4 65 help 66 Number of raw ADU instances. 67 68config MODBUS_FP_EXTENSIONS 69 bool "Floating-Point extensions" 70 default y 71 help 72 Enable Floating-Point extensions 73 74config MODBUS_FC08_DIAGNOSTIC 75 bool "Enable FC08 Diagnostic support" 76 depends on MODBUS_SERVER 77 default y 78 help 79 Enable function code 08 Diagnostic support 80 81module = MODBUS 82module-str = Modbus Support 83module-help = Sets log level for Modbus support 84source "subsys/logging/Kconfig.template.log_config" 85 86endif 87