summaryrefslogtreecommitdiff
path: root/app/include
diff options
context:
space:
mode:
authorPete Johanson <peter@peterjohanson.com>2020-06-29 00:37:11 -0400
committerPete Johanson <peter@peterjohanson.com>2020-07-17 22:43:40 -0400
commit3796f76c56d42ca9b4fd36edae7f6bf6656009b9 (patch)
tree367eaa4b9c7b80c1e0d8a5f196668c2c911a4137 /app/include
parentf6110a632d0ddbc0a9ebd7bfd4997366f95facfd (diff)
Initial exploration of split BLE service.
* Service for split peripheral to report position state to split central. * Updated advertising info. * Behavior for split BT until we have a proper event system.
Diffstat (limited to 'app/include')
-rw-r--r--app/include/zmk/split/bluetooth/service.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/include/zmk/split/bluetooth/service.h b/app/include/zmk/split/bluetooth/service.h
new file mode 100644
index 0000000..694afc1
--- /dev/null
+++ b/app/include/zmk/split/bluetooth/service.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include <bluetooth/uuid.h>
+
+#ifndef BT_UUID_NUM_OF_DIGITALS
+#define BT_UUID_NUM_OF_DIGITALS BT_UUID_DECLARE_16(0x2909)
+#endif
+
+#define ZMK_SPLIT_BT_BASE_UUID 0x2a, 0x48, 0xc2, 0xb1, 0xcf, 0xc5, 0x67, 0xc9, 0x07, 0x71, 0x96, 0x00
+#define ZMK_SPLIT_BT_SERVICE_UUID ZMK_SPLIT_BT_BASE_UUID, 0x00, 0x00, 0x00, 0x00
+#define ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID ZMK_SPLIT_BT_BASE_UUID, 0x01, 0x00, 0x00, 0x00
+
+#define ZMK_BT_UUID_SPLIT BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SERVICE_UUID)
+#define ZMK_BT_UUID_SPLIT_POS_STATE BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID)
+
+int zmk_split_bt_position_pressed(u8_t position);
+int zmk_split_bt_position_released(u8_t position); \ No newline at end of file