Documentation ¶
Index ¶
Constants ¶
View Source
const ( KeyTestConnection = 0x00 Key1 = 0x01 Key2 = 0x02 Key3 = 0x03 KeyUp = 0x04 KeyDown = 0x05 KeyLeft = 0x06 KeyRight = 0x07 KeyOk = 0x08 )
key selection bit
View Source
const ( KeyActionRequireTest = 0x00 KeyActionConnectionOk = 0x01 KeyActionPress = 0x01 KeyActionRelease = 0x02 )
key action bit
View Source
const DeviceSpecialProtocol = 0x00
View Source
const ProtocolHead = 0x01
Variables ¶
View Source
var Conn serial.Port
View Source
var EnableRead bool
View Source
var EnableReadMtx sync.Mutex
View Source
var TestConnectionSend = []byte{ProtocolHead, DeviceSpecialProtocol, KeyTestConnection, KeyActionRequireTest, 0x00, 0x00, 0x00, 0x00}
Functions ¶
func ConnectSerial ¶
ConnectSerial connects to the serial port
func GetPortList ¶
GetPortList returns a list of available serial ports
func RealtimeRead ¶
func RealtimeRead()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.