i2c

package
v0.0.0-...-a43b7d8 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device interface {
	SetAddress(address int) error
	ReadByteData(reg uint8) (val uint8, err error)
	ReadWordData(reg uint8) (val uint16, err error)
	WriteByteData(reg, val uint8) error
}

A Device is typically a *sysfs.I2cDevice (gobot.io/x/gobot/sysfs).

type Reader

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

func NewReader

func NewReader(dev Device) *Reader

func (*Reader) Byte

func (r *Reader) Byte(reg uint8) int

func (*Reader) Error

func (r *Reader) Error() error

func (*Reader) Read

func (r *Reader) Read(regs ...uint8) ([]byte, error)

func (*Reader) Reset

func (r *Reader) Reset()

func (*Reader) Signed

func (r *Reader) Signed(regs ...uint8) int

Jump to

Keyboard shortcuts

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