#lcd

no-std ls013b7dh03

LS013B7DH03 Sharp LCD driver for embedded-hal

8 releases

0.4.2 Jul 8, 2024
0.4.1 Jul 7, 2024
0.3.1 Jul 7, 2024
0.2.2 Jul 6, 2024

#275 in Embedded development

MIT/Apache

36KB
726 lines

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

Dependencies

~55–790KB