mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Enter non-interactive mode when piping to tio
Add support for a non interactive mode which allows other application to pipe data to tio which then forwards the data to the connected serial device. Non ineractive means that tio does not react to interactive key commands in the incoming stream. This allows users to pipe binary data directly to the connected serial device. Example use: $ cat commands.txt | tio /dev/ttyUSB0
This commit is contained in:
parent
a37ad26a88
commit
dba77eb912
3 changed files with 27 additions and 9 deletions
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#define KEY_QUESTION 0x3f
|
||||
#define KEY_B 0x62
|
||||
#define KEY_C 0x63
|
||||
|
|
@ -48,3 +50,5 @@ void tty_configure(void);
|
|||
int tty_connect(void);
|
||||
void tty_wait_for_device(void);
|
||||
void list_serial_devices(void);
|
||||
|
||||
extern bool interactive_mode;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue