Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ edition = "2021"
[dependencies]
embedded-graphics-core = { version = "0.4", optional = true }
embedded-hal = { version = "1.0.0-rc.1" }
embedded-hal-async = { optional = true, version = "1.0.0-rc.1" }

bit_field = "0.10.1"

[dev-dependencies]
Expand Down Expand Up @@ -54,12 +56,13 @@ required-features = ["linux-dev"]

[features]
# Remove the linux-dev feature to build the tests on non unix systems
default = ["graphics", "linux-dev", "epd2in13_v3"]
default = ["async", "graphics", "linux-dev", "epd2in13_v3"]

graphics = ["embedded-graphics-core"]
epd2in13_v2 = []
epd2in13_v3 = []
linux-dev = []
async = ["dep:embedded-hal-async"]

# Offers an alternative fast full lut for type_a displays, but the refreshed screen isnt as clean looking
type_a_alternative_faster_lut = []
6 changes: 3 additions & 3 deletions examples/epd1in54_no_graphics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ fn main() -> Result<(), SPIError> {

// Setup of the needed pins is finished here
// Now the "real" usage of the eink-waveshare-rs crate begins
let mut epd = Epd1in54::new(&mut spi, busy, dc, rst, &mut delay, Some(5))?;
let mut epd = Epd1in54::new(&mut spi, busy, dc, rst, &mut delay, Some(5)).await?;

// Clear the full screen
epd.clear_frame(&mut spi, &mut delay)?;
epd.display_frame(&mut spi, &mut delay)?;
epd.clear_frame(&mut spi, &mut delay).await?;
epd.display_frame(&mut spi, &mut delay).await?;

// Speeddemo
epd.set_lut(&mut spi, &mut delay, Some(RefreshLut::Quick))?;
Expand Down
Loading