Currently shell UART backend is interrupt driven if UART driver is interrupt driven. That can be limitation if one instance wants to use interrupts but shell UART should not. Added option to shell uart to be able to control use of interrupts. By default interrupts are enabled if driver supports it. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
144 lines
3.4 KiB
Plaintext
144 lines
3.4 KiB
Plaintext
# Kconfig.backends - Shell badckends configuration options
|
|
|
|
#
|
|
# Copyright (c) 2018 Nordic Semiconductor ASA
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
menuconfig SHELL_BACKENDS
|
|
bool "Enable shell backends"
|
|
default y
|
|
help
|
|
Enable shell backends.
|
|
|
|
if SHELL_BACKENDS
|
|
|
|
config SHELL_BACKEND_SERIAL
|
|
bool "Enable serial backends."
|
|
default y
|
|
select SERIAL
|
|
select RING_BUFFER
|
|
help
|
|
Enable serial backends.
|
|
|
|
if SHELL_BACKEND_SERIAL
|
|
|
|
# Internal config to enable UART interrupts if supported.
|
|
config SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN
|
|
bool "Interrupt driven"
|
|
default y if UART_INTERRUPT_DRIVEN
|
|
depends on SERIAL_SUPPORT_INTERRUPT
|
|
|
|
config SHELL_BACKEND_SERIAL_TX_RING_BUFFER_SIZE
|
|
int "Set TX ring buffer size"
|
|
default 8
|
|
depends on SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN
|
|
help
|
|
If UART is utilizing DMA transfers then increasing ring buffer size
|
|
increases transfers length and reduces number of interrupts.
|
|
|
|
config SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE
|
|
int "Set RX ring buffer size"
|
|
default 64
|
|
help
|
|
RX ring buffer size impacts accepted latency of handling incoming
|
|
bytes by shell. If shell input is coming from the keyboard then it is
|
|
usually enough if ring buffer is few bytes (more than one due to
|
|
escape sequences). However, if bulk data is transferred it may be
|
|
required to increase it.
|
|
|
|
config SHELL_BACKEND_SERIAL_RX_POLL_PERIOD
|
|
int "RX polling period (in milliseconds)"
|
|
default 10
|
|
depends on !SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN
|
|
help
|
|
Determines how often UART is polled for RX byte.
|
|
|
|
choice
|
|
prompt "Initial log level limit"
|
|
default SHELL_BACKEND_SERIAL_LOG_LEVEL_DEFAULT
|
|
|
|
config SHELL_BACKEND_SERIAL_LOG_LEVEL_DEFAULT
|
|
bool "System limit (LOG_MAX_LEVEL)"
|
|
|
|
config SHELL_BACKEND_SERIAL_LOG_LEVEL_DBG
|
|
bool "Debug"
|
|
|
|
config SHELL_BACKEND_SERIAL_LOG_LEVEL_INF
|
|
bool "Info"
|
|
|
|
config SHELL_BACKEND_SERIAL_LOG_LEVEL_WRN
|
|
bool "Warning"
|
|
|
|
config SHELL_BACKEND_SERIAL_LOG_LEVEL_ERR
|
|
bool "Error"
|
|
|
|
config SHELL_BACKEND_SERIAL_LOG_LEVEL_NONE
|
|
bool "None"
|
|
|
|
endchoice
|
|
|
|
config SHELL_BACKEND_SERIAL_LOG_LEVEL
|
|
int
|
|
default 0 if SHELL_BACKEND_SERIAL_LOG_LEVEL_NONE
|
|
default 1 if SHELL_BACKEND_SERIAL_LOG_LEVEL_ERR
|
|
default 2 if SHELL_BACKEND_SERIAL_LOG_LEVEL_WRN
|
|
default 3 if SHELL_BACKEND_SERIAL_LOG_LEVEL_INF
|
|
default 4 if SHELL_BACKEND_SERIAL_LOG_LEVEL_DBG
|
|
default 5 if SHELL_BACKEND_SERIAL_LOG_LEVEL_DEFAULT
|
|
|
|
endif #SHELL_BACKEND_SERIAL
|
|
|
|
config SHELL_BACKEND_RTT
|
|
bool "Enable RTT backend."
|
|
select USE_SEGGER_RTT
|
|
select RTT_CONSOLE
|
|
help
|
|
Enable RTT backend.
|
|
|
|
if SHELL_BACKEND_RTT
|
|
|
|
choice
|
|
prompt "Initial log level limit"
|
|
default SHELL_BACKEND_RTT_LOG_LEVEL_DEFAULT
|
|
|
|
config SHELL_BACKEND_RTT_LOG_LEVEL_DEFAULT
|
|
bool "System limit (LOG_MAX_LEVEL)"
|
|
|
|
config SHELL_BACKEND_RTT_LOG_LEVEL_DBG
|
|
bool "Debug"
|
|
|
|
config SHELL_BACKEND_RTT_LOG_LEVEL_INF
|
|
bool "Info"
|
|
|
|
config SHELL_BACKEND_RTT_LOG_LEVEL_WRN
|
|
bool "Warning"
|
|
|
|
config SHELL_BACKEND_RTT_LOG_LEVEL_ERR
|
|
bool "Error"
|
|
|
|
config SHELL_BACKEND_RTT_LOG_LEVEL_NONE
|
|
bool "None"
|
|
|
|
endchoice
|
|
|
|
config SHELL_BACKEND_RTT_LOG_LEVEL
|
|
int
|
|
default 0 if SHELL_BACKEND_RTT_LOG_LEVEL_NONE
|
|
default 1 if SHELL_BACKEND_RTT_LOG_LEVEL_ERR
|
|
default 2 if SHELL_BACKEND_RTT_LOG_LEVEL_WRN
|
|
default 3 if SHELL_BACKEND_RTT_LOG_LEVEL_INF
|
|
default 4 if SHELL_BACKEND_RTT_LOG_LEVEL_DBG
|
|
default 5 if SHELL_BACKEND_RTT_LOG_LEVEL_DEFAULT
|
|
|
|
endif #SHELL_BACKEND_RTT
|
|
|
|
config SHELL_BACKEND_DUMMY
|
|
bool "Enable dummy backend."
|
|
help
|
|
Enable dummy backend which can be used to execute commands with no
|
|
need for physical transport interface.
|
|
|
|
endif # SHELL_BACKENDS
|