summaryrefslogtreecommitdiff
path: root/src/Components/Ble/NimbleController.h
diff options
context:
space:
mode:
authorAdam Pigg <adam@piggz.co.uk>2020-07-20 21:28:21 +0100
committerAdam Pigg <adam@piggz.co.uk>2020-07-20 21:28:21 +0100
commit5713eac1045394928de19e76fd00a172f63bffa7 (patch)
treea20e130e01147c4afc89981d7bcfa6773dc6445e /src/Components/Ble/NimbleController.h
parent686e826f4e656546523e989535c74f286a91855b (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.h')
-rw-r--r--src/Components/Ble/NimbleController.h5
1 files changed, 4 insertions, 1 deletions
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},