Description
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
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:
- Display orientation -> Landscape/portrait
- Invert X axis -> true/false
- 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