SH1106 driver
I2C and SPI async driver for the SH11xx and SSD1xxx OLED displays written in 100% Rust. The library is designed to make it straigfotward to add new variants. Currently supported chips:
- SH1107
- SH1108
- SSD1309
Documentation
[Examples]
This crate uses probe-run
to run the examples. Once set up,
it should be as simple as cargo run --example image --features=embassy-stm32 --features=spi --release
. --release
will be
required for some examples to reduce FLASH usage.
From examples/text.rs
:
use Spawner;
use ;
use DelayNs;
use ;
use ;
async > = raw_disp.into;
display.reset.unwrap;
display.init.await.unwrap;
display.clear;
display.flush.await.unwrap;
let text_style = new
.font
.text_color
.build;
with_baseline
.draw
.unwrap;
with_baseline
.draw
.unwrap;
display.flush.await.unwrap;
loop
}
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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.