Added SetParity (still missing windows implementation)

This commit is contained in:
Cristian Maglie
2014-12-14 17:54:16 +01:00
parent 340397b32a
commit 1d5eedba28
3 changed files with 53 additions and 2 deletions

View File

@@ -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