1
-
2
1
use display_interface_spi:: SPIInterfaceNoCS ;
3
2
use display_interface:: DisplayError ;
4
3
use hal:: {
@@ -12,7 +11,7 @@ use mipidsi::models::ILI9342CRgb565;
12
11
use embedded_graphics:: { prelude:: { DrawTarget , Dimensions } , pixelcolor:: Rgb565 , Pixel , primitives:: Rectangle } ;
13
12
14
13
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 > > ,
16
15
}
17
16
18
17
impl DrawTarget for EmbassyTaskDisplay < ' static > {
@@ -23,13 +22,13 @@ impl DrawTarget for EmbassyTaskDisplay<'static> {
23
22
where
24
23
I : IntoIterator < Item = Pixel < Self :: Color > > ,
25
24
{
26
- self . inner . draw_iter ( pixels)
25
+ self . display . draw_iter ( pixels)
27
26
}
28
27
}
29
28
30
29
impl Dimensions for EmbassyTaskDisplay < ' static > {
31
30
fn bounding_box ( & self ) -> Rectangle {
32
- self . inner . bounding_box ( )
31
+ self . display . bounding_box ( )
33
32
}
34
33
}
35
34
@@ -41,12 +40,12 @@ impl<'a, 'b> DrawTarget for &'a mut EmbassyTaskDisplay<'b> {
41
40
where
42
41
I : IntoIterator < Item = Pixel < Self :: Color > > ,
43
42
{
44
- self . inner . draw_iter ( pixels)
43
+ self . display . draw_iter ( pixels)
45
44
}
46
45
}
47
46
48
47
impl < ' a , ' b > Dimensions for & ' a mut EmbassyTaskDisplay < ' b > {
49
48
fn bounding_box ( & self ) -> Rectangle {
50
- self . inner . bounding_box ( )
49
+ self . display . bounding_box ( )
51
50
}
52
51
}
0 commit comments