projects
/
svn42.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53647f4
)
test termios set speed
author
Bernhard Tittelbach
<xro@realraum.at>
Thu, 21 Nov 2013 11:41:08 +0000
(11:41 +0000)
committer
Bernhard Tittelbach
<xro@realraum.at>
Thu, 21 Nov 2013 11:41:08 +0000
(11:41 +0000)
go/termios/termios.go
patch
|
blob
|
history
diff --git
a/go/termios/termios.go
b/go/termios/termios.go
index
11325c9
..
71ba332
100644
(file)
--- a/
go/termios/termios.go
+++ b/
go/termios/termios.go
@@
-119,3
+119,16
@@
func SetRaw () {
if err = tty_raw (); err != nil { return }
//if err = screenio (); err != nil { return }
}
+
+func SetSpeed (speed uint) {
+ var err error
+
+ defer func () {
+ if err != nil { fmt.Printf ("SetSpeed Error: %v\n",err) }
+ } ();
+
+ if err = getTermios (&orig_termios); err != nil { return }
+ orig_termios.c_ispeed = speed_t(speed)
+ orig_termios.c_ospeed = speed_t(speed)
+ err = setTermios (&orig_termios)
+}