aboutsummaryrefslogtreecommitdiff
path: root/forth/ff-shell.tcl
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-09-21 22:44:31 +0200
committerDimitri Sokolyuk <demon@dim13.org>2018-09-21 22:44:31 +0200
commita7ac30a16cb4e2338ded87235deb352c1055da16 (patch)
treee0afce2adbe7eba8b5fc8b80b20491548229c9d5 /forth/ff-shell.tcl
parent55aa48a0137694efcf11ed66070690589596d2aa (diff)
add core.fs
Diffstat (limited to 'forth/ff-shell.tcl')
-rwxr-xr-xforth/ff-shell.tcl10
1 files changed, 3 insertions, 7 deletions
diff --git a/forth/ff-shell.tcl b/forth/ff-shell.tcl
index 4fd1ae3..1aca0cb 100755
--- a/forth/ff-shell.tcl
+++ b/forth/ff-shell.tcl
@@ -62,11 +62,10 @@ set ::dataBits 8; # 7 8
set ::stopBits 1; # 1 2
set ::parityAndBits "$::parity,$::dataBits,$::stopBits"
set ::handShake xonxoff; # none xonxoff rtscts
-if { [string equal $::tcl_platform(platform) windows] } {
- console show
- set ::serialPortName {\\.\com5}
-} else {
+if { [string equal $::tcl_platform(os) Linux] } {
set ::serialPortName "/dev/ttyACM0"
+} else {
+ set ::serialPortName "/dev/cuaU0"
}; # end if
set ::portState closed
@@ -131,9 +130,6 @@ proc openSerialPort {} {
chan configure $::tty -mode $::baudRate,$::parityAndBits -timeout 10 \
-encoding binary -translation binary -handshake $::handShake \
-buffering none -buffersize 8192 -blocking false
- if { [string equal $::tcl_platform(platform) windows] } {
- chan configure $::tty -sysbuffer 8192
- }
chan event $::tty readable [list serialIn $::tty]
set ::portState open
}