Added SetParity (still missing windows implementation)
This commit is contained in:
13
serial.go
13
serial.go
@@ -17,8 +17,21 @@ type SerialPort interface {
|
||||
|
||||
// Set port speed
|
||||
SetSpeed(baudrate int) error
|
||||
|
||||
// Set port parity
|
||||
SetParity(parity Parity) error
|
||||
}
|
||||
|
||||
type Parity int
|
||||
|
||||
const (
|
||||
PARITY_NONE Parity = iota
|
||||
PARITY_ODD
|
||||
PARITY_EVEN
|
||||
PARITY_MARK
|
||||
PARITY_SPACE
|
||||
)
|
||||
|
||||
// Platform independent error type for serial ports
|
||||
type SerialPortError struct {
|
||||
err string
|
||||
|
||||
Reference in New Issue
Block a user