Uses new Rust 2024
| new 0.7.0 |
|
|---|---|
| 0.6.1 |
|
| 0.6.0 |
|
| 0.5.0 |
|
| 0.1.0 |
|
#458 in Embedded development
43 downloads per month
Used in 3 crates
51KB
835 lines
Project Renamed & Migrated (hazard3-async)
This package (embassy-st7789v) has been yanked and moved under the independent hazard3-* namespace to avoid any confusion with the upstream Embassy ecosystem. As the project evolved into a dedicated, 100% RISC-V async ecosystem for the RP2350 Hazard3 cores (removing all Arm Cortex-M and RP2040 support), renaming the crates avoids any ambiguity with upstream Embassy.
- Replacement crate:
hazard3-st7789v - Ecosystem hub & migration table: https://github.com/jorgeandrecastro/hazard3-async
License
Copyright (C) 2026 Jorge Andre Castro
Licensed under the GNU General Public License v2.0 or later.
lib.rs:
embassy-st7789v
Asynchronous no_std driver for the ST7789V 240×320 TFT LCD over SPI,
based on Embassy.
Features
- RGB565 colors with named constants
fill_screen,fill_rect,draw_rectdraw_pixel,draw_hline,draw_vline- Built-in 5×7 bitmap font: ASCII, digits, and symbols
draw_str,draw_i16,draw_u32,draw_f32- Scaled text with
draw_char_scaledanddraw_str_scaled - 1-bit bitmap rendering with
draw_bitmap - Hardware and software reset
- Orientation (
MADCTL) and inversion control - Zero allocation:
forbid(unsafe_code) - Full 240×320 RGB565 framebuffer with
St7789vBufferedfor flicker-free updates
Wiring example (RP2350)
| Display | GPIO | Physical pin |
|---|---|---|
| VDD | 3.3V | |
| GND | GND | |
| SCL | GP18 | Pin 24 |
| SDA | GP19 | Pin 25 |
| DC | GP16 | Pin 21 |
| CS | GP20 | Pin 26 |
| RESET | GP17 | Pin 22 |
Quick start
use embassy_st7789v::{Color, St7789v};
let mut display = St7789v::new(spi_device, dc_pin, rst_pin);
display.init().await.unwrap();
display.fill_screen(Color::BLACK).await.unwrap();
display.draw_str(8, 10, b"HELLO WORLD", Color::WHITE, Color::BLACK).await.unwrap();
// With a framebuffer (flicker-free): let mut display = St7789vBuffered::new(St7789v::new(spi, dc, rst)); display.driver().init().await.unwrap(); display.fill_screen_buf(Color::BLACK); display.draw_str_buf(8, 10, b"HELLO", Color::WHITE, Color::BLACK); display.flush().await.unwrap();
Dependencies
~180KB