您尚未登录。

楼主 #1 2019-12-13 16:37:35

逸俊晨晖
会员
注册时间: 2018-08-29
已发帖子: 151
积分: 137.5

LittlevGL这是叫双缓冲还是三缓冲?

/**
 * Initialize a display buffer
 * @param disp_buf pointer `lv_disp_buf_t` variable to initialize
 * @param buf1 A buffer to be used by LittlevGL to draw the image.
 *             Always has to specified and can't be NULL.
 *             Can be an array allocated by the user. E.g. `static lv_color_t disp_buf1[1024 * 10]`
 *             Or a memory address e.g. in external SRAM
 * @param buf2 Optionally specify a second buffer to make image rendering and image flushing
 *             (sending to the display) parallel.
 *             In the `disp_drv->flush` you should use DMA or similar hardware to send
 *             the image to the display in the background.
 *             It lets LittlevGL to render next frame into the other buffer while previous is being
 * sent. Set to `NULL` if unused.
 * @param size_in_px_cnt size of the `buf1` and `buf2` in pixel count.
 */
void lv_disp_buf_init(lv_disp_buf_t * disp_buf, void * buf1, void * buf2, uint32_t size_in_px_cnt)
{
    memset(disp_buf, 0, sizeof(lv_disp_buf_t));

    disp_buf->buf1    = buf1;
    disp_buf->buf2    = buf2;
    disp_buf->buf_act = disp_buf->buf1;
    disp_buf->size    = size_in_px_cnt;
}

硬件是STM32F429 RGB565 470272 显示区地址是在外扩SDRAM
一开始buf2是不使用的 buf1是使用的 buf1地址是在显示区之外
那这里有两个buffer 一个是显示buffer 一个是缓冲buf1 这个是叫双缓冲还是单缓冲?
那如果使用buf2 就有三个buffer  一个是显示buffer 两个是缓冲buf1 buf2 这个是叫三缓冲还是双缓冲?
我都搞混了

最近编辑记录 逸俊晨晖 (2019-12-13 16:38:09)

离线

#2 2019-12-13 16:54:56

达克罗德
会员
注册时间: 2018-04-10
已发帖子: 1,133
积分: 1085.5

Re: LittlevGL这是叫双缓冲还是三缓冲?

三缓冲吧

离线

楼主 #3 2019-12-13 17:11:50

逸俊晨晖
会员
注册时间: 2018-08-29
已发帖子: 151
积分: 137.5

Re: LittlevGL这是叫双缓冲还是三缓冲?

达克罗德 说:

三缓冲吧

我觉得也是

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn