Add Pulse DTR command

MCUs like the ESP32 can be reset if the serial port DTR line is
pulsed for a short time.  You could just type CTRL-t d CTRL-t d
but that's a little awkward since you have to lift your finger
off the CTRL key to type the Ds.  Now you can just type CTRL-T D.

* Added new command "D" to pulse the DTR line.  I.E.  Toggle its
  state twice with a configurable duration between toggles.

* Added new config/command line option "--dtr-pulse-duration"
  to set the duration between the DTR state toggles.  The default
  is 100ms.
This commit is contained in:
George Joseph 2022-07-07 10:45:37 -06:00
parent a717631207
commit f24cee61e7
8 changed files with 42 additions and 0 deletions

View file

@ -124,6 +124,10 @@ static int data_handler(void *user, const char *section, const char *name,
{
option.output_delay = atoi(value);
}
else if (!strcmp(name, "dtr-pulse-duration"))
{
option.dtr_pulse_duration = atoi(value);
}
else if (!strcmp(name, "no-autoconnect"))
{
if (!strcmp(value, "enable"))