Skip to content

Commit

Permalink
display: ili9340: Adafruit LCD 1480 driver supports RGB565 pixel format.
Browse files Browse the repository at this point in the history
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 May 30, 2019
1 parent 1541d5f commit e934399
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/display/display_ili9340_adafruit_1480.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e934399

Please sign in to comment.