shell: add a directory for backends

This change organizes the file structure for the shell.
Files implementing backends are moved to a separate folder.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
Jakub Rzeszutko 2021-10-01 10:53:29 +02:00 committed by Christopher Friedt
commit f29d46ac4a
9 changed files with 29 additions and 27 deletions

View file

@ -1,6 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
add_subdirectory(modules)
add_subdirectory(backends)
zephyr_sources_ifdef(
CONFIG_SHELL
@ -11,23 +12,8 @@ zephyr_sources_ifdef(
)
zephyr_sources_ifdef(
CONFIG_SHELL_BACKEND_SERIAL
shell_uart.c
)
zephyr_sources_ifdef(
CONFIG_SHELL_BACKEND_DUMMY
shell_dummy.c
)
zephyr_sources_ifdef(
CONFIG_SHELL_BACKEND_RTT
shell_rtt.c
)
zephyr_sources_ifdef(
CONFIG_SHELL_BACKEND_TELNET
shell_telnet.c
CONFIG_SHELL_LOG_BACKEND
shell_log_backend.c
)
zephyr_sources_ifdef(
@ -50,11 +36,6 @@ zephyr_sources_ifdef(
shell_history.c
)
zephyr_sources_ifdef(
CONFIG_SHELL_LOG_BACKEND
shell_log_backend.c
)
zephyr_sources_ifdef(
CONFIG_SHELL_WILDCARD
shell_wildcard.c

View file

@ -15,7 +15,7 @@ if SHELL
module = SHELL
module-str = Shell
source "subsys/logging/Kconfig.template.log_config"
source "subsys/shell/Kconfig.backends"
source "subsys/shell/backends/Kconfig.backends"
config SHELL_MINIMAL
bool "Default config to reduce flash and memory requirements"

View file

@ -0,0 +1,21 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_sources_ifdef(
CONFIG_SHELL_BACKEND_SERIAL
shell_uart.c
)
zephyr_sources_ifdef(
CONFIG_SHELL_BACKEND_DUMMY
shell_dummy.c
)
zephyr_sources_ifdef(
CONFIG_SHELL_BACKEND_RTT
shell_rtt.c
)
zephyr_sources_ifdef(
CONFIG_SHELL_BACKEND_TELNET
shell_telnet.c
)