mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-03 22:06:43 +00:00
Rename trait and method and doc update
This commit is contained in:
@@ -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],
|
||||
|
||||
+1
-1
@@ -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")]
|
||||
|
||||
+7
-5
@@ -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>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user