Added SetStopBits (linux only)

This commit is contained in:
Cristian Maglie
2014-12-14 18:50:29 +01:00
parent 3351cd50e0
commit f84dc80d3e
3 changed files with 28 additions and 1 deletions

View File

@@ -23,6 +23,9 @@ type SerialPort interface {
// Set data bits
SetDataBits(bits int) error
// Set stop bits
SetStopBits(bits StopBits) error
}
type Parity int
@@ -35,6 +38,14 @@ const (
PARITY_SPACE
)
type StopBits int
const (
STOPBITS_ONE StopBits = iota
STOPBITS_ONEPOINTFIVE
STOPBITS_TWO
)
// Platform independent error type for serial ports
type SerialPortError struct {
err string