diff options
| author | hubmartin <hub.martin@gmail.com> | 2021-08-29 09:43:50 (GMT) |
|---|---|---|
| committer | hubmartin <hub.martin@gmail.com> | 2021-08-29 09:43:50 (GMT) |
| commit | 8390d0ef7243261675aab3a5c19862eb3fc53e68 (patch) | |
| tree | a8429e8d2a455df8afe152197119075b5789e9fb /src/main.cpp | |
| parent | 51c5257548efe678ec8e18d8cdea2476672f1238 (diff) | |
| parent | 6c023785e53c507f7cb20703f5f3a221ea095068 (diff) | |
Merge branch 'develop' into pinmap
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index 4d16a6d..441fbd9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -46,6 +46,7 @@ #include "drivers/PinMap.h" #include "systemtask/SystemTask.h" #include "drivers/PinMap.h" +#include "touchhandler/TouchHandler.h" #if NRF_LOG_ENABLED #include "logging/NrfLogger.h" @@ -77,8 +78,7 @@ Pinetime::Drivers::SpiNorFlash spiNorFlash {flashSpi}; // respecting correct timings. According to erratas heet, this magic value makes it run // at ~390Khz with correct timings. static constexpr uint32_t MaxTwiFrequencyWithoutHardwareBug {0x06200000}; -Pinetime::Drivers::TwiMaster twiMaster {Pinetime::Drivers::TwiMaster::Modules::TWIM1, - Pinetime::Drivers::TwiMaster::Parameters {MaxTwiFrequencyWithoutHardwareBug, Pinetime::PinMap::TwiSda, Pinetime::PinMap::TwiScl}}; +Pinetime::Drivers::TwiMaster twiMaster {NRF_TWIM1, MaxTwiFrequencyWithoutHardwareBug, Pinetime::PinMap::TwiSda, Pinetime::PinMap::TwiScl}; Pinetime::Drivers::Cst816S touchPanel {twiMaster, touchPanelTwiAddress}; #ifdef PINETIME_IS_RECOVERY static constexpr bool isFactory = true; @@ -111,6 +111,7 @@ Pinetime::Drivers::WatchdogView watchdogView(watchdog); Pinetime::Controllers::NotificationManager notificationManager; Pinetime::Controllers::MotionController motionController; Pinetime::Controllers::TimerController timerController; +Pinetime::Controllers::TouchHandler touchHandler(touchPanel, lvgl); Pinetime::Controllers::FS fs {spiNorFlash}; Pinetime::Controllers::Settings settingsController {fs}; @@ -129,7 +130,8 @@ Pinetime::Applications::DisplayApp displayApp(lcd, settingsController, motorController, motionController, - timerController); + timerController, + touchHandler); Pinetime::System::SystemTask systemTask(spi, lcd, @@ -151,7 +153,8 @@ Pinetime::System::SystemTask systemTask(spi, heartRateController, displayApp, heartRateApp, - fs); + fs, + touchHandler); void nrfx_gpiote_evt_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { if (pin == Pinetime::PinMap::Cst816sIrq) { @@ -316,6 +319,7 @@ int main(void) { lvgl.Init(); systemTask.Start(); + nimble_port_init(); vTaskStartScheduler(); |
