nuttx-apps/system/stty/Makefile
fangpeina be038ce406 system: Add stty utility for terminal control
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>
2026-08-14 07:51:00 -03:00

32 lines
1.2 KiB
Makefile

############################################################################
# apps/system/stty/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
#
############################################################################
include $(APPDIR)/Make.defs
# stty - set terminal options
PROGNAME = stty
PRIORITY = $(CONFIG_SYSTEM_STTY_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_STTY_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_STTY)
MAINSRC = stty_main.c
include $(APPDIR)/Application.mk