# README
github.com/albenik/go-serial/v2
A cross-platform serial library for Go. Forked from github.com/bugst/go-serial and now developing independently.
Many ideas are bein taken from github.com/bugst/go-serial and github.com/pyserial/pyserial.
Any PR-s are welcome.
INSTALL
Not work in GOPATH mode!!!
go get -u github.com/albenik/go-serial/v2
MacOS build note
- Since version v2.1.0 the macos build requires
IOKit
as dependency and is only possible on Mac with cgo enabled. - Apple M1 (darwin/arm64) is supported. (Thanks to martinhpedersen)
Documentation and examples
See the godoc here: https://pkg.go.dev/github.com/albenik/go-serial/v2
License
The software is release under a BSD 3-clause license
# Packages
Package enumerator is a golang cross-platform library for USB serial port discovery.
No description provided by the author
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
ErrorEnumeratingPorts an error occurred while listing serial port.
EvenParity enable even-parity check.
No description provided by the author
FunctionNotImplemented the requested function is not implemented.
InvalidDataBits the number of data bits is not valid or not supported.
InvalidParity the selected parity is not valid or not supported.
InvalidSerialPort the requested port is not a serial port.
InvalidSpeed the requested speed is not valid or not supported.
InvalidStopBits the selected number of stop bits is not valid or not supported.
InvalidTimeoutValue Invalid timeout value passed.
MarkParity enable mark-parity (always 1) check.
NoParity disable parity control (default).
OddParity enable odd-parity check.
OnePointFiveStopBits sets 1.5 stop bits.
OneStopBit sets 1 stop bit (default).
OsError Operating system function error.
PermissionDenied the user doesn't have enough priviledges.
PortBusy the serial port is already in used by another process.
PortClosed the port has been closed while the operation is in progress.
No description provided by the author
PortNotFound the requested port doesn't exist.
ReadFailed Port read failed.
SpaceParity enable space-parity (always 0) check.
TwoStopBits sets 2 stop bits.
WriteFailed Port write failed.
# Structs
ModemStatusBits contains all the modem status bits for a serial port (CTS, DSR, etc...).
Port is the interface for a serial Port.
PortError is a platform independent error type for serial ports.
# Type aliases
No description provided by the author
Parity describes a serial port parity setting.
PortErrorCode is a code to easily identify the type of error.
StopBits describe a serial port stop bits setting.