serial: add CONFIG_TTY_LAUNCH support

this allow user start new program from tty

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd
2021-12-15 13:40:45 +08:00
committed by Xiang Xiao
parent cff2bc05e0
commit 75aec04330
7 changed files with 200 additions and 3 deletions
@@ -19,6 +19,22 @@ Serial Device Drivers
``/dev/ttyS0``, ``/dev/ttyS1``, etc. See the
``uart_register()`` implementation in ``drivers/serial.c``.
- **TTY_LAUNCH** this depends on ``CONFIG_TTY_LAUNCH``, this feature
allow user launch a new program with a special char input.
e.g. use ctrl+R to start a nuttx shell.
e.g. use ctrl+E to start user entry.
You can use ``TTY_LAUNCH_CHAR`` to customize which special char.
You can choose launch method:
``TTY_LAUNCH_ENTRY`` or ``TTY_LAUNCH_FILE``,
If``TTY_LAUNCH_ENTRY`` you can set program entery by ``TTY_LAUNCH_ENTRYPOINT``.
If``TTY_LAUNCH_FILE`` you can set file path by ``TTY_LAUNCH_FILEPATH``.
Also, you can customize:
``TTY_LAUNCH_ARGS`` ``TTY_LAUNCH_PRIORITY`` ``TTY_LAUNCH_STACKSIZE``
- **User Access**. Serial drivers are, ultimately, normal
`character drivers <#chardrivers>`__ and are accessed as other
character drivers.