This commit is contained in:
Brad Nelson
2021-02-13 09:16:45 -08:00
parent 0d1553f614
commit 1229e2dc57

View File

@ -1,5 +1,10 @@
also posix also posix also termios
s" /dev/ttyS3" r/w O_NONBLOCK or open-file throw constant remote s" /dev/ttyS3" r/w O_NONBLOCK or open-file throw constant remote
256 constant ICRNL
create remote-termios sizeof(termios) allot
remote remote-termios tcgetattr drop
remote-termios .c_lflag l@ ICRNL INVERT and remote-termios .c_lflag l!
remote TCSAFLUSH remote-termios tcsetattr drop
: remote-type ( a n -- ) remote write-file throw ; : remote-type ( a n -- ) remote write-file throw ;
: remote-emit ( ch -- ) >r rp@ 1 remote-type rdrop ; : remote-emit ( ch -- ) >r rp@ 1 remote-type rdrop ;
: remote-key ( -- ch|0 ) : remote-key ( -- ch|0 )