From 68240704c7a60534342cfc0157564f11cf82d9d8 Mon Sep 17 00:00:00 2001 From: JF Date: Wed, 25 Mar 2020 21:23:40 +0100 Subject: Add support for BLE notification (ANS client). Work In Progress!!! --- src/Components/Ble/BleController.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/Components/Ble/BleController.h') diff --git a/src/Components/Ble/BleController.h b/src/Components/Ble/BleController.h index be491ee9..4f037fc1 100644 --- a/src/Components/Ble/BleController.h +++ b/src/Components/Ble/BleController.h @@ -1,15 +1,29 @@ #pragma once +#include > +#include + namespace Pinetime { namespace Controllers { class Ble { public: + struct NotificationMessage { + uint8_t size = 0; + const char* message = nullptr; + }; + + Ble(); bool IsConnected() const {return isConnected;} void Connect(); void Disconnect(); + void PushNotification(const char* message, uint8_t size); + bool PopNotification(NotificationMessage& msg); + private: bool isConnected = false; + QueueHandle_t notificationQueue; + }; } } \ No newline at end of file -- cgit v1.2.3-70-g09d2