serial9p

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: MIT Imports: 13 Imported by: 1

Documentation

Overview

Package serial9p makes serial ports accessible through the 9P protocol. A serport.Port may be exported as a 9P file server that should behave much like Plan 9's /dev/eia* serial line devices. Functions MountConn and OpenFSDev provide 9P client access.

See https://plan9.io/magic/man2html/3/uart for details about the file system interface, and cmd/sercom for an example.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountConn

func MountConn(conn net.Conn, basename string) (port serport.Port, c *clnt.Clnt, err error)

Mount a 9P server using a previously established connection, and wrap ctl and data files of a remote serial device into a serport.Port. Basename is the a file name prefix or directory, where the device is expected to be found. It can be "", if ctl and data files live in the 9P servers root directory

func OpenFsDev

func OpenFsDev(devdir string) (port serport.Port, err error)

Connect to a serial device that is accessible in the local file system, e.g. driven by a 9pfuse mounted 9P service. Devdir is the name of a directory, where the files "ctl" and "data" are expected to be found.

func RegisterFiles9P

func RegisterFiles9P(dir *srv.File, dev serport.Port, user p.User) (err error)

Link ctl and data files (that wrap a previously opened serial port) into an existing 9P file tree `dir'.

Types

This section is empty.

Jump to

Keyboard shortcuts

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