From 9bbd2ddbc4e44742913e35e25b21b80d80efe36b Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sun, 26 Feb 2023 20:33:34 +0100 Subject: LVGL / FS : Initialize the LVGL FS driver in LittleVgl (instead of FS). Previously, the LVGL driver for the filesystem was initialized in the class FS. However, since 6f942e2, the order of the initializations was incorrect : the driver was initialized (FS::LVGLFileSystemInit()) before LVGL (LittleVgl.Init()), which means that the driver registration was probably dropped when LVGL was initialized. The LVGL driver is now initialized in LittleVgl.Init(), which seems to make much more sense, since all LVGL drivers are initialized there. This way, we ensure that the initialization of the drivers is consistent. --- src/displayapp/LittleVgl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/displayapp/LittleVgl.h') diff --git a/src/displayapp/LittleVgl.h b/src/displayapp/LittleVgl.h index 38f1f00e..9a15ae15 100644 --- a/src/displayapp/LittleVgl.h +++ b/src/displayapp/LittleVgl.h @@ -1,6 +1,7 @@ #pragma once #include +#include namespace Pinetime { namespace Drivers { @@ -11,7 +12,7 @@ namespace Pinetime { class LittleVgl { public: enum class FullRefreshDirections { None, Up, Down, Left, Right, LeftAnim, RightAnim }; - LittleVgl(Pinetime::Drivers::St7789& lcd); + LittleVgl(Pinetime::Drivers::St7789& lcd, Pinetime::Controllers::FS& filesystem); LittleVgl(const LittleVgl&) = delete; LittleVgl& operator=(const LittleVgl&) = delete; @@ -37,8 +38,10 @@ namespace Pinetime { private: void InitDisplay(); void InitTouchpad(); + void InitFileSystem(); Pinetime::Drivers::St7789& lcd; + Pinetime::Controllers::FS& filesystem; lv_disp_buf_t disp_buf_2; lv_color_t buf2_1[LV_HOR_RES_MAX * 4]; -- cgit v1.2.3-70-g09d2