st7305
A no_std Rust driver for the ST7305 monochrome reflective LCD controller.
This crate provides an interface to ST7305-based displays, built on top of embedded-hal 1.0.0. It utilizes a 15KB local framebuffer for tear-free screen updates over SPI.
Features
no_stdembedded_hal- async support through
asyncfeature embedded-graphicssupport throughgraphicsfeature
Examples
Quickstart
use ;
use DelayNs;
// Assuming you have your SPI and Reset pins initialised from your HAL
// let spi = ...;
// let rst = ...;
// let mut delay = ...;
let mut display = new;
display.init.unwrap;
display.set_orientation;
display.color_clear;
display.flush.unwrap;
Drawing with embedded-graphics:
Enable the graphics feature in your Cargo.toml.
use ;
let mut display = new;
display.init.unwrap;
display.set_orientation;
display.color_clear;
// draw a circle to the internal buffer
new
.into_styled
.draw
.unwrap;
// send the updated buffer to the screen
display.flush.unwrap;