From 5713eac1045394928de19e76fd00a172f63bffa7 Mon Sep 17 00:00:00 2001 From: Adam Pigg Date: Mon, 20 Jul 2020 21:28:21 +0100 Subject: 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 --- src/Components/Ble/NimbleController.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Components/Ble/NimbleController.h') diff --git a/src/Components/Ble/NimbleController.h b/src/Components/Ble/NimbleController.h index fab3df2b..dff93c87 100644 --- a/src/Components/Ble/NimbleController.h +++ b/src/Components/Ble/NimbleController.h @@ -16,6 +16,7 @@ namespace Pinetime { } namespace Controllers { class DateTime; + class NimbleController { public: @@ -39,6 +40,8 @@ namespace Pinetime { Pinetime::Controllers::MusicService& music() {return musicService;}; + uint16_t connHandle(); + private: static constexpr char* deviceName = "Pinetime-JF"; Pinetime::System::SystemTask& systemTask; @@ -56,7 +59,7 @@ namespace Pinetime { MusicService musicService; uint8_t addrType; // 1 = Random, 0 = PUBLIC - uint16_t connectionHandle; + uint16_t connectionHandle = 0; ble_uuid128_t dfuServiceUuid { .u { .type = BLE_UUID_TYPE_128}, -- cgit v1.2.3-70-g09d2