tftdci

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SPI

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

An SPI is an implementation of the tftdrv.DCI interface that uses an SPI peripheral to communicate with the display using the 4-line Serial Protocol.

func NewSPI

func NewSPI(drv *spi.Master, csn, dc iomux.Pin, mode spi.Config, rcHz, wcHz int) *SPI

NewSPI returns new SPI based implementation of tftdrv.DCI.

func (*SPI) Cmd

func (dci *SPI) Cmd(p []byte, _ int)

func (*SPI) Driver

func (dci *SPI) Driver() *spi.Master

func (*SPI) End

func (dci *SPI) End()

End ends the SPI transaction. It sets CSn pin high, disables the SPI peripheral and unlocks the driver. Other usesrs of the same master driver can then take controll of the SPI bus locking the driver before use.

func (*SPI) Err

func (dci *SPI) Err(clear bool) error

func (*SPI) ReadBytes

func (dci *SPI) ReadBytes(p []byte)

func (*SPI) WriteByteN

func (dci *SPI) WriteByteN(b byte, n int)

func (*SPI) WriteBytes

func (dci *SPI) WriteBytes(p []uint8)

func (*SPI) WriteString

func (dci *SPI) WriteString(s string)

func (*SPI) WriteWordN

func (dci *SPI) WriteWordN(w uint16, n int)

func (*SPI) WriteWords

func (dci *SPI) WriteWords(p []uint16)

Jump to

Keyboard shortcuts

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