From e25c4edbcf64a62b6a0555722b289a94aea506d1 Mon Sep 17 00:00:00 2001 From: Avamander Date: Fri, 2 Oct 2020 21:45:21 +0300 Subject: Renamed SystemTask/ to systemtask/ --- src/SystemTask/SystemTask.h | 92 --------------------------------------------- 1 file changed, 92 deletions(-) delete mode 100644 src/SystemTask/SystemTask.h (limited to 'src/SystemTask/SystemTask.h') diff --git a/src/SystemTask/SystemTask.h b/src/SystemTask/SystemTask.h deleted file mode 100644 index 40277cf3..00000000 --- a/src/SystemTask/SystemTask.h +++ /dev/null @@ -1,92 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "SystemMonitor.h" -#include "Components/Ble/NimbleController.h" -#include "timers.h" - -namespace Pinetime { - namespace System { - class SystemTask { - public: - enum class Messages {GoToSleep, GoToRunning, OnNewTime, OnNewNotification, BleConnected, - BleFirmwareUpdateStarted, BleFirmwareUpdateFinished, OnTouchEvent, OnButtonEvent, OnDisplayTaskSleeping - }; - - SystemTask(Drivers::SpiMaster &spi, Drivers::St7789 &lcd, - Pinetime::Drivers::SpiNorFlash& spiNorFlash, - Drivers::TwiMaster& twiMaster, Drivers::Cst816S &touchPanel, - Components::LittleVgl &lvgl, - Controllers::Battery &batteryController, Controllers::Ble &bleController, - Controllers::DateTime &dateTimeController, - Pinetime::Controllers::NotificationManager& manager); - - - void Start(); - void PushMessage(Messages msg); - - void OnButtonPushed(); - void OnTouchEvent(); - - void OnIdle(); - - Pinetime::Controllers::NimbleController& nimble() {return nimbleController;}; - - private: - TaskHandle_t taskHandle; - - Pinetime::Drivers::SpiMaster& spi; - Pinetime::Drivers::St7789& lcd; - Pinetime::Drivers::SpiNorFlash& spiNorFlash; - Pinetime::Drivers::TwiMaster& twiMaster; - Pinetime::Drivers::Cst816S& touchPanel; - Pinetime::Components::LittleVgl& lvgl; - Pinetime::Controllers::Battery& batteryController; - std::unique_ptr displayApp; - Pinetime::Controllers::Ble& bleController; - Pinetime::Controllers::DateTime& dateTimeController; - QueueHandle_t systemTaksMsgQueue; - std::atomic isSleeping{false}; - std::atomic isGoingToSleep{false}; - std::atomic isWakingUp{false}; - Pinetime::Drivers::Watchdog watchdog; - Pinetime::Drivers::WatchdogView watchdogView; - Pinetime::Controllers::NotificationManager& notificationManager; - Pinetime::Controllers::NimbleController nimbleController; - - - 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 pinButton = 13; - static constexpr uint8_t pinTouchIrq = 28; - - static void Process(void* instance); - void Work(); - void ReloadIdleTimer() const; - bool isBleDiscoveryTimerRunning = false; - uint8_t bleDiscoveryTimer = 0; - static constexpr uint32_t idleTime = 15000; - TimerHandle_t idleTimer; - bool doNotGoToSleep = false; - - void GoToRunning(); - -#if configUSE_TRACE_FACILITY == 1 - SystemMonitor monitor; -#else - SystemMonitor monitor; -#endif - }; - } -} -- cgit v1.2.3-70-g09d2