Skip to content

ILI9341 inversion on ESP32-Wrover-Kit #33

Closed
@tore-espressif

Description

@tore-espressif

Hello,

ILI9341 display on ESP32-Wrover-Kit is always inverted, regardless off the settings Display orientation in menuconfig.
Problem lays on line 232 where correctly it should be

// 6C - portrait
// EC - portrait inverted
// CC - landscape
// 4C - landscape inverted
uint8_t data[] = {0x6C, 0xEC, 0xCC, 0x4C};

Nevertheless, I don't consider this solution satisfactory. This is screenshot from ILI9341 datasheet

image

There are 3 bits relevant for the display orientation and axis inversion: MY, MX, MV resulting in 8 different combinations.

My proposal is to split the Display orientation settings into three:

  1. Display orientation -> Landscape/portrait
  2. Invert X axis -> true/false
  3. Invert Y axis -> true/false

Then this section of code and similar in other drivers can be removed and the default settings for each board could be resolved by KConfig. (e.g. selecting Wrover-kit would set Invert X: true and Invert Y: false)

Should be handled together with #3 and #21, any opinion is welcome.

Thanks


NOTE

Not to be mistaken with color inversion. (command 0x20 and 0x21). #38


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions