fix(porting): add buffer alignment attribute
This commit is contained in:
committed by
Gabor Kiss-Vamosi
parent
d39fc17595
commit
d01c6a4892
@@ -65,20 +65,26 @@ void lv_port_disp_init(void)
|
||||
|
||||
/* Example 1
|
||||
* One buffer for partial rendering*/
|
||||
LV_ATTRIBUTE_MEM_ALIGN
|
||||
static uint8_t buf_1_1[MY_DISP_HOR_RES * 10 * BYTE_PER_PIXEL]; /*A buffer for 10 rows*/
|
||||
lv_display_set_buffers(disp, buf_1_1, NULL, sizeof(buf_1_1), LV_DISPLAY_RENDER_MODE_PARTIAL);
|
||||
|
||||
/* Example 2
|
||||
* Two buffers for partial rendering
|
||||
* In flush_cb DMA or similar hardware should be used to update the display in the background.*/
|
||||
LV_ATTRIBUTE_MEM_ALIGN
|
||||
static uint8_t buf_2_1[MY_DISP_HOR_RES * 10 * BYTE_PER_PIXEL];
|
||||
|
||||
LV_ATTRIBUTE_MEM_ALIGN
|
||||
static uint8_t buf_2_2[MY_DISP_HOR_RES * 10 * BYTE_PER_PIXEL];
|
||||
lv_display_set_buffers(disp, buf_2_1, buf_2_2, sizeof(buf_2_1), LV_DISPLAY_RENDER_MODE_PARTIAL);
|
||||
|
||||
/* Example 3
|
||||
* Two buffers screen sized buffer for double buffering.
|
||||
* Both LV_DISPLAY_RENDER_MODE_DIRECT and LV_DISPLAY_RENDER_MODE_FULL works, see their comments*/
|
||||
LV_ATTRIBUTE_MEM_ALIGN
|
||||
static uint8_t buf_3_1[MY_DISP_HOR_RES * MY_DISP_VER_RES * BYTE_PER_PIXEL];
|
||||
LV_ATTRIBUTE_MEM_ALIGN
|
||||
static uint8_t buf_3_2[MY_DISP_HOR_RES * MY_DISP_VER_RES * BYTE_PER_PIXEL];
|
||||
lv_display_set_buffers(disp, buf_3_1, buf_3_2, sizeof(buf_3_1), LV_DISPLAY_RENDER_MODE_DIRECT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user