Documentation ¶
Overview ¶
Package serial provides an implementation of a POSIX serial port along with an implementation of net.Conn.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaudRate ¶
type BaudRate byte
BaudRate is the baud rate type.
const ( // BaudRate0 is a baud rate of 0 bps BaudRate0 BaudRate = iota // BaudRate50 is a baud rate of 50 bps BaudRate50 // BaudRate75 is a baud rate of 75 bps BaudRate75 // BaudRate110 is a baud rate of 110 bps BaudRate110 // BaudRate134 is a baud rate of 134 bps BaudRate134 // BaudRate150 is a baud rate of 150 bps BaudRate150 // BaudRate200 is a baud rate of 200 bps BaudRate200 // BaudRate300 is a baud rate of 300 bps BaudRate300 // BaudRate600 is a baud rate of 600 bps BaudRate600 // BaudRate1200 is a baud rate of 1200 bps BaudRate1200 // BaudRate1800 is a baud rate of 1800 bps BaudRate1800 // BaudRate2400 is a baud rate of 2400 bps BaudRate2400 // BaudRate4800 is a baud rate of 4800 bps BaudRate4800 // BaudRate7200 is a baud rate of 7200 bps BaudRate7200 // BaudRate9600 is a baud rate of 9600 bps BaudRate9600 // BaudRate14400 is a baud rate of 14400 bps BaudRate14400 // BaudRate19200 is a baud rate of 19200 bps BaudRate19200 // BaudRate28800 is a baud rate of 28800 bps BaudRate28800 // BaudRate38400 is a baud rate of 38400 bps BaudRate38400 // BaudRate57600 is a baud rate of 57600 bps BaudRate57600 // BaudRate100000 is a baud rate of 100000 bps BaudRate100000 // BaudRate115200 is a baud rate of 115200 bps BaudRate115200 // BaudRate230400 is a baud rate of 230400 bps BaudRate230400 )
type DataBits ¶
type DataBits byte
DataBits is the data bits type.
const ( // DataBits5 signifies communications with 5-bit data words. DataBits5 DataBits = iota // DataBits6 signifies communications with 6-bit data words. DataBits6 // DataBits7 signifies communications with 7-bit data words. DataBits7 // DataBits8 signifies communications with 8-bit data words. DataBits8 )
type Port ¶
type Port interface { // Path returns the path. Path() string // BaudRate returns the current baud rate. BaudRate() BaudRate // SetBaudRate changes the baud rate. SetBaudRate(baudRate BaudRate) error // Parity returns the current parity check setting. Parity() Parity // SetParity changes the parity check setting. SetParity(parity Parity) error // DataBits returns the current data bits setting. DataBits() DataBits // SetDataBits changes the data bits setting. SetDataBits(dataBits DataBits) error // StopBits returns the current stop bits setting. StopBits() StopBits // SetStopBits changes the stop bits setting. SetStopBits(stopBits StopBits) error // SetDeadline changes the read and write deadlines. SetDeadline(time.Time) error // SetReadDeadline changes the read deadline. SetReadDeadline(time.Time) error // SetWriteDeadline changes the write deadline. SetWriteDeadline(time.Time) error io.Reader io.Writer io.Closer }
Port defines the interface for a POSIX serial port.
type PortAddr ¶ added in v0.2.0
type PortAddr struct {
// contains filtered or unexported fields
}
PortAddr is a net.Addr implementation for a serial.Port
Click to show internal directories.
Click to hide internal directories.