serial

package
v3.6.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package serial implements cross platform UART support exposed by the operating system.

On POSIX, it is via devfs. On Windows, it is via Windows specific APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enumerate

func Enumerate() ([]int, error)

Enumerate returns the available serial buses as exposed by the OS.

TODO(maruel): Port number are likely not useful, we need port names.

Types

type Port

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

Port is an open serial port.

func (*Port) CTS

func (p *Port) CTS() gpio.PinIn

CTS implements uart.Pins.

func (*Port) Close

func (p *Port) Close() error

Close implements uart.PortCloser.

func (*Port) Connect

func (p *Port) Connect(f physic.Frequency, stopBit uart.Stop, parity uart.Parity, flow uart.Flow, bits int) (conn.Conn, error)

Connect implements uart.Port.

func (*Port) LimitSpeed

func (p *Port) LimitSpeed(f physic.Frequency) error

LimitSpeed implements uart.PortCloser.

func (*Port) RTS

func (p *Port) RTS() gpio.PinOut

RTS implements uart.Pins.

func (*Port) RX

func (p *Port) RX() gpio.PinIn

RX implements uart.Pins.

func (*Port) String

func (p *Port) String() string

String implements uart.Port.

func (*Port) TX

func (p *Port) TX() gpio.PinOut

TX implements uart.Pins.

Jump to

Keyboard shortcuts

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