diff options
| -rwxr-xr-x | tool/connect (renamed from tool/setup-rs232) | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tool/setup-rs232 b/tool/connect index 689d838..536db5b 100755 --- a/tool/setup-rs232 +++ b/tool/connect | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | 2 | ||
| 3 | set -eux | 3 | set -eux |
| 4 | 4 | ||
| 5 | OLD_SETTINGS="$(stty -F /dev/ttyUSB0 -g)" | ||
| 6 | |||
| 5 | stty -F /dev/ttyUSB0 \ | 7 | stty -F /dev/ttyUSB0 \ |
| 6 | 115200 \ | 8 | 115200 \ |
| 7 | -drain \ | 9 | -drain \ |
| @@ -21,3 +23,7 @@ stty -F /dev/ttyUSB0 \ | |||
| 21 | -ixon \ | 23 | -ixon \ |
| 22 | -echo \ | 24 | -echo \ |
| 23 | -icanon | 25 | -icanon |
| 26 | |||
| 27 | con /dev/ttyUSB0 || true | ||
| 28 | |||
| 29 | stty -F "$OLD_SETTINGS" | ||
