memory_lcd_spi/
displays.rs

1//! Predefined display setting.
2
3use embedded_graphics_core::pixelcolor::BinaryColor;
4
5use crate::{
6    framebuffer::{Framebuffer4Bit, FramebufferBW, Sharp, JDI},
7    pixelcolor::Rgb111,
8    DisplaySpec,
9};
10
11/// 1.28 inch Memory LCD, aka. LPM013M126C
12pub struct LPM013M126A<COLOR = Rgb111> {
13    _color: core::marker::PhantomData<COLOR>,
14}
15
16impl DisplaySpec for LPM013M126A {
17    const WIDTH: u16 = 176;
18    const HEIGHT: u16 = 176;
19
20    type Framebuffer = Framebuffer4Bit<{ Self::WIDTH }, { Self::HEIGHT }>;
21}
22
23impl DisplaySpec for LPM013M126A<BinaryColor> {
24    const WIDTH: u16 = 176;
25    const HEIGHT: u16 = 176;
26
27    type Framebuffer = FramebufferBW<{ Self::WIDTH }, { Self::HEIGHT }, JDI>;
28}
29
30/// 0.85inch 8-color display
31pub struct LPM009M360A<COLOR = Rgb111> {
32    _color: core::marker::PhantomData<COLOR>,
33}
34
35impl DisplaySpec for LPM009M360A {
36    const WIDTH: u16 = 72;
37    const HEIGHT: u16 = 144;
38
39    type Framebuffer = Framebuffer4Bit<{ Self::WIDTH }, { Self::HEIGHT }>;
40}
41
42impl DisplaySpec for LPM009M360A<BinaryColor> {
43    const WIDTH: u16 = 72;
44    const HEIGHT: u16 = 144;
45
46    type Framebuffer = FramebufferBW<{ Self::WIDTH }, { Self::HEIGHT }, JDI>;
47}
48
49/// 0.56inch, 64x64 BW display, 13pin 0.3mm FPC
50pub struct LS006B7DH01;
51
52impl DisplaySpec for LS006B7DH01 {
53    const WIDTH: u16 = 64;
54    const HEIGHT: u16 = 64;
55
56    type Framebuffer = FramebufferBW<{ Self::WIDTH }, { Self::HEIGHT }, Sharp>;
57}
58
59/// 1.28inch, 128x128 BW display, 10pin 0.5mm FPC
60pub struct LS013B7DH03;
61
62impl DisplaySpec for LS013B7DH03 {
63    const WIDTH: u16 = 128;
64    const HEIGHT: u16 = 128;
65
66    type Framebuffer = FramebufferBW<{ Self::WIDTH }, { Self::HEIGHT }, Sharp>;
67}
68
69/// 2.8inch, 400x240 BW display, 10pin 0.5mm FPC
70pub struct LS027B7DH01;
71
72impl DisplaySpec for LS027B7DH01 {
73    const WIDTH: u16 = 400;
74    const HEIGHT: u16 = 240;
75
76    type Framebuffer = FramebufferBW<{ Self::WIDTH }, { Self::HEIGHT }, Sharp>;
77}