From e624bfae0656bbd04532a0e65c05a9f1db4f6904 Mon Sep 17 00:00:00 2001 From: ian Date: Thu, 8 Dec 2005 13:43:58 +0000 Subject: [PATCH] hexbin-term wip --- scripts/hexterm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 scripts/hexterm diff --git a/scripts/hexterm b/scripts/hexterm new file mode 100755 index 0000000..848312e --- /dev/null +++ b/scripts/hexterm @@ -0,0 +1,25 @@ +#!/usr/bin/tclsh8.4 + +if {[llength $argv] != 1} { error "need serial port arg" } + +set port [lindex $argv 0] + +set port_stty [exec stty -F $port -g] +set term_stty [exec stty -g] + +set e [catch { + exec stty min 0 time 0 -istrip -ocrnl -onlcr -onocr -opost \ + -ctlecho -echo -echoe -echok -echonl -iexten -isig + exec stty -F $port min 0 time 0 -istrip -ocrnl -onlcr -onocr -opost \ + -ctlecho -echo -echoe -echok -echonl -iexten -isig \ + 9600 clocal cread -crtscts -hup -parenb cs8 -cstopb \ + -ixoff bs0 cr0 ff0 nl0 -ofill -olcuc -onlcr + set p [open $port {RDWR|NONBLOCK} 0] + fconfigure $p -blocking false -buffering none + fconfigure stdin -blocking false -buffering none + fconfigure stdin -blocking false -buffering none +}] + +fconfigure stdin -blocking true +exec stty $term_stty +exec stty -F $port $port_stty -- 2.30.2