1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Predefined display setting.

use embedded_graphics_core::pixelcolor::BinaryColor;

use crate::{
    framebuffer::{Framebuffer4Bit, FramebufferBW},
    pixelcolor::Rgb111,
    DisplaySpec,
};

/// 1.28 inch Memory LCD, aka. LPM013M126C
pub struct LPM013M126A<COLOR = Rgb111> {
    _color: core::marker::PhantomData<COLOR>,
}

impl DisplaySpec for LPM013M126A {
    const WIDTH: u16 = 176;
    const HEIGHT: u16 = 176;

    type Framebuffer = Framebuffer4Bit<{ Self::WIDTH }, { Self::HEIGHT }>;
}

impl DisplaySpec for LPM013M126A<BinaryColor> {
    const WIDTH: u16 = 176;
    const HEIGHT: u16 = 176;

    type Framebuffer = FramebufferBW<{ Self::WIDTH }, { Self::HEIGHT }>;
}

/// 0.85inch 8-color display
pub struct LPM009M360A<COLOR = Rgb111> {
    _color: core::marker::PhantomData<COLOR>,
}

impl DisplaySpec for LPM009M360A {
    const WIDTH: u16 = 72;
    const HEIGHT: u16 = 144;

    type Framebuffer = Framebuffer4Bit<{ Self::WIDTH }, { Self::HEIGHT }>;
}

impl DisplaySpec for LPM009M360A<BinaryColor> {
    const WIDTH: u16 = 72;
    const HEIGHT: u16 = 144;

    type Framebuffer = FramebufferBW<{ Self::WIDTH }, { Self::HEIGHT }>;
}