Skip to content

Commit a587811

Browse files
committed
renamed inner to display
1 parent cedc8c5 commit a587811

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/embassy_task_ili9342c.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
use display_interface_spi::SPIInterfaceNoCS;
32
use display_interface::DisplayError;
43
use hal::{
@@ -12,7 +11,7 @@ use mipidsi::models::ILI9342CRgb565;
1211
use embedded_graphics::{prelude::{DrawTarget, Dimensions}, pixelcolor::Rgb565, Pixel, primitives::Rectangle};
1312

1413
pub struct EmbassyTaskDisplay<'a> {
15-
pub inner: mipidsi::Display<SPIInterfaceNoCS<Spi<'a, SPI2, FullDuplexMode>, GpioPin<Output<PushPull>, 4>>, ILI9342CRgb565, GpioPin<Output<PushPull>, 48>>,
14+
pub display: mipidsi::Display<SPIInterfaceNoCS<Spi<'a, SPI2, FullDuplexMode>, GpioPin<Output<PushPull>, 4>>, ILI9342CRgb565, GpioPin<Output<PushPull>, 48>>,
1615
}
1716

1817
impl DrawTarget for EmbassyTaskDisplay<'static> {
@@ -23,13 +22,13 @@ impl DrawTarget for EmbassyTaskDisplay<'static> {
2322
where
2423
I: IntoIterator<Item = Pixel<Self::Color>>,
2524
{
26-
self.inner.draw_iter(pixels)
25+
self.display.draw_iter(pixels)
2726
}
2827
}
2928

3029
impl Dimensions for EmbassyTaskDisplay<'static> {
3130
fn bounding_box(&self) -> Rectangle {
32-
self.inner.bounding_box()
31+
self.display.bounding_box()
3332
}
3433
}
3534

@@ -41,12 +40,12 @@ impl<'a, 'b> DrawTarget for &'a mut EmbassyTaskDisplay<'b> {
4140
where
4241
I: IntoIterator<Item = Pixel<Self::Color>>,
4342
{
44-
self.inner.draw_iter(pixels)
43+
self.display.draw_iter(pixels)
4544
}
4645
}
4746

4847
impl<'a, 'b> Dimensions for &'a mut EmbassyTaskDisplay<'b> {
4948
fn bounding_box(&self) -> Rectangle {
50-
self.inner.bounding_box()
49+
self.display.bounding_box()
5150
}
5251
}

0 commit comments

Comments
 (0)