serial

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadSerial

func LoadSerial(m *Serial) error

func LoadSerials

func LoadSerials() error

func Shutdown

func Shutdown() error

func Startup

func Startup() error

Types

type Serial

type Serial struct {
	tunnel.Tunnel `xorm:"extends"`

	PortName   string `json:"port_name,omitempty"`   //port, e.g. COM1 "/dev/ttySerial1".
	BaudRate   uint   `json:"baud_rate,omitempty"`   //9600 115200
	DataBits   uint   `json:"data_bits,omitempty"`   //5 6 7 8
	StopBits   uint   `json:"stop_bits,omitempty"`   //1 2
	ParityMode int    `json:"parity_mode,omitempty"` //0 1 2 NONE ODD EVEN
}

Serial 串口

func GetSerial

func GetSerial(id string) *Serial

func (*Serial) Open

func (s *Serial) Open() error

Open 打开

Jump to

Keyboard shortcuts

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