Skip to content

Commit

Permalink
gc9503: fix madctl default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Lzw655 committed Dec 1, 2023
1 parent ba557d9 commit 8850f0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/lcd/esp_lcd_gc9503/esp_lcd_gc9503.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ esp_err_t esp_lcd_new_panel_gc9503(const esp_lcd_panel_io_handle_t io, const esp
ESP_GOTO_ON_ERROR(gpio_config(&io_conf), err, TAG, "configure GPIO for RST line failed");
}

gc9503->madctl_val = GC9503_CMD_MADCTL_DEFAULT;
switch (panel_dev_config->rgb_ele_order) {
case LCD_RGB_ELEMENT_ORDER_RGB:
gc9503->madctl_val = 0;
gc9503->madctl_val &= ~GC9503_CMD_BGR_BIT;
break;
case LCD_RGB_ELEMENT_ORDER_BGR:
gc9503->madctl_val |= GC9503_CMD_BGR_BIT;
Expand Down

0 comments on commit 8850f0f

Please sign in to comment.