More organization - need to use the new flow for probing
This commit is contained in:
@@ -1,14 +1,8 @@
|
||||
// Package communication will handle the data transmission with the peripheral
|
||||
// device
|
||||
package communication
|
||||
|
||||
import (
|
||||
"github.com/tarm/serial"
|
||||
)
|
||||
|
||||
const (
|
||||
StartOfText = 0x02
|
||||
EndOfText = 0x03
|
||||
"esdi/peripheral/types"
|
||||
)
|
||||
|
||||
type CommState uint8
|
||||
@@ -18,16 +12,9 @@ const (
|
||||
CommOff
|
||||
)
|
||||
|
||||
type Command uint8
|
||||
|
||||
const (
|
||||
CmdRequestID Command = iota
|
||||
CmdRequestID types.Command = iota
|
||||
CmdAckID
|
||||
CmdCreateScreen
|
||||
CmdCreateWindow
|
||||
)
|
||||
|
||||
type DataReceiver interface {
|
||||
Read(dev *serial.Port) error
|
||||
Validate(data []byte) bool
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user