serial

package
v0.0.0-...-6da897e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2022 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parity

type Parity byte
const (
	ParityNone  Parity = 'N'
	ParityOdd   Parity = 'O'
	ParityEven  Parity = 'E'
	ParityMark  Parity = 'M' // parity bit is always 1
	ParitySpace Parity = 'S' // parity bit is always 0
)

type SerialPortConfig

type SerialPortConfig struct {
	Baud        int
	ReadTimeout time.Duration
	// Size is the number of data bits. If 0, DefaultSize is used.
	Size byte
	// Parity is the bit to use and defaults to ParityNone (no parity bit).
	Parity Parity
	// Number of stop bits to use. Default is 1 (1 stop bit).
	StopBits StopBits
}

type StopBits

type StopBits byte
const (
	Stop1     StopBits = 1
	Stop1Half StopBits = 15
	Stop2     StopBits = 2
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL