Commit Graph

24 Commits

Author SHA1 Message Date
Juha Niskanen
2b88677895 system/cu: do not reset baud rate to zero when parity options are used
cfsetspeed() now stores baud rate to c_cflag member of
struct termios, so it must not be overridden later on.

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-20 01:08:22 +08:00
Juha Niskanen
a20cf0980d system/cu: do not exit directly from getopt loop, bad in flat builds
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-20 01:08:22 +08:00
Oleg Evseev
fcd3937d7c system/cu: refactor, add option -c to disable \n -> \r\n conversion
option -c will disable \n -> \r\n conversion both for serial device and console if it is a tty

refactor: use only one function to set termios parameters, use termious related code and options only if CONFIG_SERIAL_TERMIOS is defined
2020-08-14 00:58:55 +01:00
Xiang Xiao
e4b101d2ef system/cu: Echo NULL char too
since zero is also a valid character

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-16 20:50:40 +09:00
Ouss4
7694f21292 system/cu/cu_main.c: Fix nxstyle complaints. 2020-03-13 16:36:03 -06:00
Oleg Evseev
df5d4cd033 system/cu/cu_main.c: Add option -f to loop forever. 2020-03-13 16:36:03 -06:00
Oleg Evseev
f221d33525 system/cu/cu_main.c: Fix wrongly swapped parity options. 2020-03-13 16:36:03 -06:00
David Alessio
91276ba94e apps/system/cu/cu_main.c: (1) Fix early exit. getc(stdin) can return 0 the first time around. (2) Set optind to zero. getopt() was being left in a bad state, causing parsing errors on second use. (3) Fix priority of cu_listen(). (4) Add suppor for -h. 2019-11-05 07:07:02 -06:00
Xiang Xiao
e806097c70 Application.mk and main.c files: Change builtin's entry point from main to xxx_main by macro expansion. This change make the entry point fully compliant with POSIX/ANSI standard. 2019-10-06 06:14:56 -06:00
anchao
b5cfd93444 apps/: Modification to build system: Unified application compilation rules 2018-09-03 09:29:56 -06:00
Gregory Nutt
b33eaf881d apps/system/cu: Fix undefined SIGKILL if CONFIG_SIG_DEFUALT is not defined. 2018-08-29 05:39:01 -06:00
Gregory Nutt
a1b9fc8bd8 apps/system/cu: SIGKILL is more appropriate that SIGINT in this circustance. 2018-08-28 12:09:25 -06:00
Gregory Nutt
bb4c5c49ef Replace usage of SIGKILL with SIGINIT 2018-08-28 12:02:26 -06:00
anchao
220653f21c Squashed commit of the following:
Author: anchao <anchao@pinecone.net>

     apps/, most main() function: Correct CONFIG_BUILD_LOADABLE usage
     Loadable apps/: Correct loadable symbol table generate
     apps/system/ubloxmodem:  Fix build break
     apps/examples/ostest: start restart/waitpid/user test from main loop
     apps/nshlib:  Expand reboot and poweroff commands to include a second, optional mode argument

    Author: Gregory Nutt <gnutt@nuttx.org>

     An attempt to fix build issues.  Does not work.
     apps/examples/ostest:  Fix some inappropriate renaming of static functions introduced with recent patches.
     apps/builtin/exec_builtin.c:  Fix a error introduced by recent comments.  Found in build testing.

    Author: anchao <anchao@pinecone.net>

     apps/builtin/exec_builtin.c:  Try posix_spawn if builtin apps do not have have an entry point.
     apps/Application.mk: introduce MODULE config to simplify tristate(m)
     apps/nsh:  Change the nuttx shell module type to tristate
     apps:  Add loadable application support
     script/mksymtab:  Generate symbol table name by default
     apps/builtin:  Allow loadable applications can register with apps/builtin.
2018-08-23 11:06:15 -06:00
ligd
feb1229dc3 apps/system/cu/cu_main.c: (1) Protect from possible re-definition of signal values, (2) Fix CU ctrl-C hand when remote core hang. 2018-08-23 07:05:09 -06:00
Gregory Nutt
2f982e9c77 Revert "Squashed commit of the following:"
This reverts commit 25b92edd9f.
2018-08-22 12:06:32 -06:00
anchao
25b92edd9f Squashed commit of the following:
apps/builtin/exec_builtin.c:  Try posix_spawn if builtin apps do not have have an entry point.
    apps/Application.mk: introduce MODULE config to simplify tristate(m)
    apps/nsh:  Change the nuttx shell module type to tristate
    apps:  Add loadable application support
    script/mksymtab:  Generate symbol table name by default
    apps/builtin:  Allow loadable applications can register with apps/builtin.
2018-08-22 09:30:38 -06:00
Juha Niskanen
0bcd50d7a1 apps/: Make more globals static to avoid name clashes 2017-05-19 07:13:12 -06:00
Sebastien Lorquet
2cbad44f1d This is the Pokemon patch to change all includes fronm <apps/bla/bla.h> to "bla/bla.h" 2016-07-11 10:11:18 -06:00
Gregory Nutt
cd741c82cf apps/include: Move all header files associated with modules in apps/system to apps/include/system 2016-07-01 06:48:22 -06:00
Gregory Nutt
aacfce081e Fix several cosmetic, C coding style issues 2015-10-03 11:03:42 -06:00
Gregory Nutt
ad1f59f497 apps/system/cu: Add a some configurable defaults (only to reduce my keystrokes in repetitive testing) 2014-12-13 13:11:06 -06:00
Gregory Nutt
dabe412e70 Add a minimalist implemention of the 'cu' terminal program (part of Taylor UUCP for ages). Using it, you can simply open a serial port and interact with it. Using '~.' you can leave the terminal program and drop back to nsh.
This might  come in handy for other people that have e.g. GSM modems, GPS receivers or other devices with text based serial communications attached to their Nuttx systems.
2014-12-13 10:36:37 -06:00
Gregory Nutt
bffa1da92a . 2014-12-13 10:34:11 -06:00