1
0
mirror of https://github.com/UzixLS/picocom.git synced 2025-07-19 07:21:18 +03:00

338 Commits

Author SHA1 Message Date
637f7b375e Cleanup / refactor fd_printf and similar functions 2017-12-21 12:56:26 +02:00
aa58944f34 Manpage formatting tweaks 2017-12-21 04:16:32 +02:00
8fb2cd409d Bumped version to 3.0a 2017-12-21 01:23:07 +02:00
0ec7213956 Updated manual and regenerated docs 2017-12-20 11:11:14 +02:00
89be292023 Workaround for drivers with broken flush
term_flush() does not work with some drivers. If we try to drain or even
close the port while there are still data in it's output buffers *and*
flow-control is enabled, we may block forever. So we "fake" a flush, by
temporarily setting f/c to none, waiting for any data in the output
buffer to drain, and then reseting f/c to it's original setting.
2017-12-20 09:48:00 +02:00
e6653b45b5 Do not drain the port when exiting by command
If picocom exits due to an "Exit" or "Quit" command, the contents of the
output queue (data read from the terminal but not written to the port)
are, anyway, discarded. Because of this, there is no reason to wait for
the O/S output buffer (data already written to the port but not
transmitted) to drain before exiting. The output port (output buffer) is
instead flushed (data discarded) before exiting due to a command.
2017-12-20 06:42:14 +02:00
82d69071c3 Fix HUPCL handling
Picocom will always set the HUPCL control bit of the serial port,
according to the --noreset option. If --noreset is given, then
HUPCL for the port is cleared, and will remain so after exiting
picocom. If --noreset is *not* given, then HUPCL is set for the
port, and will remain so after exiting picocom. This is true, regardless
of the way picocom terminates (command, read zero-bytes from standard
input, killed by signal, etc), and regardless of the --noinit
option. If picocom exits with the "Quit" command, then --noreset is
assumed given. Almost always this is the most DWIM behavior.

Fixes #72
2017-12-20 05:59:55 +02:00
33c2332c18 Set correct term_errno when tcflush fails. 2017-12-20 01:31:08 +02:00
69e16a3a70 Factor-out cleanup code from fatal() and main() 2017-12-19 22:05:42 +02:00
a99d1f8b69 Better example (manual) 2017-12-19 17:31:38 +02:00
cb4e363fe1 Show message "Ignoring init-string..." 2017-12-19 17:30:30 +02:00
977cc7e084 Minor refactoring of KEY_QUIT handling
Now more similar with KEY_EXIT handling
2017-12-19 14:24:53 +02:00
c48f6aa78e Suppress help message if escape char is disabled 2017-12-17 22:43:54 +02:00
d1f439b38d Moved drain delay into term.c 2017-12-17 22:14:08 +02:00
2503f0ecfa Clean up error, signal, and exit handling
- Exit with failure if killed by signal
- Write fatal error messages to standard error
- Minor fixes on signal handling for children processes
2017-12-17 22:12:32 +02:00
ad5ad83983 Typo 2017-12-16 22:30:19 +02:00
9fbf4d1c11 Show initstring length 2017-12-16 22:29:56 +02:00
cea5f644c7 Regenerated documentation 2017-12-16 20:15:54 +02:00
9c21667903 Comments 2017-12-16 20:05:47 +02:00
0eb644a9be Updated CONTRIBUTORS 2017-12-16 19:00:15 +02:00
49041a2ef6 Added the --no-escape command-line option
Disables the escape character so that picocom can never enter command
mode.
2017-12-16 18:11:33 +02:00
8110b68477 Set the max tty output queue size to 0 (unlimited) 2017-12-16 17:40:38 +02:00
12d46e056c Made tty output queue dynamically growable.
Closes #33
2017-12-16 17:36:43 +02:00
b0e694c7c8 Added section EXITING PICOCOM to manual 2017-12-16 14:51:37 +02:00
2ff1431827 Improved termination handling
Drain tty output buffer before exiting.
Exit whith the INT signal.
2017-12-16 14:49:46 +02:00
e9385b0ece Added the --exit command-line option
Exit picocom immediatelly after opening and configuring the serial
port. Do *not* read *anything* from the standard input or from the
serial port. If an init string is also given, picocom exits imediatelly
after sending (writing) the init string to the serial port. Again,
nothing is read from the standard input, or from the serial port. The
ouput map, the local echo option, and the local-echo map are observed
when sending the init string. The **--exit** option, overrides
the **--exit-after** option.
2017-12-16 10:51:34 +02:00
423c93fe5e Documentation edits 2017-12-15 11:16:59 +02:00
5ccc25ad94 Standard input handling
- Allow stdin to be a non-tty (print a warning, though). Some things may
  not work as expected in this case, but most will, and it's useful in
  several occasions.

- If picocom reads zero bytes from stdin, then:

  - If --exit-after is set, then keep operating (without reading from
    stdin) until the idle timeout expires, or we are killed by a signal

  - Otherwise, exit picocm, but only after transmitting the contens of
    the output queue.
2017-12-15 00:13:40 +02:00
a5ea42b616 Minor re-wording 2017-12-14 20:06:36 +02:00
91ee0d4851 Regenerated documentation 2017-12-14 18:47:32 +02:00
6fdd2a3084 Added commandline option --quiet
Suppress picocom from printing initial greetings banners and other
messages not explicitly requested by the user. Command responses and
errors or warnings are still printed.
2017-12-14 18:44:44 +02:00
2d075e971e Regenerated docs 2017-12-14 14:02:13 +02:00
b744b93264 Improvements for exit-after and initstring
Treat initstring as if entered manually at the terminal.
Do not set select(1) timeout if exit-after is negative.
2017-12-14 13:59:07 +02:00
6d3066eeb8 Free initstring before exiting (being pendantic) 2017-12-14 11:43:28 +02:00
c6c753e31a Added --exit-after command-line option
Exit picocom after remaining idle for a specified time. Picocom is
considered idle if: Nothing is read (received) from the serial port,
there is nothing to write (send) to the serial port, and nothing is read
from the terminal.
2017-12-14 11:36:01 +02:00
417effcd6b Formatting 2017-12-14 10:24:00 +02:00
14c671873e Typo 2017-12-12 23:47:15 +02:00
bf9c2a49b5 Comments 2017-12-12 23:36:43 +02:00
4d507bb407 Merge pull request #62 from JoeMerten/osx-custom-baudrate
OSX custom baudrates: fixed and refactored
2017-12-12 21:21:34 +02:00
f577f202b4 Re-generated manual page 2017-12-12 21:07:55 +02:00
1c06d12908 Merge pull request #65 from mgrela/master
Add option to send an initstring before dropping to the main loop
2017-12-12 21:04:18 +02:00
e7e471c3aa Merge pull request #68 from baruchsiach/make-vars-override
Makefile: use environment set variables
2017-12-12 20:53:26 +02:00
050212069a Merge pull request #66 from raymanfx/master
Initial Android makefile
2017-12-12 20:47:59 +02:00
a9916283fa Merge pull request #67 from bryant1410/master
Fix broken headings in Markdown files
2017-12-12 20:46:16 +02:00
e0e051fd8d Whitespace 2017-12-12 20:44:20 +02:00
801dbbaa7e Merge pull request #70 from the-dem/more-compat
Add compatibility with 1.x
2017-12-12 20:38:49 +02:00
d8433da4b0 Add compatibility with 1.x
This allows 2.x to use the same switches as 1.x thus allowing for it to be a drop-in replacement.

This is especially useful where picocom is used from a proprietary binary.
2017-07-04 18:28:54 +10:00
fef9ede422 Makefile: use environment set variables
Allow extending the toolchain related variables from the environment. This is
particularly useful when cross compiling, since it allows adding target
specific parameters.

Leave LD alone since it is used to link the final picocom binary. The default
ld linker can't do that without explicitly specifying the C library.
2017-05-30 10:37:04 +03:00
1568233e0b Fix broken Markdown headings 2017-04-16 16:45:50 -03:00
a1cc4f9128 Add option to send an initstring before dropping to the main loop 2017-03-20 22:47:46 +01:00