Commit Graph

23 Commits

Author SHA1 Message Date
ligd
5a0ab205ca serial: merge serial check signo to one place
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-01-10 17:07:32 +01:00
ligd
75aec04330 serial: add CONFIG_TTY_LAUNCH support
this allow user start new program from tty

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-01-01 20:38:26 +08:00
ligd
136662f5f9 serial: add ctrl+@ to force crash system for debugging
Change-Id: Iee65ac6c94ff298cfadf4429936b3744c16b8698
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-13 14:45:09 -03:00
Alin Jerpelea
13e4f9b6b2 drivers: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-05-31 02:58:08 -05:00
ligd
24cc83e46f serial/serial_dma.c: fix warnnings
serial/serial_dma.c: In function ‘uart_recvchars_done’:
serial/serial_dma.c:407:7: warning: implicit declaration of function ‘nxsig_kill’ [-Wimplicit-function-declaration]
  407 |       nxsig_kill(dev->pid, signo);
      |       ^~~~~~~~~~

Change-Id: I9e1c0341ecce3033889d11fff9ec2b9e3dfe303b
2021-03-07 01:45:51 -08:00
Xiang Xiao
0536953ded Kernel module should prefer functions with nx/kmm prefix
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 08:57:58 +01:00
ligd
6ad1181923 serial: should include <signal.h> explicitly
Change-Id: I20260ad3bcceb30207c9c12041dd95de41e13777
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-12-29 04:21:42 -08:00
Juha Niskanen
ca7a7ccbeb Fix some typos in comments
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-08 18:58:20 +01:00
Yoshinori Sugino
c13f869432 Modify SIGSTP to SIGTSTP
Follow the POSIX description.
SIGTSTP should be sent when the Ctrl-Z characters is encountered, not SIGSTP.

Testing:
Built with hifive1-revb:nsh (CONFIG_SERIAL_TERMIOS=y, CONFIG_SIG_DEFAULT=y and CONFIG_TTY_SIGTSTP=y)
2020-10-29 01:12:43 -07:00
Xiang Xiao
650e18baa1 serial: Shouldn't mangle pid when ISIG is changed
Let's check ISIG flag directly instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I060f70eefc79b1c34aa11ed4071179d2ae5fa5ca
2020-09-25 06:48:26 -07:00
Xiang Xiao
5c80b94820 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
ligd
6710ba47d8 drivers/serial/serial_dma.c: Still need reset xmit buffer when meet TCOFLUSH. This is an amendment to 8fb19a4359. 2019-11-07 06:40:21 -06:00
Gregory Nutt
c8831ac3c8 drivers/serial/serial_io.c and serial_dma.c: Fix some long lines. 2019-11-06 07:10:24 -06:00
ligd
8fb19a4359 drivers/serial/serial_dma.c: Avoid uart_xmitchars_done() move the tail bigger then head. If ioctl(TCOFLUSH) occurs between uart_xmitchars_dma() and uart_xmitchars_done(), TCOFLUSH will reset xmit buffer, then uart_xmitchars_done() will move the 'tail' ahead of 'head', then sends lots of wrong data. 2019-11-06 07:07:30 -06:00
Gregory Nutt
0d203fd535 drivers/serial: The upper half serial driver configuration CONFIG_SERIAL_DMA used to enable DMA on both RX and TX streams. This was replaced with CONFIG_SERIAL_RXDMA and CONFIG_SERIAKL_TXDMA which will permit supporting DMA on only one or both streams. 2019-04-24 12:11:40 -06:00
Gregory Nutt
993321dda6 drivers/serial: Add support for Ctrl-Z. This works just like the recently added Ctrl-C support except that SIGSTP is sent when the Ctrl-Z characters is encountered vs. SIGINT. 2018-09-02 15:36:25 -06:00
Xiang Xiao
51708745f6 drivers/serial/serial_dma.c: Fix typo error in uart_recvchars_dma() 2018-08-29 08:31:43 -06:00
Gregory Nutt
0756cf66ed sched/signal: Add support for SIGINT in addition to SIGKILL. drivers/serial: Use SIGINT instead of SIGKILL when control-C is pressed. 2018-08-28 12:15:31 -06:00
Gregory Nutt
c0d234a474 Squashed commit of the following:
drivers/serial/Kconfig:  It is no longer necessary to restrict Ctrl-C handling to the FLAT build

    sched/signal:  Add a new configuration option to select signal default actions, separate handling of signal default actions from both task startup logic and from the serial TTY Ctrl-C logic.  Add a signal set in the group structure to keep track of what signals have been set to the default action.  In dispatching signals in PROTECTED or KERNEL mode, use this signal set to determine if the default signal handler is attached and dispatch the signal in kernel mode for the default actions.
2018-08-27 11:40:09 -06:00
Xiang Xiao
9e922873d4 drivers/serial: Move head/tail pointer reset to uart_recvchars_dma since dma may be still transferring in the background. 2018-08-26 10:03:30 -06:00
ligd
11f8dc735c Squashed commit of the following:
drivers/serial:  Add Ctrl-C/Ctrl-X support.  This is an initial working implementation that still requires that several details be resolved.

    sched/task/task_start.c: Add default signal action to SIGKILL.
2018-08-26 08:49:08 -06:00
Gregory Nutt
ab9d124528 serial: Remove confusing inline functions. Correct attribution for serial DMA logic 2015-11-15 08:39:01 -06:00
Gregory Nutt
7f1ac36194 Serial driver: Move serial DMA logic to a separate file 2015-11-15 07:58:08 -06:00