找回密码
 立即注册

QQ登录

只需一步,快速开始

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

[N9H20 Non-OS] How to enable multiple buffers to avoid flicker or tearing?

[复制链接]
跳转到指定楼层
楼主
yli 发表于 2020-4-23 10:11:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Platform: N9H20
Platform resource link: https://www.nuvoton.com/hq/products/app ... _locale=en
BSP link: https://github.com/OpenNuvoton/N9H20_emWin_NonOS
IDE: Keil professional

NOTE: Please download the latest version of N9H20 BSP from OpenNuvoton.

Follow the steps to enable emWin multiple buffers:
1. remove LCDConf.c from sample project
2. add LCDConf2.c to sample project
3. remove GUIConf2.c from sample project
4. add GUIConf2.c to sample project
5. increase main.c frame buffer size
  1. #ifdef __ICCARM__
  2. #pragma data_alignment = 32
  3. UINT8 u8FrameBuf[XSIZE_PHYS*YSIZE_PHYS*2*3];
  4. #else
  5. UINT8 u8FrameBuf[XSIZE_PHYS*YSIZE_PHYS*2*3] __attribute__((aligned(32)));
  6. #endif
复制代码



6. enable multiple buffers after GUI_Init():
  1. GUI_Init();

  2. WM_MULTIBUF_Enable(1);
  3. GUI_MEMDEV_MULTIBUF_Enable(1);
复制代码



7. password is nuvoton
N9H20_multiple_buffers.zip (5.2 KB, 下载次数: 474)
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 顶 踩
回复

使用道具 举报

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

本版积分规则

新唐MCU