Added SetStopBits (linux only)
This commit is contained in:
11
serial.go
11
serial.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user