mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-04 06:16:42 +00:00
Forgotten files in previous commit
This commit is contained in:
+5
-5
@@ -196,12 +196,12 @@ where
|
|||||||
&mut self,
|
&mut self,
|
||||||
spi: &mut SPI,
|
spi: &mut SPI,
|
||||||
buffer: &[u8],
|
buffer: &[u8],
|
||||||
x: u16,
|
x: u32,
|
||||||
y: u16,
|
y: u32,
|
||||||
width: u16,
|
width: u32,
|
||||||
height: u16,
|
height: u32,
|
||||||
) -> Result<(), SPI::Error> {
|
) -> Result<(), SPI::Error> {
|
||||||
if buffer.len() as u16 != width / 8 * height {
|
if buffer.len() as u32 != width / 8 * height {
|
||||||
//TODO: panic!! or sth like that
|
//TODO: panic!! or sth like that
|
||||||
//return Err("Wrong buffersize");
|
//return Err("Wrong buffersize");
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -28,10 +28,10 @@ pub trait Display {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub struct Graphics<'a> {
|
pub struct Graphics<'a> {
|
||||||
pub(crate) width: u32,
|
width: u32,
|
||||||
pub(crate) height: u32,
|
height: u32,
|
||||||
pub(crate) rotation: DisplayRotation,
|
rotation: DisplayRotation,
|
||||||
pub(crate) buffer: &'a mut [u8], //buffer: Box<u8>//[u8; 15000]
|
buffer: &'a mut [u8], //buffer: Box<u8>//[u8; 15000]
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Graphics<'a> {
|
impl<'a> Graphics<'a> {
|
||||||
|
|||||||
Reference in New Issue
Block a user