mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-26 19:15:38 +08:00
fix conflicts
This commit is contained in:
@@ -11,7 +11,11 @@ TFT_eSPI tft = TFT_eSPI(); /* TFT instance */
|
||||
static uint32_t screenWidth = 320;
|
||||
static uint32_t screenHeight = 240;
|
||||
|
||||
<<<<<<< HEAD
|
||||
static lv_disp_buf_t disp_buf;
|
||||
=======
|
||||
static lv_draw_buf_t draw_buf;
|
||||
>>>>>>> xiaoxiang781216-disp
|
||||
static lv_color_t buf[screenWidth * 10];
|
||||
|
||||
#if LV_USE_LOG != 0
|
||||
@@ -82,7 +86,7 @@ void setup()
|
||||
uint16_t calData[5] = {275, 3620, 264, 3532, 1};
|
||||
tft.setTouch(calData);
|
||||
|
||||
lv_disp_buf_init(&disp_buf, buf, NULL, screenWidth * 10);
|
||||
lv_draw_buf_init(&draw_buf, buf, NULL, screenWidth * 10);
|
||||
|
||||
/* Initialize the display */
|
||||
lv_disp_drv_t disp_drv;
|
||||
@@ -91,7 +95,7 @@ void setup()
|
||||
disp_drv.hor_res = screenWidth;
|
||||
disp_drv.ver_res = screenHeight;
|
||||
disp_drv.flush_cb = my_disp_flush;
|
||||
disp_drv.buffer = &disp_buf;
|
||||
disp_drv.draw_buf = &draw_buf;
|
||||
lv_disp_drv_register(&disp_drv);
|
||||
|
||||
/* Initialize the (dummy) input device driver */
|
||||
@@ -103,7 +107,7 @@ void setup()
|
||||
|
||||
/* Try an example from the lv_examples Arduino library
|
||||
make sure to include it as written above.
|
||||
lv_ex_btn_1(); */
|
||||
lv_example_btn_1(); */
|
||||
}
|
||||
|
||||
void loop()
|
||||
|
||||
@@ -75,21 +75,21 @@ void lv_port_disp_init(void)
|
||||
* */
|
||||
|
||||
/* Example for 1) */
|
||||
static lv_disp_buf_t draw_buf_dsc_1;
|
||||
static lv_color_t draw_buf_1[MY_DISP_HOR_RES * 10]; /*A buffer for 10 rows*/
|
||||
lv_disp_buf_init(&draw_buf_dsc_1, draw_buf_1, NULL, MY_DISP_HOR_RES * 10); /*Initialize the display buffer*/
|
||||
static lv_draw_buf_t draw_buf_dsc_1;
|
||||
static lv_color_t buf_1[MY_DISP_HOR_RES * 10]; /*A buffer for 10 rows*/
|
||||
lv_draw_buf_init(&draw_buf_dsc_1, buf_1, NULL, MY_DISP_HOR_RES * 10); /*Initialize the display buffer*/
|
||||
|
||||
/* Example for 2) */
|
||||
static lv_disp_buf_t draw_buf_dsc_2;
|
||||
static lv_color_t draw_buf_2_1[MY_DISP_HOR_RES * 10]; /*A buffer for 10 rows*/
|
||||
static lv_color_t draw_buf_2_1[MY_DISP_HOR_RES * 10]; /*An other buffer for 10 rows*/
|
||||
lv_disp_buf_init(&draw_buf_dsc_2, draw_buf_2_1, draw_buf_2_1, MY_DISP_HOR_RES * 10); /*Initialize the display buffer*/
|
||||
static lv_draw_buf_t draw_buf_dsc_2;
|
||||
static lv_color_t buf_2_1[MY_DISP_HOR_RES * 10]; /*A buffer for 10 rows*/
|
||||
static lv_color_t buf_2_1[MY_DISP_HOR_RES * 10]; /*An other buffer for 10 rows*/
|
||||
lv_draw_buf_init(&draw_buf_dsc_2, buf_2_1, buf_2_1, MY_DISP_HOR_RES * 10); /*Initialize the display buffer*/
|
||||
|
||||
/* Example for 3) */
|
||||
static lv_disp_buf_t draw_buf_dsc_3;
|
||||
static lv_color_t draw_buf_3_1[MY_DISP_HOR_RES * MY_DISP_VER_RES]; /*A screen sized buffer*/
|
||||
static lv_color_t draw_buf_3_1[MY_DISP_HOR_RES * MY_DISP_VER_RES]; /*An other screen sized buffer*/
|
||||
lv_disp_buf_init(&draw_buf_dsc_3, draw_buf_3_1, draw_buf_3_2, MY_DISP_VER_RES * LV_VER_RES_MAX); /*Initialize the display buffer*/
|
||||
static lv_draw_buf_t draw_buf_dsc_3;
|
||||
static lv_color_t buf_3_1[MY_DISP_HOR_RES * MY_DISP_VER_RES]; /*A screen sized buffer*/
|
||||
static lv_color_t buf_3_1[MY_DISP_HOR_RES * MY_DISP_VER_RES]; /*An other screen sized buffer*/
|
||||
lv_draw_buf_init(&draw_buf_dsc_3, buf_3_1, buf_3_2, MY_DISP_VER_RES * LV_VER_RES_MAX); /*Initialize the display buffer*/
|
||||
|
||||
/*-----------------------------------
|
||||
* Register the display in LVGL
|
||||
@@ -108,7 +108,7 @@ void lv_port_disp_init(void)
|
||||
disp_drv.flush_cb = disp_flush;
|
||||
|
||||
/*Set a display buffer*/
|
||||
disp_drv.buffer = &draw_buf_dsc_1;
|
||||
disp_drv.draw_buf = &draw_buf_dsc_1;
|
||||
|
||||
#if LV_USE_GPU
|
||||
/*Fill a memory array with a color*/
|
||||
|
||||
Reference in New Issue
Block a user