i2c

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

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

func OpenBus

func OpenBus(busID int) (*Bus, error)

func (*Bus) GetDevice

func (b *Bus) GetDevice(address uint16) *Device

func (*Bus) Transfer

func (b *Bus) Transfer(address uint16, writeBuf []byte, readBuf []byte) error

type Device

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

func (*Device) ReadReg8

func (d *Device) ReadReg8(reg uint8) (uint8, error)

func (*Device) Transfer

func (d *Device) Transfer(writeBuf []byte, readBuf []byte) error

func (*Device) WriteReg8

func (d *Device) WriteReg8(reg uint8, value uint8) error

Jump to

Keyboard shortcuts

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