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:
Christoph Groß
2018-09-19 16:19:57 +02:00
parent b0699b088d
commit fa6bce5ee7
4 changed files with 13 additions and 49 deletions
+2 -19
View File
@@ -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()?;