LV_VDB_ADR added to place vdb to sepcific address
This commit is contained in:
@@ -31,12 +31,14 @@
|
|||||||
#define LV_VER_RES (480 << LV_ANTIALIAS)
|
#define LV_VER_RES (480 << LV_ANTIALIAS)
|
||||||
#define LV_DPI (100 << LV_ANTIALIAS)
|
#define LV_DPI (100 << LV_ANTIALIAS)
|
||||||
|
|
||||||
/* Buffered rendering: >= LV_DOWNSCALE * LV_HOR_RES or 0 to disable buffering*/
|
/* Buffered rendering: >= LV_HOR_RES or 0 to disable buffering*/
|
||||||
#define LV_VDB_SIZE (40 * LV_VER_RES)
|
#define LV_VDB_SIZE (40 * LV_HOR_RES)
|
||||||
|
#define LV_VDB_ADR 0 /*Place VDB to a specific address (e.g. in external RAM) (0: allocate into RAM)*/
|
||||||
|
|
||||||
/* Use two Virtual Display buffers (VDB) parallelize rendering and flushing
|
/* Use two Virtual Display buffers (VDB) parallelize rendering and flushing
|
||||||
* The flushing should use DMA to write the frame buffer in the background*/
|
* The flushing should use DMA to write the frame buffer in the background*/
|
||||||
#define LV_VDB_DOUBLE 0
|
#define LV_VDB_DOUBLE 0
|
||||||
|
#define LV_VDB2_ADR 0 /*Place VDB2 to a specific address (e.g. in external RAM) (0: allocate into RAM)*/
|
||||||
|
|
||||||
/* Enable anti aliasing
|
/* Enable anti aliasing
|
||||||
* If enabled everything will be rendered in double size and filtered to normal size */
|
* If enabled everything will be rendered in double size and filtered to normal size */
|
||||||
@@ -44,7 +46,7 @@
|
|||||||
|
|
||||||
/* Enable anti aliasing only for fonts (texts)
|
/* Enable anti aliasing only for fonts (texts)
|
||||||
* It half the size of the letters so you should use double sized fonts
|
* It half the size of the letters so you should use double sized fonts
|
||||||
* Much faster then normal anti aliasing */
|
* Much faster then normal anti aliasing (don't use together with LV_ANTIALIAS) */
|
||||||
#define LV_FONT_ANTIALIAS 1
|
#define LV_FONT_ANTIALIAS 1
|
||||||
|
|
||||||
/*=================
|
/*=================
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ static volatile uint8_t tick_irq_flag;
|
|||||||
void lv_tick_inc(uint32_t tick_period)
|
void lv_tick_inc(uint32_t tick_period)
|
||||||
{
|
{
|
||||||
tick_irq_flag = 0;
|
tick_irq_flag = 0;
|
||||||
sys_time++;
|
sys_time += tick_period;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -33,12 +33,31 @@ typedef enum {
|
|||||||
/**********************
|
/**********************
|
||||||
* STATIC VARIABLES
|
* STATIC VARIABLES
|
||||||
**********************/
|
**********************/
|
||||||
|
|
||||||
|
|
||||||
#if LV_VDB_DOUBLE == 0
|
#if LV_VDB_DOUBLE == 0
|
||||||
static lv_vdb_t vdb;
|
/*Simple VDB*/
|
||||||
static volatile lv_vdb_state_t vdb_state = LV_VDB_STATE_ACTIVE;
|
static volatile lv_vdb_state_t vdb_state = LV_VDB_STATE_ACTIVE;
|
||||||
|
# if LV_VDB_ADR == 0
|
||||||
|
/*If the buffer address is not specified simply allocate it*/
|
||||||
|
static lv_color_t vdb_buf[LV_VDB_SIZE];
|
||||||
|
static lv_vdb_t vdb = {.buf = vdb_buf};
|
||||||
|
# else
|
||||||
|
/*If the buffer address is specified use that address*/
|
||||||
|
static lv_vdb_t vdb = {.buf = (lv_color_t *)LV_VDB_ADR};
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
static lv_vdb_t vdb[2];
|
/*Double VDB*/
|
||||||
static volatile lv_vdb_state_t vdb_state[2] = {LV_VDB_STATE_FREE, LV_VDB_STATE_FREE};
|
static volatile lv_vdb_state_t vdb_state[2] = {LV_VDB_STATE_FREE, LV_VDB_STATE_FREE};
|
||||||
|
# if LV_VDB_ADR == 0
|
||||||
|
/*If the buffer address is not specified simply allocate it*/
|
||||||
|
static lv_color_t vdb_buf1[LV_VDB_SIZE];
|
||||||
|
static lv_color_t vdb_buf2[LV_VDB_SIZE];
|
||||||
|
static lv_vdb_t vdb[2] = {{.buf = vdb_buf1}, {.buf = vdb_buf2}};
|
||||||
|
# else
|
||||||
|
/*If the buffer address is specified use that address*/
|
||||||
|
static lv_vdb_t vdb[2] = {{.buf = (lv_color_t *)LV_VDB_ADR}, {.buf = (lv_color_t *)LV_VDB2_ADR}};
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ extern "C" {
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
lv_area_t area;
|
lv_area_t area;
|
||||||
lv_color_t buf[LV_VDB_SIZE];
|
lv_color_t *buf;
|
||||||
}lv_vdb_t;
|
}lv_vdb_t;
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
|
|||||||
Reference in New Issue
Block a user