ls013b7dh03

Crates.iols013b7dh03
lib.rsls013b7dh03
version0.4.2
sourcesrc
created_at2024-07-03 17:59:34.866091
updated_at2024-07-08 17:26:12.403948
descriptionLS013B7DH03 Sharp LCD driver for embedded-hal
homepage
repositoryhttps://github.com/BogdanOlar/ls013b7dh03
max_upload_size
id1290810
size37,512
Bogdan Olar (BogdanOlar)

documentation

README

LS013B7DH03

crates.io docs.rs build and test

LS013B7DH03 Sharp LCD driver for embedded-hal v1.0

Stand alone usage

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();

embedded-graphics usage

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();
Commit count: 53

cargo fmt