periph

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register() error

Register registers all enumerated FT260 I²C buses.

func RegisterWithOptions added in v0.4.0

func RegisterWithOptions(options Options) error

RegisterWithOptions registers all enumerated FT260 I²C buses with the specified options.

Types

type Bus

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

Bus interface for the FT260 device.

func NewBus

func NewBus(name string, dev *ft260.Dev) *Bus

NewBus constructs a new Bus instance.

func NewBusWithOptions added in v0.4.0

func NewBusWithOptions(name string, dev *ft260.Dev, options Options) *Bus

NewBusWithOptions constructs a new Bus instance with the specified options.

func (*Bus) Close

func (bus *Bus) Close() error

Close closes the bus.

func (*Bus) SetSpeed

func (bus *Bus) SetSpeed(f physic.Frequency) error

SetSpeed changes the bus speed, if supported.

func (*Bus) String

func (bus *Bus) String() string

String returns the bus name.

func (*Bus) Tx

func (bus *Bus) Tx(addr uint16, w, r []byte) error

Tx does a single transaction.

type Options added in v0.4.0

type Options struct {
	Timeout int // timeout in milliseconds, -1 for no timeout
}

Jump to

Keyboard shortcuts

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