mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-03 22:06:43 +00:00
Cleanup of WaveshareInterface
-Removed update_and_display_frame -removed update_and_display_partial_frame -Renamed get_width and get_height to just width and height
This commit is contained in:
+2
-19
@@ -113,11 +113,11 @@ where
|
||||
RST: OutputPin,
|
||||
Delay: DelayUs<u16> + DelayMs<u16>,
|
||||
{
|
||||
fn get_width(&self) -> u16 {
|
||||
fn width(&self) -> u16 {
|
||||
WIDTH
|
||||
}
|
||||
|
||||
fn get_height(&self) -> u16 {
|
||||
fn height(&self) -> u16 {
|
||||
HEIGHT
|
||||
}
|
||||
|
||||
@@ -187,23 +187,6 @@ where
|
||||
self.interface.command(Command::NOP)
|
||||
}
|
||||
|
||||
fn update_and_display_frame(&mut self, buffer: &[u8]) -> Result<(), ERR> {
|
||||
self.update_frame(buffer)?;
|
||||
self.display_frame()
|
||||
}
|
||||
|
||||
fn update_and_display_partial_frame(
|
||||
&mut self,
|
||||
buffer: &[u8],
|
||||
x: u16,
|
||||
y: u16,
|
||||
width: u16,
|
||||
height: u16,
|
||||
) -> Result<(), ERR> {
|
||||
self.update_partial_frame(buffer, x, y, width, height)?;
|
||||
self.display_frame()
|
||||
}
|
||||
|
||||
fn clear_frame(&mut self) -> Result<(), ERR> {
|
||||
self.use_full_frame()?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user