mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Rework toggle and pulse feature to support all lines
Replace existing toggle and pulse key commands with the following generalized key commands which allows to toggle or pulse all serial port lines: ctrl-t g Toggle serial port line ctrl-t p Pulse serial port line When used, user will be asked which serial line to toggle or pulse. Also introduce --line-pulse-duration option for setting specific pulse duration in milliseconds for each serial line using a key value pair format. Each key represents a serial line. The following keys are available: DTR, RTS, CTS, DSR, DCD, RI. Example: $ tio /dev/ttyUSB0 --line-pulse-duration DTR=200,RTS=300,RI=50 Likewise, the pulse duration can also be set via configuration file using the line-pulse-duration variable: line-pulse-duration = DTR=200,RTS=300,RI=50
This commit is contained in:
parent
35f249394c
commit
3903880106
9 changed files with 277 additions and 83 deletions
|
|
@ -49,7 +49,12 @@ struct option_t
|
|||
char *parity;
|
||||
int output_delay;
|
||||
int output_line_delay;
|
||||
int dtr_pulse_duration;
|
||||
unsigned int dtr_pulse_duration;
|
||||
unsigned int rts_pulse_duration;
|
||||
unsigned int cts_pulse_duration;
|
||||
unsigned int dsr_pulse_duration;
|
||||
unsigned int dcd_pulse_duration;
|
||||
unsigned int ri_pulse_duration;
|
||||
bool no_autoconnect;
|
||||
bool log;
|
||||
bool log_strip;
|
||||
|
|
@ -69,3 +74,5 @@ extern struct option_t option;
|
|||
void options_print();
|
||||
void options_parse(int argc, char *argv[]);
|
||||
void options_parse_final(int argc, char *argv[]);
|
||||
|
||||
void line_pulse_duration_option_parse(const char *arg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue