Versions in this module Expand all Collapse all v0 v0.0.1 Nov 30, 2021 Changes in this version + const PURGE_RXABORT — windows/amd64 + const PURGE_RXCLEAR — windows/amd64 + const PURGE_TXABORT — windows/amd64 + const PURGE_TXCLEAR — windows/amd64 + const TCFLSH — linux/amd64 + var ErrTimeout = errors.New("serial: timeout") + func GetCommState(handle syscall.Handle, dcb *c_DCB) (err error) — windows/amd64 + func GetCommTimeouts(handle syscall.Handle, timeouts *c_COMMTIMEOUTS) (err error) — windows/amd64 + func PurgeComm(h syscall.Handle) (err error) — windows/amd64 + func SetCommState(handle syscall.Handle, dcb *c_DCB) (err error) — windows/amd64 + func SetCommTimeouts(handle syscall.Handle, timeouts *c_COMMTIMEOUTS) (err error) — windows/amd64 + type Config struct + Address string + BaudRate int + DataBits int + Parity string + StopBits int + Timeout time.Duration + type LockingSerialPort struct + Path string + func NewLockingSerialPort(path string) *LockingSerialPort + func (lp *LockingSerialPort) Close() (err error) + func (lp *LockingSerialPort) Connect(config Config) (err error) + type Port interface + Flush func() error + Open func(*Config) error + func New() Port + func Open(c *Config) (p Port, err error)