mirror of
https://github.com/esphome/esphome.git
synced 2024-12-02 11:44:13 +01:00
336c2d34e6
* - Removed cleaning the screen twice. \Should be handled by `DisplayBuffer::init_internal_();` - Made ili9341::initalize() protected and renamed \ it to ili9341::initalize(). - ili9341::initalize() should only init the display \ and set the width and heigth. * removed to much * clang format fixes * removing trailing underscors for protected virtual methods * removed the "override" on display() * clang fixes * restored old changes * Renamed the ili9341 platform to ili9xxx and added multiple drivers as well. including PR #3848 * fixed most of the clang reported issues * fixed reported issues * last fixes * Setting the right codeowners * missing changes * fixed naming Display() method. * clang again * clang fix * fixes reported by @jesserockz & @gpambrozio * a change to display.py removing an unneeded var * re-introduce **backlight** option. * update the ili9488 initialization * update the ili9488 initialization and fix typo * fixed typo * add missing constants * swap height and width back for the ili9488 * init fixes ili9488 * fixed lint issue testing the init code * oeps * init fixes ili9488 * fixed wrong define * fixed wrong define again * removed some spaces * revert to ili9341 * Remove parts that where used for the switchplate * lint fixes and removing unused function * fix error and introducing 16bit color option * fix error and introducing 16bit color option * fix clang issue * clang fix * clang issue again * is this what clang exprect * clang fix * clang fix * try again * let try again * and again * and the last clang fix * remove the need of wifi * update dimentions * update ili8488 init code. * update dimentions * allow to change height and width * dump color mode config * fix * fix * modify logging * referd back unrelated change * code formatting commit and moving functions around * add missing ; * update code * update code * use the correct write_array for sending uint16_t * fix panic loop * fix panic loop * - update the test file - fixed sending display data * clang fixes * clang fixes * clang fixes again * remove .gitignore items * remove .gitignore items * make sure Update() can can not be called while called * clang correction * adding a test yaml for the ili9341 * Update ili9341 example * Make test ili9xxx/tests only local * restore back old ili9341 driver code * Add a new config for the M5Core * fix clang request * reverd to restore of the old ili9341 there is no proper way to say it is depricated. * Remove the backlight/led pin from the config. You need to use a proper light platform component * Ili9488init changes (#88) Fixed ILI9488 init settings, and adjusted pixel handling code to push pixels in 18 bit format. This does not change the internal 16-bit representation. * fixed some leftover clang issues from the merge. * fixed the slang-tidy request. * remove `backlight_pin` warning. --------- Co-authored-by: JD Steffen <jdsteffen81@gmail.com>
96 lines
3.5 KiB
C++
96 lines
3.5 KiB
C++
#pragma once
|
|
|
|
namespace esphome {
|
|
namespace ili9xxx {
|
|
|
|
// Color definitions
|
|
// clang-format off
|
|
static const uint8_t MADCTL_MY = 0x80; ///< Bit 7 Bottom to top
|
|
static const uint8_t MADCTL_MX = 0x40; ///< Bit 6 Right to left
|
|
static const uint8_t MADCTL_MV = 0x20; ///< Bit 5 Reverse Mode
|
|
static const uint8_t MADCTL_ML = 0x10; ///< Bit 4 LCD refresh Bottom to top
|
|
static const uint8_t MADCTL_RGB = 0x00; ///< Bit 3 Red-Green-Blue pixel order
|
|
static const uint8_t MADCTL_BGR = 0x08; ///< Bit 3 Blue-Green-Red pixel order
|
|
static const uint8_t MADCTL_MH = 0x04; ///< Bit 2 LCD refresh right to left
|
|
// clang-format on
|
|
|
|
// All ILI9XXX specific commands some are used by init()
|
|
static const uint8_t ILI9XXX_NOP = 0x00;
|
|
static const uint8_t ILI9XXX_SWRESET = 0x01;
|
|
static const uint8_t ILI9XXX_RDDID = 0x04;
|
|
static const uint8_t ILI9XXX_RDDST = 0x09;
|
|
|
|
static const uint8_t ILI9XXX_SLPIN = 0x10;
|
|
static const uint8_t ILI9XXX_SLPOUT = 0x11;
|
|
static const uint8_t ILI9XXX_PTLON = 0x12;
|
|
static const uint8_t ILI9XXX_NORON = 0x13;
|
|
|
|
static const uint8_t ILI9XXX_RDMODE = 0x0A;
|
|
static const uint8_t ILI9XXX_RDMADCTL = 0x0B;
|
|
static const uint8_t ILI9XXX_RDPIXFMT = 0x0C;
|
|
static const uint8_t ILI9XXX_RDIMGFMT = 0x0D;
|
|
static const uint8_t ILI9XXX_RDSELFDIAG = 0x0F;
|
|
|
|
static const uint8_t ILI9XXX_INVOFF = 0x20;
|
|
static const uint8_t ILI9XXX_INVON = 0x21;
|
|
static const uint8_t ILI9XXX_GAMMASET = 0x26;
|
|
static const uint8_t ILI9XXX_DISPOFF = 0x28;
|
|
static const uint8_t ILI9XXX_DISPON = 0x29;
|
|
|
|
static const uint8_t ILI9XXX_CASET = 0x2A;
|
|
static const uint8_t ILI9XXX_PASET = 0x2B;
|
|
static const uint8_t ILI9XXX_RAMWR = 0x2C;
|
|
static const uint8_t ILI9XXX_RAMRD = 0x2E;
|
|
|
|
static const uint8_t ILI9XXX_PTLAR = 0x30;
|
|
static const uint8_t ILI9XXX_VSCRDEF = 0x33;
|
|
static const uint8_t ILI9XXX_MADCTL = 0x36;
|
|
static const uint8_t ILI9XXX_VSCRSADD = 0x37;
|
|
static const uint8_t ILI9XXX_IDMOFF = 0x38;
|
|
static const uint8_t ILI9XXX_IDMON = 0x39;
|
|
static const uint8_t ILI9XXX_PIXFMT = 0x3A;
|
|
static const uint8_t ILI9XXX_COLMOD = 0x3A;
|
|
|
|
static const uint8_t ILI9XXX_GETSCANLINE = 0x45;
|
|
|
|
static const uint8_t ILI9XXX_WRDISBV = 0x51;
|
|
static const uint8_t ILI9XXX_RDDISBV = 0x52;
|
|
static const uint8_t ILI9XXX_WRCTRLD = 0x53;
|
|
|
|
static const uint8_t ILI9XXX_IFMODE = 0xB0;
|
|
static const uint8_t ILI9XXX_FRMCTR1 = 0xB1;
|
|
static const uint8_t ILI9XXX_FRMCTR2 = 0xB2;
|
|
static const uint8_t ILI9XXX_FRMCTR3 = 0xB3;
|
|
static const uint8_t ILI9XXX_INVCTR = 0xB4;
|
|
static const uint8_t ILI9XXX_DFUNCTR = 0xB6;
|
|
static const uint8_t ILI9XXX_ETMOD = 0xB7;
|
|
|
|
static const uint8_t ILI9XXX_PWCTR1 = 0xC0;
|
|
static const uint8_t ILI9XXX_PWCTR2 = 0xC1;
|
|
static const uint8_t ILI9XXX_PWCTR3 = 0xC2;
|
|
static const uint8_t ILI9XXX_PWCTR4 = 0xC3;
|
|
static const uint8_t ILI9XXX_PWCTR5 = 0xC4;
|
|
static const uint8_t ILI9XXX_VMCTR1 = 0xC5;
|
|
static const uint8_t ILI9XXX_IFCTR = 0xC6;
|
|
static const uint8_t ILI9XXX_VMCTR2 = 0xC7;
|
|
static const uint8_t ILI9XXX_GMCTR = 0xC8;
|
|
static const uint8_t ILI9XXX_SETEXTC = 0xC8;
|
|
|
|
static const uint8_t ILI9XXX_PWSET = 0xD0;
|
|
static const uint8_t ILI9XXX_VMCTR = 0xD1;
|
|
static const uint8_t ILI9XXX_PWSETN = 0xD2;
|
|
static const uint8_t ILI9XXX_RDID4 = 0xD3;
|
|
static const uint8_t ILI9XXX_RDINDEX = 0xD9;
|
|
static const uint8_t ILI9XXX_RDID1 = 0xDA;
|
|
static const uint8_t ILI9XXX_RDID2 = 0xDB;
|
|
static const uint8_t ILI9XXX_RDID3 = 0xDC;
|
|
static const uint8_t ILI9XXX_RDIDX = 0xDD; // TBC
|
|
|
|
static const uint8_t ILI9XXX_GMCTRP1 = 0xE0;
|
|
static const uint8_t ILI9XXX_GMCTRN1 = 0xE1;
|
|
|
|
static const uint8_t ILI9XXX_CSCON = 0xF0;
|
|
static const uint8_t ILI9XXX_ADJCTL3 = 0xF7;
|
|
|
|
} // namespace ili9xxx
|
|
} // namespace esphome
|