Update ILI9488 display initialization to correct portrait orientation
This commit is contained in:
@@ -9,17 +9,6 @@ esphome:
|
|||||||
priority: 100
|
priority: 100
|
||||||
then:
|
then:
|
||||||
- light.turn_on: backlight
|
- light.turn_on: backlight
|
||||||
- delay: 300ms
|
|
||||||
- lambda: |-
|
|
||||||
// Override MADCTL to 0x48: MX=1, BGR=1 — fixes horizontal mirror
|
|
||||||
uint8_t cmd = 0x36, dat = 0x48;
|
|
||||||
digitalWrite(2, LOW); // DC = command
|
|
||||||
id(my_display)->enable(); // assert CS
|
|
||||||
id(my_display)->write_array(&cmd, 1); // MADCTL command
|
|
||||||
digitalWrite(2, HIGH); // DC = data
|
|
||||||
id(my_display)->write_array(&dat, 1); // MX=1, BGR=1
|
|
||||||
id(my_display)->disable(); // deassert CS
|
|
||||||
- component.update: my_display
|
|
||||||
|
|
||||||
esp32:
|
esp32:
|
||||||
board: esp32dev
|
board: esp32dev
|
||||||
@@ -76,6 +65,8 @@ display:
|
|||||||
rotation: 0
|
rotation: 0
|
||||||
invert_colors: false
|
invert_colors: false
|
||||||
color_order: bgr
|
color_order: bgr
|
||||||
|
init_sequence:
|
||||||
|
- [0x36, 0x48] # MADCTL: MX=1, BGR=1 — correct portrait orientation for this board
|
||||||
data_rate: 10MHz
|
data_rate: 10MHz
|
||||||
dimensions:
|
dimensions:
|
||||||
width: 320
|
width: 320
|
||||||
|
|||||||
Reference in New Issue
Block a user