Documentation
¶
Overview ¶
Package com reads from COM port.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Baud is the configured baudrate of the serial port. It is set as command line parameter. Baud int // Verbose shows additional information if set true. Verbose bool )
Functions ¶
Types ¶
type PortGoBugSt ¶
type PortGoBugSt struct {
// contains filtered or unexported fields
}
PortGoBugSt is a serial device trice receiver
func NewCOMPortGoBugSt ¶
func NewCOMPortGoBugSt(comPortName string) *PortGoBugSt
NewCOMPortGoBugSt creates an instance of a serial device type trice receiver
func (*PortGoBugSt) Open ¶
func (p *PortGoBugSt) Open() bool
Open initializes the serial receiver.
It opens a serial port.
func (*PortGoBugSt) Read ¶
func (p *PortGoBugSt) Read(buf []byte) (int, error)
Stores data received from the serial port into the provided byte array buffer. The function returns the number of bytes read.
The Read function blocks until (at least) one byte is received from the serial port or an error occurs.
type PortTarm ¶
type PortTarm struct {
// contains filtered or unexported fields
}
PortTarm is a serial device trice receiver.
func NewCOMPortTarm ¶
NewCOMPortTarm creates an instance of a serial device type trice receiver
Click to show internal directories.
Click to hide internal directories.