mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-25 07:27:16 +00:00
This commit adds a system utily 'stty' to NuttX, providing a standard Unix-like interface for configuring terminal (TTY) device settings. The command allows runtime configuration of termios attributes for serial ports and other character devices. Usage examples: # Set raw mode on ttyS0 (for binary communication) nsh> stty -F /dev/ttyS0 raw -echo # Set console mode for interactive terminal nsh> stty -F /dev/ttyS0 cooked # Display current settings nsh> stty -F /dev/ttyS0 # Configure stdin (if it's a TTY) nsh> stty echo icanon # Set baudrate (if driver support) nsh> stty -F /dev/ttyS1 speed 115200 Signed-off-by: fangpeina <fangpeina@xiaomi.com>
26 lines
617 B
Text
26 lines
617 B
Text
#
|
|
# For a description of the syntax of this configuration file,
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
#
|
|
|
|
menuconfig SYSTEM_STTY
|
|
tristate "stty - set terminal options"
|
|
default n
|
|
depends on SERIAL_TERMIOS
|
|
---help---
|
|
Enable the stty command to configure terminal (TTY) settings.
|
|
This command allows you to view and change terminal attributes
|
|
such as echo, canonical mode, and line endings.
|
|
|
|
if SYSTEM_STTY
|
|
|
|
config SYSTEM_STTY_PRIORITY
|
|
int "stty task priority"
|
|
default 100
|
|
|
|
config SYSTEM_STTY_STACKSIZE
|
|
int "stty stack size"
|
|
default DEFAULT_TASK_STACKSIZE
|
|
|
|
endif # SYSTEM_STTY
|
|
|