nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acas...@apache.org
Subject [incubator-nuttx-apps] 06/15: apps/examples/lvgldemo: Update the lvgl init procedure
Date Wed, 15 Apr 2020 14:38:38 GMT
This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit b7e96b473d69e484d2a04a3eb8e102b2167bb883
Author: Qi Huang <huangqi3@xiaomi.com>
AuthorDate: Tue Apr 7 01:43:02 2020 +0000

    apps/examples/lvgldemo: Update the lvgl init procedure
    
    Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
    Change-Id: I36d250d7839a86d486dcb8f720fcf12f9b954327
---
 examples/lvgldemo/lvgldemo.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/examples/lvgldemo/lvgldemo.c b/examples/lvgldemo/lvgldemo.c
index 07e4582..eedc5ed 100644
--- a/examples/lvgldemo/lvgldemo.c
+++ b/examples/lvgldemo/lvgldemo.c
@@ -148,6 +148,9 @@ int main(int argc, FAR char *argv[])
   lv_disp_drv_t disp_drv;
   pthread_t tick_thread;
 
+  lv_disp_buf_t disp_buf;
+  static lv_color_t buf[CONFIG_LV_VDB_SIZE];
+
 #ifdef NEED_BOARDINIT
   /* Perform board-specific driver initialization */
 
@@ -170,8 +173,10 @@ int main(int argc, FAR char *argv[])
 
   /* Basic LittlevGL display driver initialization */
 
+  lv_disp_buf_init(&disp_buf, buf, NULL, LV_HOR_RES_MAX * 10);
   lv_disp_drv_init(&disp_drv);
-  disp_drv.disp_flush = fbdev_flush;
+  disp_drv.flush_cb = fbdev_flush;
+  disp_drv.buffer = &disp_buf;
   lv_disp_drv_register(&disp_drv);
 
   /* Tick interface initialization */
@@ -189,7 +194,7 @@ int main(int argc, FAR char *argv[])
    * mouse position and state.
    */
 
-  indev_drv.read = tp_read;
+  indev_drv.read_cb = tp_read;
   lv_indev_drv_register(&indev_drv);
 
   /* Demo initialization */


Mime
View raw message