Skip to content

Commit c4cb69c

Browse files
committed
Tweak inheritence for Panel_ILI9488IPS
1 parent b18ac5b commit c4cb69c

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

src/lgfx/v1/panel/Panel_ILI948x.hpp

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -236,31 +236,17 @@ namespace lgfx
236236
// The orignal settings do not work well with the IPS version of the display; however, the changes below do.
237237
// Contributed by @supremeneuron, see https://github.com/lovyan03/LovyanGFX/discussions/449
238238

239-
struct Panel_ILI9488IPS : public Panel_ILI948x
239+
struct Panel_ILI9488IPS : public Panel_ILI9488
240240
{
241-
void setColorDepth_impl(color_depth_t depth) override
241+
Panel_ILI9488IPS(void)
242242
{
243-
_write_depth = (((int)depth & color_depth_t::bit_mask) > 16
244-
|| (_bus && _bus->busType() == bus_spi))
245-
? rgb888_3Byte
246-
: rgb565_2Byte;
247-
248-
_read_depth = rgb888_3Byte;
243+
_cfg.memory_width = _cfg.panel_width = 320;
244+
_cfg.memory_height = _cfg.panel_height = 480;
245+
_cfg.invert = true;
249246
}
250247

251248
protected:
252249

253-
static constexpr uint8_t CMD_FRMCTR1 = 0xB1;
254-
static constexpr uint8_t CMD_INVCTR = 0xB4;
255-
static constexpr uint8_t CMD_DFUNCTR = 0xB6;
256-
static constexpr uint8_t CMD_ETMOD = 0xB7;
257-
static constexpr uint8_t CMD_PWCTR1 = 0xC0;
258-
static constexpr uint8_t CMD_PWCTR2 = 0xC1;
259-
static constexpr uint8_t CMD_PWCTR3 = 0xC2;
260-
static constexpr uint8_t CMD_VMCTR = 0xC5;
261-
static constexpr uint8_t CMD_GMCTRP1 = 0xE0; // Positive Gamma Correction
262-
static constexpr uint8_t CMD_GMCTRN1 = 0xE1; // Negative Gamma Correction
263-
static constexpr uint8_t CMD_ADJCTL3 = 0xF7;
264250
static constexpr uint8_t NML_BLACK = 0x21;
265251

266252
const uint8_t* getInitCommands(uint8_t listno) const override

0 commit comments

Comments
 (0)