2020-05-29 22:45:25 +08:00
|
|
|
# Copyright (c) 2020 PHYTEC Messtechnik GmbH
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2021-03-04 00:55:14 +08:00
|
|
|
menuconfig MODBUS
|
2021-03-03 02:26:04 +08:00
|
|
|
bool "Modbus support"
|
2022-09-27 00:13:43 +08:00
|
|
|
select CRC
|
2020-05-29 22:45:25 +08:00
|
|
|
|
2021-03-03 02:26:04 +08:00
|
|
|
if MODBUS
|
2020-05-29 22:45:25 +08:00
|
|
|
|
2021-03-03 02:26:04 +08:00
|
|
|
config MODBUS_BUFFER_SIZE
|
2020-05-29 22:45:25 +08:00
|
|
|
int "Modbus buffer size"
|
|
|
|
default 256
|
|
|
|
range 64 256
|
|
|
|
help
|
|
|
|
Modbus buffer size.
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Supported node roles"
|
2021-03-03 02:26:04 +08:00
|
|
|
default MODBUS_ROLE_CLIENT_SERVER
|
2020-05-29 22:45:25 +08:00
|
|
|
help
|
|
|
|
Specify the type of supported node roles.
|
|
|
|
|
2021-03-03 02:26:04 +08:00
|
|
|
config MODBUS_ROLE_CLIENT
|
2020-05-29 22:45:25 +08:00
|
|
|
bool "Client support"
|
|
|
|
|
2021-03-03 02:26:04 +08:00
|
|
|
config MODBUS_ROLE_SERVER
|
2020-05-29 22:45:25 +08:00
|
|
|
bool "Server support"
|
|
|
|
|
2021-03-03 02:26:04 +08:00
|
|
|
config MODBUS_ROLE_CLIENT_SERVER
|
2020-05-29 22:45:25 +08:00
|
|
|
bool "Client and server support"
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
2021-03-03 02:26:04 +08:00
|
|
|
config MODBUS_SERVER
|
2020-05-29 22:45:25 +08:00
|
|
|
bool
|
2021-03-03 02:26:04 +08:00
|
|
|
default y if MODBUS_ROLE_SERVER || MODBUS_ROLE_CLIENT_SERVER
|
2020-05-29 22:45:25 +08:00
|
|
|
|
2021-03-03 02:26:04 +08:00
|
|
|
config MODBUS_CLIENT
|
2020-05-29 22:45:25 +08:00
|
|
|
bool
|
2021-03-03 02:26:04 +08:00
|
|
|
default y if MODBUS_ROLE_CLIENT || MODBUS_ROLE_CLIENT_SERVER
|
2020-05-29 22:45:25 +08:00
|
|
|
|
2021-03-04 00:55:14 +08:00
|
|
|
config MODBUS_SERIAL
|
|
|
|
bool "Modbus over serial line support"
|
2022-09-01 00:35:57 +08:00
|
|
|
default y
|
2021-03-04 00:55:14 +08:00
|
|
|
depends on SERIAL && SERIAL_HAS_DRIVER
|
2022-09-01 00:35:57 +08:00
|
|
|
depends on DT_HAS_ZEPHYR_MODBUS_SERIAL_ENABLED
|
2023-11-13 16:47:24 +08:00
|
|
|
select UART_USE_RUNTIME_CONFIGURE
|
2021-03-04 00:55:14 +08:00
|
|
|
help
|
|
|
|
Enable Modbus over serial line support.
|
|
|
|
|
2021-03-03 02:26:04 +08:00
|
|
|
config MODBUS_ASCII_MODE
|
2021-03-04 00:55:14 +08:00
|
|
|
depends on MODBUS_SERIAL
|
2020-05-29 22:45:25 +08:00
|
|
|
bool "Modbus transmission mode ASCII"
|
|
|
|
help
|
|
|
|
Enable ASCII transmission mode.
|
|
|
|
|
2021-03-11 07:42:21 +08:00
|
|
|
config MODBUS_RAW_ADU
|
|
|
|
bool "Modbus raw ADU support"
|
|
|
|
help
|
|
|
|
Enable Modbus raw ADU support.
|
|
|
|
|
|
|
|
config MODBUS_NUMOF_RAW_ADU
|
|
|
|
int "Number of raw ADU instances"
|
|
|
|
depends on MODBUS_RAW_ADU
|
|
|
|
range 1 4
|
|
|
|
help
|
|
|
|
Number of raw ADU instances.
|
|
|
|
|
2021-03-03 02:26:04 +08:00
|
|
|
config MODBUS_FP_EXTENSIONS
|
2020-05-29 22:45:25 +08:00
|
|
|
bool "Floating-Point extensions"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Enable Floating-Point extensions
|
|
|
|
|
2021-03-03 02:26:04 +08:00
|
|
|
config MODBUS_FC08_DIAGNOSTIC
|
2022-03-09 19:05:12 +08:00
|
|
|
bool "FC08 Diagnostic support"
|
2021-03-03 02:26:04 +08:00
|
|
|
depends on MODBUS_SERVER
|
2020-05-29 22:45:25 +08:00
|
|
|
default y
|
|
|
|
help
|
|
|
|
Enable function code 08 Diagnostic support
|
|
|
|
|
2021-03-03 02:26:04 +08:00
|
|
|
module = MODBUS
|
|
|
|
module-str = Modbus Support
|
|
|
|
module-help = Sets log level for Modbus support
|
2020-05-29 22:45:25 +08:00
|
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
|
|
|
|
|
|
endif
|