Fix race conditions on SPI and integrate the SPI NOR Flash driver into DFUService (WIP)

This commit is contained in:
JF
2020-05-11 18:50:37 +02:00
parent 0b8e6c3fa2
commit ee05577dd6
12 changed files with 257 additions and 48 deletions

View File

@@ -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();