LittleVgl: Instantiate in DisplayApp

LVGL is only a part of the main DisplayApp. Other "DisplayApps" can be
implemented without LVGL.

DummyLittleVgl isn't needed anymore and has been removed
This commit is contained in:
Riku Isokoski
2023-02-25 13:29:07 +02:00
parent ff34cf196e
commit 6f942e20ed
8 changed files with 5 additions and 64 deletions

View File

@@ -81,14 +81,10 @@ static constexpr uint32_t MaxTwiFrequencyWithoutHardwareBug {0x06200000};
Pinetime::Drivers::TwiMaster twiMaster {NRF_TWIM1, MaxTwiFrequencyWithoutHardwareBug, Pinetime::PinMap::TwiSda, Pinetime::PinMap::TwiScl};
Pinetime::Drivers::Cst816S touchPanel {twiMaster, touchPanelTwiAddress};
#ifdef PINETIME_IS_RECOVERY
#include "displayapp/DummyLittleVgl.h"
#include "displayapp/DisplayAppRecovery.h"
#else
#include "displayapp/LittleVgl.h"
#include "displayapp/DisplayApp.h"
#endif
Pinetime::Components::LittleVgl lvgl {lcd};
Pinetime::Drivers::Bma421 motionSensor {twiMaster, motionSensorTwiAddress};
Pinetime::Drivers::Hrs3300 heartRateSensor {twiMaster, heartRateSensorTwiAddress};
@@ -115,7 +111,6 @@ Pinetime::Controllers::ButtonHandler buttonHandler;
Pinetime::Controllers::BrightnessController brightnessController {};
Pinetime::Applications::DisplayApp displayApp(lcd,
lvgl,
touchPanel,
batteryController,
bleController,
@@ -137,7 +132,6 @@ Pinetime::System::SystemTask systemTask(spi,
spiNorFlash,
twiMaster,
touchPanel,
lvgl,
batteryController,
bleController,
dateTimeController,
@@ -350,8 +344,6 @@ int main() {
NoInit_MagicWord = NoInit_MagicValue;
}
lvgl.Init();
systemTask.Start();
nimble_port_init();