serial

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SerialCur = T{
	Name: "",
	Mode: serial.Mode{
		BaudRate: 115200,
		Parity:   serial.NoParity,
		DataBits: 8,
		StopBits: serial.OneStopBit,
	},
	Port: nil,
}

Functions

func Close

func Close() error

Close serial port

func Find

func Find() []string

Find ports

func GrReceive

func GrReceive()

func GrRxPrase

func GrRxPrase(c chan string)

func GrTransmit

func GrTransmit()

func Open

func Open(name string) error

Open serial port

func Receive

func Receive(buff []byte) ([]byte, error)

Receive data

func SendCmd

func SendCmd(act uint8, v variable.T) error

func Transmit

func Transmit(data []byte) error

Transmit data

Types

type T

type T struct {
	Name string
	Mode serial.Mode
	Port serial.Port
}

Jump to

Keyboard shortcuts

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