exp: golang.org/x/exp/io/i2c/driver Index | Files

package driver

import "golang.org/x/exp/io/i2c/driver"

Package driver contains interfaces to be implemented by various I2C implementations.

Index

Package Files

driver.go

type Conn

type Conn interface {
    Read(buf []byte) (n int, err error)
    Write(buf []byte) (n int, err error)
    Close() error
}

Conn represents an active connection to an I2C device.

type Opener

type Opener interface {
    Open(bus, addr int) (Conn, error)
}

Opener is an interface to be implemented by the I2C driver to open a connection to an I2C device with the specified bus number and I2C address. Open should support 7-bit and 10-bit I2C addresses.

Package driver is imported by 1 packages. Updated 3 days ago. Refresh now. Tools for package owners.