找回密码
 立即注册

QQ登录

只需一步,快速开始

打印 上一主题 下一主题
开启左侧

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

[复制链接]
跳转到指定楼层
楼主
yli 发表于 2020-4-23 10:55:51 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
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: https://www.nuvoton.com/products/microp ... ware&tab=2
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.

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

3:
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;
SimpleDemo_565to888.zip (23.42 KB, 下载次数: 536)
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 顶 踩
回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则

新唐MCU