diff options
Diffstat (limited to 'src/DisplayApp/DisplayApp.h')
-rw-r--r-- | src/DisplayApp/DisplayApp.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/DisplayApp/DisplayApp.h b/src/DisplayApp/DisplayApp.h index eabfe099..04265426 100644 --- a/src/DisplayApp/DisplayApp.h +++ b/src/DisplayApp/DisplayApp.h @@ -23,7 +23,10 @@ namespace Pinetime { public: enum class States {Idle, Running}; enum class Messages : uint8_t {GoToSleep, GoToRunning, UpdateDateTime, UpdateBleConnection, UpdateBatteryLevel, TouchEvent} ; - DisplayApp(Controllers::Battery &batteryController, + DisplayApp(Pinetime::Drivers::St7789& lcd, + Pinetime::Components::Gfx& gfx, + Pinetime::Drivers::Cst816S&, + Controllers::Battery &batteryController, Controllers::Ble &bleController, Controllers::DateTime& dateTimeController); void Start(); @@ -33,9 +36,8 @@ namespace Pinetime { TaskHandle_t taskHandle; static void Process(void* instance); void InitHw(); - Pinetime::Drivers::SpiMaster spi; - std::unique_ptr<Drivers::St7789> lcd; - std::unique_ptr<Components::Gfx> gfx; + Pinetime::Drivers::St7789& lcd; + Pinetime::Components::Gfx& gfx; const FONT_INFO largeFont {lCD_70ptFontInfo.height, lCD_70ptFontInfo.startChar, lCD_70ptFontInfo.endChar, lCD_70ptFontInfo.spacePixels, lCD_70ptFontInfo.charInfo, lCD_70ptFontInfo.data}; const FONT_INFO smallFont {lCD_14ptFontInfo.height, lCD_14ptFontInfo.startChar, lCD_14ptFontInfo.endChar, lCD_14ptFontInfo.spacePixels, lCD_14ptFontInfo.charInfo, lCD_14ptFontInfo.data}; void Refresh(); @@ -52,18 +54,13 @@ namespace Pinetime { Pinetime::Controllers::Ble &bleController; Pinetime::Controllers::DateTime& dateTimeController; - Pinetime::Drivers::Cst816S touchPanel; + Pinetime::Drivers::Cst816S& touchPanel; void OnTouchEvent(); Screens::Clock clockScreen; Screens::Screen* currentScreen = nullptr; Screens::Message messageScreen; bool screenState = false; - static constexpr uint8_t pinSpiSck = 2; - static constexpr uint8_t pinSpiMosi = 3; - static constexpr uint8_t pinSpiMiso = 4; - static constexpr uint8_t pinSpiCsn = 25; - static constexpr uint8_t pinLcdDataCommand = 18; static constexpr uint8_t pinLcdBacklight1 = 14; static constexpr uint8_t pinLcdBacklight2 = 22; static constexpr uint8_t pinLcdBacklight3 = 23; |