Skip to content

Commit

Permalink
Merge pull request #106 from jcard0na/main
Browse files Browse the repository at this point in the history
Add support for GDEH0154D67 (aka epd1in54_v2) by @jcard0na
  • Loading branch information
caemor authored Apr 13, 2022
2 parents 2de779b + c42f6be commit b99a07c
Show file tree
Hide file tree
Showing 6 changed files with 436 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/epd1in54/graphics.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Embedded graphics display module for 1in54 display
//!
use crate::epd1in54::{DEFAULT_BACKGROUND_COLOR, HEIGHT, WIDTH};
use crate::graphics::{Display, DisplayRotation};
use embedded_graphics_core::pixelcolor::BinaryColor;
Expand Down
2 changes: 1 addition & 1 deletion src/epd1in54/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ use crate::traits::{RefreshLut, WaveshareDisplay};
use crate::interface::DisplayInterface;

#[cfg(feature = "graphics")]
mod graphics;
pub mod graphics;
#[cfg(feature = "graphics")]
pub use crate::epd1in54::graphics::Display1in54;

Expand Down
46 changes: 46 additions & 0 deletions src/epd1in54_v2/constants.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#[rustfmt::skip]
// Original Waveforms from Waveshare for 1in54_V2
pub(crate) const LUT_FULL_UPDATE: [u8; 159] =[
0x80, 0x48, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40, 0x48, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x80, 0x48, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40, 0x48, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0xA, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x8, 0x1, 0x0, 0x8,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