diff options
| author | Julian Blake Kongslie | 2022-05-29 16:36:11 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-05-29 16:36:11 -0700 |
| commit | 8f1db35363a7fa927296ed4484751ef3b0706594 (patch) | |
| tree | f5b440ede11e0828a18402635fc1bc1244ecc680 /tool/speedy-download | |
| parent | Move stty setup/teardown to separate script; add hconnect script. (diff) | |
| download | multipdp8-8f1db35363a7fa927296ed4484751ef3b0706594.tar.xz | |
Add extremely sus speedy-download tool which might have made Mike's FTDI
cable glitch enough to need a power cycle.
Diffstat (limited to '')
| -rwxr-xr-x | tool/speedy-download | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tool/speedy-download b/tool/speedy-download new file mode 100755 index 0000000..0da40d5 --- /dev/null +++ b/tool/speedy-download | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | set -eu | ||
| 4 | |||
| 5 | FILE="$1" | ||
| 6 | shift | ||
| 7 | |||
| 8 | echo "$@" > /dev/ttyUSB0 | ||
| 9 | |||
| 10 | cat "$FILE" >/dev/ttyUSB0 & | ||
| 11 | SEND=$! | ||
| 12 | |||
| 13 | cat -u /dev/ttyUSB0 & | ||
| 14 | RECV=$! | ||
| 15 | |||
| 16 | wait "$SEND" | ||
| 17 | sleep 1 | ||
| 18 | kill "$RECV" | ||
| 19 | wait | ||
