[N9H20] How to change color format from RGB565 to RGB888

Post Reply
9chuckyoung
Posts: 21
Joined: 28 Jan 2019, 13:49

01 Nov 2019, 10:30

Platform: N9H20
Platform resource link: https://www.nuvoton.com/hq/products/app ... _locale=en
BSP link: https://github.com/OpenNuvoton/N9H20_emWin_NonOS
BSP contains tool and BSP sample pre-built binaries: http://www.nuvoton.com/hq/products/appl ... urcePage=Y
Sample code brief: BSP emWin sample utilizes RGB565 as default color format for performance purpose, now change RGB888 to get more quality improvement.
IDE and tool-chain: Keil professional and ARMCC5
Notice:
1. This sample will refer to modified main.c and LCDConf.c

Please note that to run the sample code we need to download the latest version of N9H20 BSP from OpenNuvoton.

1/2:
To modify LCDConf.c, and the source path is in \N9H20_emWin_NonOS-master\BSP\ThirdParty\emWin\Config\LCDConf.c

Before:
#define COLOR_CONVERSION GUICC_M565
#define DISPLAY_DRIVER GUIDRV_LIN_16

After:
#define COLOR_CONVERSION GUICC_M888
#define DISPLAY_DRIVER GUIDRV_LIN_32

2/2:
To modify main.c, and the source path is in \N9H20_emWin_NonOS-master\BSP\SampleCode\emWin\SimpleDemo\main.c

Before:
UINT8 u8FrameBuf[XSIZE_PHYS*YSIZE_PHYS*2] __attribute__((aligned(32)));
lcdFormat.ucVASrcFormat = DRVVPOST_FRAME_RGB565;

After:
UINT8 u8FrameBuf[XSIZE_PHYS*YSIZE_PHYS*4] __attribute__((aligned(32)));
lcdFormat.ucVASrcFormat = DRVVPOST_FRAME_RGBx888;
Attachments
SimpleDemo_565to888.7z
A modified LCDConf.c is included in this sample
(27.22 KiB) Downloaded 12 times

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests