From 3796f76c56d42ca9b4fd36edae7f6bf6656009b9 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Mon, 29 Jun 2020 00:37:11 -0400 Subject: 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. --- app/include/zmk/split/bluetooth/service.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 app/include/zmk/split/bluetooth/service.h (limited to 'app/include') 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 + +#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 -- cgit v1.2.3