Skip to content

Commit a1ff30d

Browse files
committed
Fix color inversion issue in GC9X01X display driver
Related to #80578 Add the `GC9X01X_CMD_INVON` command to the `default_init_regs` array in `drivers/display/display_gc9x01x.c` to set color inversion to false. * Update the `gc9x01x_regs_init` function to include the new command in the initialization sequence. * Set the default value of the `display-inversion` property to false in `dts/bindings/display/galaxycore,gc9x01x.yaml`.
1 parent e90c58a commit a1ff30d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

drivers/display/display_gc9x01x.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,11 @@ static const struct gc9x01x_default_init_regs default_init_regs[] = {
215215
.len = 2U,
216216
.data = {0x3EU, 0x07U},
217217
},
218+
{
219+
.cmd = 0x21U,
220+
.len = 1U,
221+
.data = {0x00U},
222+
},
218223
};
219224

220225
static int gc9x01x_transmit(const struct device *dev, uint8_t cmd, const void *tx_data,

dts/bindings/display/galaxycore,gc9x01x.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ properties:
4444

4545
display-inversion:
4646
type: boolean
47+
default: false
4748
description: |
4849
Display inversion mode. Every bit is inverted from the frame memory to
4950
the display.

0 commit comments

Comments
 (0)