serial

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2022 License: MIT Imports: 1 Imported by: 15

Documentation

Overview

Package serial provides a serial port, which provides the io.ReadWriter interface, that provides the connection between the at or gsm packages and the physical modem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(options ...Option) (*serial.Port, error)

New creates a serial port.

This is currently a simple wrapper around tarm serial.

Types

type Baud added in v0.2.0

type Baud int

Baud is the bit rate for the serial line.

func WithBaud added in v0.2.0

func WithBaud(b int) Baud

WithBaud sets the baud rate for the serial port.

type Config added in v0.2.0

type Config struct {
	// contains filtered or unexported fields
}

Config contains the configuration parameters of the serial port.

type Option added in v0.2.0

type Option interface {
	// contains filtered or unexported methods
}

Option is a construction option that modifies the behaviour of the serial port.

type Port added in v0.2.0

type Port string

Port identifies the serial port on the plaform.

func WithPort added in v0.2.0

func WithPort(p string) Port

WithPort specifies the port for the serial port.

Jump to

Keyboard shortcuts

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