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