#lcd #driver #embedded-hal-driver

no-std st7032i

Platform agnostic Rust driver for the Sitronix ST7032i Dot Matrix LCD Controller

4 releases

0.0.4 Oct 26, 2019
0.0.3 Oct 26, 2019
0.0.2 Oct 26, 2019
0.0.1 Oct 24, 2019

#962 in Embedded development

MIT/Apache

12KB
226 lines

st7032i

Platform agnostic Rust driver for the Dot Matrix LCD Controller (Sitronix ST7032i or similar).

Documentation

The documentation can be found at docs.rs.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

A platform agnostic Rust driver for the ST7032i, based on the embedded-hal traits.

The Device

The Sitronix ST7032i is a dot matrix LCD controller with I²C interface.

Usage

Instantiating

Import this crate and an embedded_hal implementation:

extern crate linux_embedded_hal as hal;
extern crate st7032i;

Then instantiate the device:

use core::fmt::Write;
use linux_embedded_hal::{Delay, I2cdev};
use st7032i::ST7032i;

let dev = I2cdev::new("/dev/i2c-1")?;
let mut display = ST7032i::new(dev, Delay, 2);
display.init()?;
write!(display, "Hello")?;
display.move_cursor(1, 0)?;
write!(display, "Rust")?;

Dependencies

~71KB