Crates.io | ls013b7dh03 |
lib.rs | ls013b7dh03 |
version | 0.4.2 |
source | src |
created_at | 2024-07-03 17:59:34.866091 |
updated_at | 2024-07-08 17:26:12.403948 |
description | LS013B7DH03 Sharp LCD driver for embedded-hal |
homepage | |
repository | https://github.com/BogdanOlar/ls013b7dh03 |
max_upload_size | |
id | 1290810 |
size | 37,512 |
LS013B7DH03 Sharp LCD driver for embedded-hal v1.0
Simply add the driver to your Cargo.toml
:
ls013b7dh03 = { version = "0.4" }
Use:
use ls013b7dh03::prelude::*;
let mut buffer = [0u8; BUF_SIZE];
let mut display = Ls013b7dh03::new(spi, cs, disp_com, &mut buffer);
for x in 10..100 {
let _ = display.write(x, 10, true);
}
display.flush();
An optional implementation for the embeddded-graphics 2D graphics library is provided by the optional embdded_graphics
feature:
ls013b7dh03 = { version = "0.4", features = ["embedded_graphics"] }
Use:
use ls013b7dh03::prelude::*;
use embedded_graphics::{
geometry::Point,
pixelcolor::BinaryColor,
prelude::*,
primitives::{Circle, Primitive, PrimitiveStyle},
};
let mut buffer = [0u8; BUF_SIZE];
let mut display = Ls013b7dh03::new(spi, cs, disp_com, &mut buffer);
let circle = Circle::new(Point::new(50, 50), 50).into_styled(PrimitiveStyle::with_stroke(BinaryColor::On, 2));
let _ = circle.draw(&mut display);
display.flush();