Documentation ¶
Index ¶
- type LPI2C
- func (dci *LPI2C) Cmd(p []byte, dataMode int)
- func (dci *LPI2C) Driver() *lpi2c.Master
- func (dci *LPI2C) End()
- func (dci *LPI2C) Err(clear bool) error
- func (dci *LPI2C) ReadBytes(p []byte)
- func (dci *LPI2C) WriteByteN(b byte, n int)
- func (dci *LPI2C) WriteBytes(p []uint8)
- func (dci *LPI2C) WriteString(s string)
- func (dci *LPI2C) WriteWordN(w uint16, n int)
- func (dci *LPI2C) WriteWords(p []uint16)
- type LPSPI
- func (dci *LPSPI) Cmd(p []byte, dataMode int)
- func (dci *LPSPI) Driver() *lpspi.Master
- func (dci *LPSPI) End()
- func (dci *LPSPI) Err(clear bool) error
- func (dci *LPSPI) ReadBytes(p []byte)
- func (dci *LPSPI) WriteByteN(b byte, n int)
- func (dci *LPSPI) WriteBytes(p []uint8)
- func (dci *LPSPI) WriteString(s string)
- func (dci *LPSPI) WriteWordN(w uint16, n int)
- func (dci *LPSPI) WriteWords(p []uint16)
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
NewLPI2C returns new LPI2C based implementation of tftdrv.DCI. User must provide a configured LPI2C master driver and the slave address.
func (*LPI2C) WriteByteN ¶ added in v0.0.9
func (*LPI2C) WriteBytes ¶ added in v0.0.9
func (*LPI2C) WriteString ¶ added in v0.0.9
func (*LPI2C) WriteWordN ¶ added in v0.0.9
func (*LPI2C) WriteWords ¶ added in v0.0.9
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 ¶
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.