sky-ili9341
Async-ready ILI9341 TFT display driver for embedded Rust.
Features
- Blocking and async SPI interfaces (
embedded-hal1.0 /embedded-hal-async) - Builder pattern for flexible configuration (orientation, color order, inversion, offsets)
- Correct MADCTL implementation per ILI9341 datasheet — no hardcoded BGR
- Optimized drawing with 512-byte buffered SPI writes and fast rectangle fills
embedded-graphics-coreDrawTargetsupport (optionalgraphicsfeature)defmtlogging support (optionaldefmtfeature)- Board presets Made for SkyRizz E32
no_std— works on any embedded target (ESP32, nRF52, STM32, RP2040, etc.)
Cargo Features
| Feature | Default | Description |
|---|---|---|
graphics |
✅ | Enables embedded-graphics-core DrawTarget implementation |
async |
❌ | Enables async interface, builder, and display types via embedded-hal-async |
defmt |
❌ | Enables defmt::Format derives for error and option types |
Quick Start
use ;
let di = new;
let mut display = new
.orientation
.color_order
.init
.unwrap;
display.clear_screen.unwrap; // Black
Board Presets
Skip manual configuration for popular boards:
use ;
// SkyRizz E32 Board (primary reference board)
let di = new;
let mut display = with_options
.init
.unwrap;
Available presets:
skyrizz_e32()— SkyRizz E32 Board 2.4" 240×320 (primary reference board)esp_wrover_kit()— ESP-WROVER-KIT v4.1esp32_2432s028r()— "Cheap Yellow Display" (CYD) 2.8"m5stack()— M5Stack Corem5stack_core2()— M5Stack Core2esp32_s2_kaluga()— ESP32-S2-Kaluga-1generic_240x320()— Generic ILI9341 with default settings
Async (Embassy)
Enable the async feature for non-blocking SPI transfers — ideal for ESP32 with embassy where DMA runs in the background:
use ;
let di = new;
let mut display = new
.orientation
.init
.await
.unwrap;
display.clear_screen.await.unwrap; // Red
Using with embedded-graphics
The graphics feature (on by default) implements DrawTarget:
use *;
use Rgb565;
display.clear.unwrap;
Supported Targets
Any chip with embedded-hal 1.0 SPI support:
- ESP32 family (ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6) via
esp-hal - nRF52 family (nRF52840, nRF52832) via
nrf-halorembassy-nrf - STM32 family via
stm32-halorembassy-stm32 - RP2040/RP2350 via
rp-halorembassy-rp
License
Licensed under MIT License.