feat(shell): Add commands to configure Modbus

- Implement a new 'modbus' command in the shell.
- Add sub-commands 'set_baud', 'set_id', and 'show'.
- Add validation for baud rate and slave ID inputs.
- The new parameters are applied to the Modbus server at runtime, allowing for live reconfiguration of the communication settings.
- The shell backend is set to RTT.
This commit is contained in:
2025-07-01 15:27:57 +02:00
parent b836f9a2f4
commit 6a9e4773ea
6 changed files with 170 additions and 21 deletions

View File

@@ -6,4 +6,4 @@ list(APPEND BOARD_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(slave_node)
target_sources(app PRIVATE src/main.c)
target_sources(app PRIVATE src/main.c src/shell_modbus.c)