Crate ili9341

Source
Expand description

ILI9341 Display Driver

§Usage

To control the display you need to set up:

  • Interface for communicating with display (display-interface-spi crate for SPI)
  • Configuration (reset pin, delay, orientation and size) for display
let iface = SPIInterface::new(spi, dc, cs);

let mut display = Ili9341::new(
    iface,
    reset_gpio,
    &mut delay,
    Orientation::Landscape,
    ili9341::DisplaySize240x320,
)
.unwrap();

display.clear(Rgb565::RED).unwrap()

Structs§

DisplaySize240x320
Generic display size of 240x320 pixels
DisplaySize320x480
Generic display size of 320x480 pixels
Ili9341
There are two method for drawing to the screen: Ili9341::draw_raw_iter and Ili9341::draw_raw_slice
Scroller
Scroller must be provided in order to scroll the screen. It can only be obtained by configuring the screen for scrolling.

Enums§

AdaptiveBrightness
Available Adaptive Brightness values
DisplayError
A ubiquitous error type for all kinds of problems which could happen when communicating with a display
FrameRate
Available frame rate in Hz
FrameRateClockDivision
Frame rate clock division
ModeState
Specify state of specific mode of operation
Orientation
The default implementation of the Mode trait from above Should work for most (but not all) boards

Constants§

SPI_MODE
Helper for CPOL = 0, CPHA = 0.

Traits§

DisplaySize
Trait that defines display size information
Mode
For quite a few boards (ESP32-S2-Kaluga-1, M5Stack, M5Core2 and others), the ILI9341 initialization command arguments are slightly different