diff options
| author | Adam Pigg <adam@piggz.co.uk> | 2020-07-20 20:28:21 (GMT) |
|---|---|---|
| committer | Adam Pigg <adam@piggz.co.uk> | 2020-07-20 20:28:21 (GMT) |
| commit | 5713eac1045394928de19e76fd00a172f63bffa7 (patch) | |
| tree | a20e130e01147c4afc89981d7bcfa6773dc6445e /src/Components/Ble/NimbleController.cpp | |
| parent | 686e826f4e656546523e989535c74f286a91855b (diff) | |
Fully implement music app and service
SystemTask can return a reference to the nimbleController
The nimbleController can return a reference to the musicService
The musicService get a connection handle from the nimbleController
The musicApp communicated directly with the musicService
Diffstat (limited to 'src/Components/Ble/NimbleController.cpp')
| -rw-r--r-- | src/Components/Ble/NimbleController.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Components/Ble/NimbleController.cpp b/src/Components/Ble/NimbleController.cpp index 5345867..d7bbd8b 100644 --- a/src/Components/Ble/NimbleController.cpp +++ b/src/Components/Ble/NimbleController.cpp @@ -6,6 +6,7 @@ #include <hal/nrf_rtc.h> #include "NimbleController.h" +#include "MusicService.h" #include <services/gatt/ble_svc_gatt.h> #include <services/gap/ble_svc_gap.h> #include <host/util/util.h> @@ -35,7 +36,8 @@ NimbleController::NimbleController(Pinetime::System::SystemTask& systemTask, currentTimeClient{dateTimeController}, anService{systemTask, notificationManager}, alertNotificationClient{systemTask, notificationManager}, - currentTimeService{dateTimeController} { + currentTimeService{dateTimeController}, + musicService{systemTask} { } @@ -327,5 +329,7 @@ void NimbleController::StartDiscovery() { } - +uint16_t NimbleController::connHandle() { + return connectionHandle; +} |
