diff options
| author | JF <jf@codingfield.com> | 2020-03-01 14:57:58 (GMT) |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-03-01 14:57:58 (GMT) |
| commit | e285ba9972fc2e0c74457b01db28dba9cb88c4e2 (patch) | |
| tree | 055efbe02f1f9a3a90e673b793490c6277f30713 /src | |
| parent | 179b14f48c2c7506d1a7832899e134cc3868a41c (diff) | |
Fix double-buffering for spi display (it's actually using double-buffering, now)
Diffstat (limited to 'src')
| -rw-r--r-- | src/DisplayApp/DisplayApp.cpp | 3 | ||||
| -rw-r--r-- | src/DisplayApp/LittleVgl.cpp | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/DisplayApp/DisplayApp.cpp b/src/DisplayApp/DisplayApp.cpp index 2519f40..316312e 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 50744ac..9579454 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; |
