Rename trait and method and doc update
parent
b170e34028
commit
435cfd9a1c
|
|
@ -6,7 +6,7 @@ use embedded_hal::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::interface::DisplayInterface;
|
use crate::interface::DisplayInterface;
|
||||||
use crate::traits::{InternalWiAdditions, RefreshLUT, WaveshareDisplay, WaveshareTwoColorDisplay};
|
use crate::traits::{InternalWiAdditions, RefreshLUT, WaveshareDisplay, WaveshareThreeColorDisplay};
|
||||||
|
|
||||||
//The Lookup Tables for the Display
|
//The Lookup Tables for the Display
|
||||||
mod constants;
|
mod constants;
|
||||||
|
|
@ -83,7 +83,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<SPI, CS, BUSY, DC, RST> WaveshareTwoColorDisplay<SPI, CS, BUSY, DC, RST>
|
impl<SPI, CS, BUSY, DC, RST> WaveshareThreeColorDisplay<SPI, CS, BUSY, DC, RST>
|
||||||
for EPD1in54b<SPI, CS, BUSY, DC, RST>
|
for EPD1in54b<SPI, CS, BUSY, DC, RST>
|
||||||
where
|
where
|
||||||
SPI: Write<u8>,
|
SPI: Write<u8>,
|
||||||
|
|
@ -92,7 +92,7 @@ where
|
||||||
DC: OutputPin,
|
DC: OutputPin,
|
||||||
RST: OutputPin,
|
RST: OutputPin,
|
||||||
{
|
{
|
||||||
fn update_both_planes(
|
fn update_color_frame(
|
||||||
&mut self,
|
&mut self,
|
||||||
spi: &mut SPI,
|
spi: &mut SPI,
|
||||||
black: &[u8],
|
black: &[u8],
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ pub(crate) mod type_a;
|
||||||
|
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
pub use crate::color::Color;
|
pub use crate::color::Color;
|
||||||
pub use crate::traits::{RefreshLUT, WaveshareDisplay, WaveshareTwoColorDisplay};
|
pub use crate::traits::{RefreshLUT, WaveshareDisplay, WaveshareThreeColorDisplay};
|
||||||
pub use crate::SPI_MODE;
|
pub use crate::SPI_MODE;
|
||||||
|
|
||||||
#[cfg(feature = "graphics")]
|
#[cfg(feature = "graphics")]
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,8 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Functions to interact with two color panels
|
/// Functions to interact with three color panels
|
||||||
pub trait WaveshareTwoColorDisplay<SPI, CS, BUSY, DC, RST>:
|
pub trait WaveshareThreeColorDisplay<SPI, CS, BUSY, DC, RST>:
|
||||||
WaveshareDisplay<SPI, CS, BUSY, DC, RST>
|
WaveshareDisplay<SPI, CS, BUSY, DC, RST>
|
||||||
where
|
where
|
||||||
SPI: Write<u8>,
|
SPI: Write<u8>,
|
||||||
|
|
@ -63,12 +63,14 @@ where
|
||||||
DC: OutputPin,
|
DC: OutputPin,
|
||||||
RST: OutputPin,
|
RST: OutputPin,
|
||||||
{
|
{
|
||||||
/// Update both color planes
|
/// Transmit data to the SRAM of the EPD
|
||||||
fn update_both_planes(
|
///
|
||||||
|
/// Updates both the black and the secondary color layers
|
||||||
|
fn update_color_frame(
|
||||||
&mut self,
|
&mut self,
|
||||||
spi: &mut SPI,
|
spi: &mut SPI,
|
||||||
black: &[u8],
|
black: &[u8],
|
||||||
color1: &[u8],
|
color: &[u8],
|
||||||
) -> Result<(), SPI::Error>;
|
) -> Result<(), SPI::Error>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue