mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-03 22:06:43 +00:00
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:
@@ -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
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user