InfiniTimeOrg / InfiniSim

Simulator for InfiniTime user interface without needing a PineTime
GNU General Public License v3.0
167 stars 67 forks source link

LVGL / FS : Initialize the LVGL FS driver in LittleVgl (instead of FS). #89

Closed NeroBurner closed 1 year ago

NeroBurner commented 1 year ago

Compatibility with https://github.com/InfiniTimeOrg/InfiniTime/pull/1648

Previously, the LVGL driver for the filesystem was initialized in the class FS. However, since https://github.com/InfiniTimeOrg/InfiniTime/commit/6f942e20ed5881e0b520f4c4f0f1fd2ffb4a3a2b, 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.