spi

package
v0.0.0-...-8fa69d0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CPOL0CPHA0 Mode = machine.Mode0
	CPOL0CPHA1 Mode = machine.Mode1
	CPOL1CPHA0 Mode = machine.Mode2
	CPOL1CPHA1 Mode = machine.Mode3

	ClockIdlesLowFirstEdge   = CPOL0CPHA0
	ClockIdlesLowSecondEdge  = CPOL0CPHA1
	ClockIdlesHighFirstEdge  = CPOL1CPHA0
	ClockIdlesHighSecondEdge = CPOL1CPHA1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Freq     uint32
	Mode     Mode
	LSBFirst bool
}

type Dev

type Dev struct {
	Port       *Port
	ChipSelect machine.Pin
	Conf       *Conf
}

func (*Dev) TxRx

func (d *Dev) TxRx(tx, rx []byte) error

func (*Dev) TxRxKeepCS

func (d *Dev) TxRxKeepCS(tx, rx []byte) error

type Mode

type Mode int

type Port

type Port struct {
	Intf *machine.SPI
	// contains filtered or unexported fields
}

func (*Port) NewDev

func (p *Port) NewDev(cs machine.Pin, conf *Conf) *Dev

Jump to

Keyboard shortcuts

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