Skip to content
Permalink
Browse files

display: ili9340: Adafruit LCD 1480 driver supports RGB565 pixel format.

Adafruit LCD 1480 driver supports RGB565 pixel format.

Signed-off-by: Bernard Lee <bernard.lee@nordicsemi.no>
  • Loading branch information...
leewkb4567 authored and nashif committed Mar 28, 2019
1 parent 1541d5f commit e934399835237527f0b053071229a9d0278f1646
Showing with 5 additions and 0 deletions.
  1. +5 −0 drivers/display/display_ili9340_adafruit_1480.c
@@ -27,8 +27,13 @@ void ili9340_lcd_init(struct ili9340_data *data)
ILI9340_DATA_MEM_ACCESS_CTRL_MV | ILI9340_DATA_MEM_ACCESS_CTRL_BGR;
ili9340_transmit(data, ILI9340_CMD_MEM_ACCESS_CTRL, tx_data, 1);

#ifdef CONFIG_ILI9340_RGB565
tx_data[0] = ILI9340_DATA_PIXEL_FORMAT_MCU_16_BIT |
ILI9340_DATA_PIXEL_FORMAT_RGB_16_BIT;
#else
tx_data[0] = ILI9340_DATA_PIXEL_FORMAT_MCU_18_BIT |
ILI9340_DATA_PIXEL_FORMAT_RGB_18_BIT;
#endif
ili9340_transmit(data, ILI9340_CMD_PIXEL_FORMAT_SET, tx_data, 1);

tx_data[0] = 0x00;

0 comments on commit e934399

Please sign in to comment.
You can’t perform that action at this time.