w1

package
v0.0.0-...-0e89859 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2015 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package w1 provides access to One-Wire devices over Netlink / Connector

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Master

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

Master is a 1-Wire Master device

func (*Master) Close

func (ms *Master) Close()

Close this Slave's connection

func (*Master) ListSlaves

func (ms *Master) ListSlaves() (slaves []Slave, err error)

ListSlaves returns a list of this master's slaves

type Slave

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

Slave is a 1-Wire slave device

func (*Slave) Close

func (s *Slave) Close()

Close this Slave's 1-Wire connection

func (*Slave) IsFamily

func (s *Slave) IsFamily(family byte) bool

IsFamily returns true if this Slave is of the given device family

func (*Slave) Read

func (s *Slave) Read(data []byte, pages int) ([]byte, error)

func (*Slave) String

func (s *Slave) String() string

func (*Slave) Write

func (s *Slave) Write(data []byte) error

type W1

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

W1 is a 1-Wire connection

func (*W1) Close

func (w1 *W1) Close()

Close closes this 1-Wire connection

func (*W1) ListMasters

func (w1 *W1) ListMasters() (masters []Master, err error)

ListMasters returns a list of the current list masters

func (*W1) Open

func (w1 *W1) Open() (err error)

Open a connection to the 1-Wire subsystem

Jump to

Keyboard shortcuts

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