class QSPIPanel – SPI Interfaced LCD
The QSPIPanel class implements the general control and access interface of the SPI serial bus, and can interact with the LCD driver chip through it.
Constructors
- class QSPIPanel(spi: machine.SPI, data: tuple, dc: Pin, cs: Pin = None, pclk: int = 10000000, width: int = 240, height: int = 240, cmd_bits: int = 8, param_bits: int = 8)
Create an QSPIPanel object.
These parameters are:
spi: SPI objectdata: Pins used for data linesdc: Pins used for data linescs: Pin used for CS line, set to None if it’s not usedpclk: Frequency of pixel clockwidth: Horizontal resolution, i.e. the number of pixels in a lineheight: Vertical resolution, i.e. the number of lines in the framecmd_bits: Bit-width of LCD commandparam_bits: Bit-width of LCD parameter
Methods
- QSPIPanel.tx_param(cmd: int, param: bytes = None)
Transmit LCD command and corresponding parameters.
cmd - The specific LCD command
param - Buffer that holds the command specific parameters
- QSPIPanel.tx_color(cmd: int, color: bytes = None)
Transmit LCD RGB data.
cmd - The specific LCD command
param - Buffer that holds the RGB color data
- QSPIPanel.deinit()
Destroys QSPIPanel object.