1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-21 06:53:01 +08:00

updade lv_conf_templ.h

This commit is contained in:
Gabor Kiss-Vamosi 2019-02-21 00:21:59 +01:00
parent 030fe60b34
commit 0ccaac4e00
3 changed files with 12 additions and 50 deletions

View File

@ -43,8 +43,8 @@
*===================*/
/* Horizontal and vertical resolution of the library.*/
#define LV_HOR_RES (480)
#define LV_VER_RES (320)
#define LV_HOR_RES_MAX (480)
#define LV_VER_RES_MAX (320)
/* Dot Per Inch: used to initialize default sizes. E.g. a button with width = LV_DPI / 2 -> half inch wide
* (Not so important, you can adjust it to modify default sizes and spaces)*/
@ -56,49 +56,6 @@
/*Screen refresh period in milliseconds*/
#define LV_REFR_PERIOD 30
/*-----------------
* VDB settings
*----------------*/
/* VDB (Virtual Display Buffer) is an internal graphics buffer.
* The GUI will be drawn into this buffer first and then
* the buffer will be passed to your `disp_drv.disp_flush` function to
* copy it to your frame buffer.
* VDB is required for: buffered drawing, opacity, anti-aliasing and shadows
* Learn more: https://docs.littlevgl.com/#Drawing*/
/* Size of the VDB in pixels. Typical size: ~1/10 screen. Must be >= LV_HOR_RES
* Setting it to 0 will disable VDB and `disp_drv.disp_fill` and `disp_drv.disp_map` functions
* will be called to draw to the frame buffer directly*/
#define LV_VDB_SIZE ((LV_VER_RES * LV_HOR_RES) / 10)
/* Bit-per-pixel of VDB. Useful for monochrome or non-standard color format displays.
* Special formats are handled with `disp_drv.vdb_wr`)*/
#define LV_VDB_PX_BPP LV_COLOR_SIZE /*LV_COLOR_SIZE comes from LV_COLOR_DEPTH below to set 8, 16 or 32 bit pixel size automatically */
/* Place VDB to a specific address (e.g. in external RAM)
* 0: allocate automatically into RAM
* LV_VDB_ADR_INV: to replace it later with `lv_vdb_set_adr()`*/
#define LV_VDB_ADR 0
/* Use two Virtual Display buffers (VDB) to parallelize rendering and flushing
* The flushing should use DMA to write the frame buffer in the background */
#define LV_VDB_DOUBLE 0
/* Place VDB2 to a specific address (e.g. in external RAM)
* 0: allocate automatically into RAM
* LV_VDB_ADR_INV: to replace it later with `lv_vdb_set_adr()`*/
#define LV_VDB2_ADR 0
/* Using true double buffering in `disp_drv.disp_flush` you will always get the image of the whole screen.
* Your only task is to set the rendered image (`color_p` parameter) as frame buffer address or send it to your display.
* The best if you do in the blank period of you display to avoid tearing effect.
* Requires:
* - LV_VDB_SIZE = LV_HOR_RES * LV_VER_RES
* - LV_VDB_DOUBLE = 1
*/
#define LV_VDB_TRUE_DOUBLE_BUFFERED 0
/*=================
Misc. setting
*=================*/

View File

@ -101,7 +101,7 @@ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p)
/*The area is truncated to the screen*/
if(suc != false) {
if(disp_refr->driver.rounder_cb) disp_refr->driver.rounder_cb(disp_refr, &com_area);
if(disp->driver.rounder_cb) disp->driver.rounder_cb(disp_refr, &com_area);
/*Save only if this area is not in one of the saved areas*/
uint16_t i;

View File

@ -70,10 +70,6 @@ typedef struct _disp_drv_t {
void (*flush_cb)(struct _disp_t * disp, const lv_area_t * area, lv_color_t * color_p);
lv_disp_user_data_t flush_user_data;
/* OPTIONAL: Called after every refresh cycle to tell the rendering and flushing time + the number of flushed pixels */
void (*monitor_cb)(struct _disp_t * disp, uint32_t time, uint32_t px);
lv_disp_user_data_t monitor_user_data;
/* OPTIONAL: Extend the invalidated areas to match with the display drivers requirements
* E.g. round `y` to, 8, 16 ..) on a monochrome display*/
void (*rounder_cb)(struct _disp_t * disp, lv_area_t * area);
@ -85,6 +81,10 @@ typedef struct _disp_drv_t {
void (*set_px_cb)(struct _disp_t * disp, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa);
lv_disp_user_data_t set_px_user_data;
/* Called after every refresh cycle to tell the rendering and flushing time + the number of flushed pixels */
void (*monitor_cb)(struct _disp_t * disp, uint32_t time, uint32_t px);
lv_disp_user_data_t monitor_user_data;
#if USE_LV_GPU
/*OPTIONAL: Blend two memories using opacity (GPU only)*/
void (*mem_blend)(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa);
@ -98,11 +98,16 @@ typedef struct _disp_drv_t {
struct _lv_obj_t;
typedef struct _disp_t {
/*Driver to the display*/
lv_disp_drv_t driver;
/*Screens of the display*/
lv_ll_t scr_ll;
struct _lv_obj_t * act_scr;
struct _lv_obj_t * top_layer;
struct _lv_obj_t * sys_layer;
/*Invalidated (marked to redraw) areas*/
lv_area_t inv_areas[LV_INV_BUF_SIZE];
uint8_t inv_area_joined[LV_INV_BUF_SIZE];
uint32_t inv_p :10;