mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
ili9xxx: Add support for GC9A01A display (#6351)
* Add support for GCA901A display --------- Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
parent
dfb14fc6ea
commit
221f04b9a5
4 changed files with 71 additions and 0 deletions
|
@ -51,6 +51,7 @@ ILI9XXXColorMode = ili9xxx_ns.enum("ILI9XXXColorMode")
|
|||
ColorOrder = display.display_ns.enum("ColorMode")
|
||||
|
||||
MODELS = {
|
||||
"GC9A01A": ili9xxx_ns.class_("ILI9XXXGC9A01A", ILI9XXXDisplay),
|
||||
"M5STACK": ili9xxx_ns.class_("ILI9XXXM5Stack", ILI9XXXDisplay),
|
||||
"M5CORE": ili9xxx_ns.class_("ILI9XXXM5CORE", ILI9XXXDisplay),
|
||||
"TFT_2.4": ili9xxx_ns.class_("ILI9XXXILI9341", ILI9XXXDisplay),
|
||||
|
|
|
@ -254,5 +254,10 @@ class ILI9XXXS3BoxLite : public ILI9XXXDisplay {
|
|||
ILI9XXXS3BoxLite() : ILI9XXXDisplay(INITCMD_S3BOXLITE, 320, 240, true) {}
|
||||
};
|
||||
|
||||
class ILI9XXXGC9A01A : public ILI9XXXDisplay {
|
||||
public:
|
||||
ILI9XXXGC9A01A() : ILI9XXXDisplay(INITCMD_GC9A01A, 240, 240, true) {}
|
||||
};
|
||||
|
||||
} // namespace ili9xxx
|
||||
} // namespace esphome
|
||||
|
|
|
@ -316,6 +316,60 @@ static const uint8_t PROGMEM INITCMD_ST7789V[] = {
|
|||
0x00 // End of list
|
||||
};
|
||||
|
||||
static const uint8_t PROGMEM INITCMD_GC9A01A[] = {
|
||||
0xEF, 0,
|
||||
0xEB, 1, 0x14, // ?
|
||||
0xFE, 0,
|
||||
0xEF, 0,
|
||||
0xEB, 1, 0x14, // ?
|
||||
0x84, 1, 0x40, // ?
|
||||
0x85, 1, 0xFF, // ?
|
||||
0x86, 1, 0xFF, // ?
|
||||
0x87, 1, 0xFF, // ?
|
||||
0x88, 1, 0x0A, // ?
|
||||
0x89, 1, 0x21, // ?
|
||||
0x8A, 1, 0x00, // ?
|
||||
0x8B, 1, 0x80, // ?
|
||||
0x8C, 1, 0x01, // ?
|
||||
0x8D, 1, 0x01, // ?
|
||||
0x8E, 1, 0xFF, // ?
|
||||
0x8F, 1, 0xFF, // ?
|
||||
0xB6, 2, 0x00, 0x00, // ?
|
||||
0x90, 4, 0x08, 0x08, 0x08, 0x08, // ?
|
||||
ILI9XXX_PIXFMT , 1, 0x05,
|
||||
ILI9XXX_MADCTL , 1, MADCTL_MX| MADCTL_BGR, // Memory Access Control
|
||||
0xBD, 1, 0x06, // ?
|
||||
0xBC, 1, 0x00, // ?
|
||||
0xFF, 3, 0x60, 0x01, 0x04, // ?
|
||||
0xC3, 1, 0x13,
|
||||
0xC4, 1, 0x13,
|
||||
0xF9, 1, 0x22,
|
||||
0xBE, 1, 0x11, // ?
|
||||
0xE1, 2, 0x10, 0x0E, // ?
|
||||
0xDF, 3, 0x21, 0x0c, 0x02, // ?
|
||||
0xF0, 6, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A,
|
||||
0xF1, 6, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F,
|
||||
0xF2, 6, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A,
|
||||
0xF3, 6, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F,
|
||||
0xED, 2, 0x1B, 0x0B, // ?
|
||||
0xAE, 1, 0x77, // ?
|
||||
0xCD, 1, 0x63, // ?
|
||||
0xE8, 1, 0x34,
|
||||
0x62, 12, 0x18, 0x0D, 0x71, 0xED, 0x70, 0x70, // ?
|
||||
0x18, 0x0F, 0x71, 0xEF, 0x70, 0x70,
|
||||
0x63, 12, 0x18, 0x11, 0x71, 0xF1, 0x70, 0x70, // ?
|
||||
0x18, 0x13, 0x71, 0xF3, 0x70, 0x70,
|
||||
0x64, 7, 0x28, 0x29, 0xF1, 0x01, 0xF1, 0x00, 0x07, // ?
|
||||
0x66, 10, 0x3C, 0x00, 0xCD, 0x67, 0x45, 0x45, 0x10, 0x00, 0x00, 0x00, // ?
|
||||
0x67, 10, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x54, 0x10, 0x32, 0x98, // ?
|
||||
0x74, 7, 0x10, 0x85, 0x80, 0x00, 0x00, 0x4E, 0x00, // ?
|
||||
0x98, 2, 0x3e, 0x07, // ?
|
||||
0x35, 0,
|
||||
ILI9XXX_SLPOUT , 0x80, // Exit Sleep
|
||||
ILI9XXX_DISPON , 0x80, // Display on
|
||||
0x00 // End of list
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
} // namespace ili9xxx
|
||||
} // namespace esphome
|
||||
|
|
11
tests/components/ili9xxx/test.esp32.yaml
Normal file
11
tests/components/ili9xxx/test.esp32.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
spi:
|
||||
mosi_pin: GPIO23
|
||||
clk_pin: GPIO18
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
model: gc9a01a
|
||||
id: gca901_display
|
||||
cs_pin: GPIO5
|
||||
dc_pin: GPIO22
|
||||
reset_pin: GPIO21
|
Loading…
Reference in a new issue