/**
* 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)
离线
三缓冲吧
离线
三缓冲吧
我觉得也是
离线