From e285ba9972fc2e0c74457b01db28dba9cb88c4e2 Mon Sep 17 00:00:00 2001 From: JF Date: Sun, 1 Mar 2020 15:57:58 +0100 Subject: Fix double-buffering for spi display (it's actually using double-buffering, now) --- src/DisplayApp/DisplayApp.cpp | 3 +++ src/DisplayApp/LittleVgl.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/DisplayApp/DisplayApp.cpp b/src/DisplayApp/DisplayApp.cpp index 2519f40e..316312ed 100644 --- a/src/DisplayApp/DisplayApp.cpp +++ b/src/DisplayApp/DisplayApp.cpp @@ -45,6 +45,9 @@ void DisplayApp::Process(void *instance) { NRF_LOG_INFO("DisplayApp task started!"); app->InitHw(); + // Send a dummy notification to unlock the lvgl display driver for the first iteration + xTaskNotifyGive(xTaskGetCurrentTaskHandle()); + while (1) { app->Refresh(); diff --git a/src/DisplayApp/LittleVgl.cpp b/src/DisplayApp/LittleVgl.cpp index 50744acc..95794546 100644 --- a/src/DisplayApp/LittleVgl.cpp +++ b/src/DisplayApp/LittleVgl.cpp @@ -62,6 +62,8 @@ void LittleVgl::InitTouchpad() { } void LittleVgl::FlushDisplay(const lv_area_t *area, lv_color_t *color_p) { + ulTaskNotifyTake(pdTRUE, 500); + auto x = area->x1; auto y = area->y1; auto width = (area->x2-area->x1)+1; -- cgit v1.2.3