Update embedded-graphics,

remove useless Featuregates (Doesn't change size)

Update and integrate a few important examples and remove the others
This commit is contained in:
Caemor
2020-03-21 23:37:27 +01:00
parent dcaed6fb3e
commit 8da294dd5e
27 changed files with 167 additions and 1282 deletions
+4
View File
@@ -1,9 +1,13 @@
//! B/W Color for EPDs
#[cfg(feature = "graphics")]
use embedded_graphics::pixelcolor::BinaryColor;
#[cfg(feature = "graphics")]
pub use BinaryColor::Off as White;
#[cfg(feature = "graphics")]
pub use BinaryColor::On as Black;
/// Only for the Black/White-Displays
#[derive(Clone, Copy, PartialEq, Debug)]
pub enum Color {
+4 -8
View File
@@ -2,7 +2,7 @@
//!
//! # Example for the 1.54 in E-Ink Display
//!
//! ```rust,ignore
//! ```rust,no_run
//! use epd_waveshare::{
//! epd1in54::{EPD1in54, Display1in54},
//! graphics::{Display, DisplayRotation},
@@ -17,13 +17,9 @@
//! let mut display = Display1in54::default();
//!
//! // Write some hello world in the screenbuffer
//! display.draw(
//! Font6x8::render_str("Hello World!")
//! .stroke(Some(Color::Black))
//! .fill(Some(Color::White))
//! .translate(Point::new(5, 50))
//! .into_iter(),
//! );
//! let _ = Line::new(Point::new(0, 120), Point::new(0, 295))
//! .into_styled(PrimitiveStyle::with_stroke(BinaryColor::On, 1))
//! .draw(&mut display);
//!
//! // Display updated frame
//! epd.update_frame(&mut spi, &display.buffer()).unwrap();
+3 -16
View File
@@ -64,31 +64,18 @@ pub mod color;
/// Interface for the physical connection between display and the controlling device
mod interface;
#[cfg(feature = "epd7in5")]
pub mod epd7in5;
#[cfg(feature = "epd7in5_v2")]
pub mod epd7in5_v2;
#[cfg(feature = "epd4in2")]
pub mod epd4in2;
#[cfg(feature = "epd1in54")]
pub mod epd1in54;
#[cfg(feature = "epd1in54b")]
pub mod epd1in54b;
#[cfg(feature = "epd2in9")]
pub mod epd2in9;
#[cfg(any(feature = "epd1in54", feature = "epd2in9"))]
pub mod epd4in2;
pub mod epd7in5;
pub mod epd7in5_v2;
pub(crate) mod type_a;
pub mod prelude {
pub use crate::color::Color;
pub use crate::traits::{RefreshLUT, WaveshareDisplay, WaveshareThreeColorDisplay};
#[cfg(feature = "epd7in5_v2")]
pub use crate::traits::WaveshareDisplayExt;
pub use crate::SPI_MODE;