summaryrefslogtreecommitdiff
path: root/src/Components/Ble/BleController.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-03-25 21:23:40 +0100
committerJF <jf@codingfield.com>2020-03-25 21:23:40 +0100
commit68240704c7a60534342cfc0157564f11cf82d9d8 (patch)
tree8472af61a5fa8a99ce5549f2de73b47f73cf41b6 /src/Components/Ble/BleController.h
parent7e9a7e4d5fa0f55b43180600d499f1d0ce6aded1 (diff)
Add support for BLE notification (ANS client).
Work In Progress!!!
Diffstat (limited to 'src/Components/Ble/BleController.h')
-rw-r--r--src/Components/Ble/BleController.h14
1 files changed, 14 insertions, 0 deletions
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 <FreeRTOS.h>>
+#include <queue.h>
+
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