Skip to content

Commit

Permalink
Added support for 4800 and 2400 baud rates
Browse files Browse the repository at this point in the history
  • Loading branch information
dallinski committed May 9, 2013
1 parent 6e81330 commit 33e7a6e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions serial_posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ func openPort(name string, baud int) (rwc io.ReadWriteCloser, err error) {
speed = C.B19200
case 9600:
speed = C.B9600
case 4800:
speed = C.B4800
case 2400:
speed = C.B2400
default:
f.Close()
return nil, fmt.Errorf("Unknown baud rate %v", baud)
Expand Down

0 comments on commit 33e7a6e

Please sign in to comment.