diff options
| author | JF <jf@codingfield.com> | 2020-05-17 10:29:13 +0200 |
|---|---|---|
| committer | Gitea <gitea@fake.local> | 2020-05-17 10:29:13 +0200 |
| commit | 8a94750e30399bfb204cbec59a769d9d1b6b5baa (patch) | |
| tree | 8a1a58beae54e238d28aff116c900f3b428b7db4 /src/SystemTask/SystemTask.cpp | |
| parent | 86d5732b960fbe7f81ed711b2de7e6b79293c96a (diff) | |
| parent | be1ad9b07083e656a649d223750ff4b14b781b7b (diff) | |
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/SystemTask/SystemTask.cpp')
| -rw-r--r-- | src/SystemTask/SystemTask.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/SystemTask/SystemTask.cpp b/src/SystemTask/SystemTask.cpp index e65abb61..fc37ecb2 100644 --- a/src/SystemTask/SystemTask.cpp +++ b/src/SystemTask/SystemTask.cpp @@ -3,11 +3,15 @@ #include <drivers/Cst816s.h> #include <DisplayApp/LittleVgl.h> #include <hal/nrf_rtc.h> -#include <BLE/BleManager.h> -#include <softdevice/common/nrf_sdh_freertos.h> #include <Components/Ble/NotificationManager.h> +#include <host/ble_gatt.h> +#include <host/ble_hs_adv.h> #include "SystemTask.h" +#include <nimble/hci_common.h> +#include <host/ble_gap.h> +#include <host/util/util.h> #include "../main.h" + using namespace Pinetime::System; SystemTask::SystemTask(Drivers::SpiMaster &spi, Drivers::St7789 &lcd, Drivers::Cst816S &touchPanel, @@ -17,7 +21,8 @@ SystemTask::SystemTask(Drivers::SpiMaster &spi, Drivers::St7789 &lcd, Drivers::C Pinetime::Controllers::NotificationManager& notificationManager) : spi{spi}, lcd{lcd}, touchPanel{touchPanel}, lvgl{lvgl}, batteryController{batteryController}, bleController{bleController}, dateTimeController{dateTimeController}, - watchdog{}, watchdogView{watchdog}, notificationManager{notificationManager} { + watchdog{}, watchdogView{watchdog}, notificationManager{notificationManager}, + nimbleController(*this, bleController,dateTimeController, notificationManager) { systemTaksMsgQueue = xQueueCreate(10, 1); } @@ -37,9 +42,11 @@ void SystemTask::Work() { watchdog.Start(); NRF_LOG_INFO("Last reset reason : %s", Pinetime::Drivers::Watchdog::ResetReasonToString(watchdog.ResetReason())); APP_GPIOTE_INIT(2); - bool erase_bonds=true; - ble_manager_init_peer_manager(); - nrf_sdh_freertos_init(ble_manager_start_advertising, &erase_bonds); + +/* BLE */ + nimbleController.Init(); + nimbleController.StartAdvertising(); +/* /BLE*/ spi.Init(); lcd.Init(); |
