tftdci

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LPI2C added in v0.0.9

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

LPI2C is an implementation of the display/tft.DCI interface that uses an LPI2C peripheral to communicate with the display in what is known as 4-line serial mode.

Limitations

Written with the SSD1306 OLED controller in mind and the pix/driver/fbdrv driver so it doesn't support ReadBytes, WriteWords, WriteWordN. The Cmd and the Write* methods are implemented as single I2C transactions: I2C Start, SSD1306 control byte, command/data bytes, I2C Stop (the Co bit in the Control Byte is cleared).

func NewLPI2C added in v0.0.9

func NewLPI2C(m *lpi2c.Master, addr uint8) *LPI2C

NewLPI2C returns new LPI2C based implementation of tftdrv.DCI. User must provide a configured LPI2C master driver and the slave address.

func (*LPI2C) Cmd added in v0.0.9

func (dci *LPI2C) Cmd(p []byte, dataMode int)

func (*LPI2C) Driver added in v0.0.9

func (dci *LPI2C) Driver() *lpi2c.Master

func (*LPI2C) End added in v0.0.9

func (dci *LPI2C) End()

func (*LPI2C) Err added in v0.0.9

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

func (*LPI2C) ReadBytes added in v0.0.9

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

func (*LPI2C) WriteByteN added in v0.0.9

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

func (*LPI2C) WriteBytes added in v0.0.9

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

func (*LPI2C) WriteString added in v0.0.9

func (dci *LPI2C) WriteString(s string)

func (*LPI2C) WriteWordN added in v0.0.9

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

func (*LPI2C) WriteWords added in v0.0.9

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

type LPSPI

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

LPSPI is an implementation of the display/tft.DCI interface that uses an LPSPI peripheral to communicate with the display in what is known as 4-line serial mode.

func NewLPSPI

func NewLPSPI(drv *lpspi.Master, dc iomux.Pin, mode lpspi.TCR, rclkHz, wclkHz int) *LPSPI

NewLPSPI returns new LPSPI based implementation of tftdrv.DCI. User must provide a configured LPSPI master driver, a DC pin, the required SPI mode (CPOL,CPHA) amd the maximum write, read clock speeds according to the display controller specification. Note that the maximum speed may be limited by th LPSPI peripheral, the bus topology or the specific display design.

func (*LPSPI) Cmd

func (dci *LPSPI) Cmd(p []byte, dataMode int)

func (*LPSPI) Driver

func (dci *LPSPI) Driver() *lpspi.Master

func (*LPSPI) End

func (dci *LPSPI) End()

func (*LPSPI) Err

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

func (*LPSPI) ReadBytes

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

func (*LPSPI) WriteByteN

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

func (*LPSPI) WriteBytes

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

func (*LPSPI) WriteString

func (dci *LPSPI) WriteString(s string)

func (*LPSPI) WriteWordN

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

func (*LPSPI) WriteWords

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

Jump to

Keyboard shortcuts

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