summaryrefslogtreecommitdiff
path: root/src/SystemTask/SystemTask.cpp
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-05-11 16:50:37 (GMT)
committerJF <jf@codingfield.com>2020-05-11 16:50:37 (GMT)
commitee05577dd62c64d0e6a2e497b75710c7a1351557 (patch)
tree36d36462bd1c3aaa06df46b0bf6086111c83df2b /src/SystemTask/SystemTask.cpp
parent0b8e6c3fa20457bce931b1d289f187e46fc68307 (diff)
Fix race conditions on SPI and integrate the SPI NOR Flash driver into DFUService (WIP)
Diffstat (limited to 'src/SystemTask/SystemTask.cpp')
-rw-r--r--src/SystemTask/SystemTask.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/SystemTask/SystemTask.cpp b/src/SystemTask/SystemTask.cpp
index c29a932..022cade 100644
--- a/src/SystemTask/SystemTask.cpp
+++ b/src/SystemTask/SystemTask.cpp
@@ -23,7 +23,7 @@ SystemTask::SystemTask(Drivers::SpiMaster &spi, Drivers::St7789 &lcd,
spi{spi}, lcd{lcd}, spiNorFlash{spiNorFlash}, touchPanel{touchPanel}, lvgl{lvgl}, batteryController{batteryController},
bleController{bleController}, dateTimeController{dateTimeController},
watchdog{}, watchdogView{watchdog}, notificationManager{notificationManager},
- nimbleController(*this, bleController,dateTimeController, notificationManager) {
+ nimbleController(*this, bleController,dateTimeController, notificationManager, spiNorFlash) {
systemTaksMsgQueue = xQueueCreate(10, 1);
}
@@ -39,19 +39,17 @@ void SystemTask::Process(void *instance) {
}
void SystemTask::Work() {
- watchdog.Setup(7);
- watchdog.Start();
+// watchdog.Setup(7);
+// watchdog.Start();
NRF_LOG_INFO("Last reset reason : %s", Pinetime::Drivers::Watchdog::ResetReasonToString(watchdog.ResetReason()));
APP_GPIOTE_INIT(2);
-/* BLE */
+ spi.Init();
+ spiNorFlash.Init();
nimbleController.Init();
nimbleController.StartAdvertising();
-/* /BLE*/
-
- spi.Init();
lcd.Init();
- spiNorFlash.Init();
+
touchPanel.Init();
batteryController.Init();