Versions in this module Expand all Collapse all v1 v1.0.1 Jul 26, 2019 Changes in this version + func GetPortsList() ([]string, error) + type Mode struct + BaudRate int + DataBits int + Parity Parity + StopBits StopBits + type ModemStatusBits struct + CTS bool + DCD bool + DSR bool + RI bool + type Parity int + const EvenParity + const MarkParity + const NoParity + const OddParity + const SpaceParity + type Port interface + Close func() error + GetModemStatusBits func() (*ModemStatusBits, error) + Read func(p []byte) (n int, err error) + ResetInputBuffer func() error + ResetOutputBuffer func() error + SendBreak func() error + SetDTR func(dtr bool) error + SetMode func(mode *Mode) error + SetRTS func(rts bool) error + Write func(p []byte) (n int, err error) + func Open(portName string, mode *Mode) (Port, error) + type PortError struct + func (e PortError) Code() PortErrorCode + func (e PortError) EncodedErrorString() string + func (e PortError) Error() string + type PortErrorCode int + const ErrorEnumeratingPorts + const FunctionNotImplemented + const InvalidDataBits + const InvalidParity + const InvalidSerialPort + const InvalidSpeed + const InvalidStopBits + const PermissionDenied + const PortBusy + const PortClosed + const PortNotFound + type StopBits int + const OnePointFiveStopBits + const OneStopBit + const TwoStopBits