chore(color): use static memory buffer for LVGL (#6922)
This commit is contained in:
@@ -30,6 +30,16 @@
|
|||||||
#include "dma2d.h"
|
#include "dma2d.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LV_MEM_CUSTOM == 0
|
||||||
|
char LVGL_MEM_BUFFER[LV_MEM_SIZE] __SDRAM __ALIGNED(16);
|
||||||
|
|
||||||
|
char* get_lvgl_mem(int nbytes)
|
||||||
|
{
|
||||||
|
UNUSED(nbytes);
|
||||||
|
return LVGL_MEM_BUFFER;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
pixel_t LCD_FIRST_FRAME_BUFFER[DISPLAY_BUFFER_SIZE] __SDRAM;
|
pixel_t LCD_FIRST_FRAME_BUFFER[DISPLAY_BUFFER_SIZE] __SDRAM;
|
||||||
pixel_t LCD_SECOND_FRAME_BUFFER[DISPLAY_BUFFER_SIZE] __SDRAM;
|
pixel_t LCD_SECOND_FRAME_BUFFER[DISPLAY_BUFFER_SIZE] __SDRAM;
|
||||||
|
|
||||||
|
|||||||
@@ -69,14 +69,8 @@
|
|||||||
#if LV_MEM_ADR == 0
|
#if LV_MEM_ADR == 0
|
||||||
//#define LV_MEM_POOL_INCLUDE your_alloc_library /* Uncomment if using an external allocator*/
|
//#define LV_MEM_POOL_INCLUDE your_alloc_library /* Uncomment if using an external allocator*/
|
||||||
//#define LV_MEM_POOL_ALLOC your_alloc /* Uncomment if using an external allocator*/
|
//#define LV_MEM_POOL_ALLOC your_alloc /* Uncomment if using an external allocator*/
|
||||||
#if defined(SIMU)
|
extern char* get_lvgl_mem(int);
|
||||||
// 'sbrk' does not exist on Windows :(
|
#define LV_MEM_POOL_ALLOC get_lvgl_mem
|
||||||
#define LV_MEM_POOL_INCLUDE <stdlib.h>
|
|
||||||
#define LV_MEM_POOL_ALLOC malloc
|
|
||||||
#else
|
|
||||||
#define LV_MEM_POOL_INCLUDE <unistd.h>
|
|
||||||
#define LV_MEM_POOL_ALLOC sbrk
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else /*LV_MEM_CUSTOM*/
|
#else /*LV_MEM_CUSTOM*/
|
||||||
|
|||||||
Reference in New Issue
Block a user