-
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99a074b
commit 95214c7
Showing
1 changed file
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
|
||
// ../src/components/bluepad32/include/bt/uni_bt_service.gatt.h generated from ../src/components/bluepad32/bt/uni_bt_service.gatt for BTstack | ||
// it needs to be regenerated when the .gatt file is updated. | ||
|
||
// To generate ../src/components/bluepad32/include/bt/uni_bt_service.gatt.h: | ||
// ../external/btstack/tool/compile_gatt.py ../src/components/bluepad32/bt/uni_bt_service.gatt ../src/components/bluepad32/include/bt/uni_bt_service.gatt.h | ||
|
||
// att db format version 1 | ||
|
||
// binary attribute representation: | ||
// - size in bytes (16), flags(16), handle (16), uuid (16/128), value(...) | ||
|
||
#include <stdint.h> | ||
|
||
// Reference: https://en.cppreference.com/w/cpp/feature_test | ||
#if __cplusplus >= 200704L | ||
constexpr | ||
#endif | ||
const uint8_t profile_data[] = | ||
{ | ||
// ATT DB Version | ||
1, | ||
|
||
// 0x0001 PRIMARY_SERVICE-GAP_SERVICE | ||
0x0a, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x28, 0x00, 0x18, | ||
// 0x0002 CHARACTERISTIC-GAP_DEVICE_NAME - READ | ||
0x0d, 0x00, 0x02, 0x00, 0x02, 0x00, 0x03, 0x28, 0x02, 0x03, 0x00, 0x00, 0x2a, | ||
// 0x0003 VALUE CHARACTERISTIC-GAP_DEVICE_NAME - READ -'LE Streamer' | ||
// READ_ANYBODY | ||
0x13, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x2a, 0x4c, 0x45, 0x20, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x72, | ||
// 0x0004 PRIMARY_SERVICE-GATT_SERVICE | ||
0x0a, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x28, 0x01, 0x18, | ||
// 0x0005 CHARACTERISTIC-GATT_DATABASE_HASH - READ | ||
0x0d, 0x00, 0x02, 0x00, 0x05, 0x00, 0x03, 0x28, 0x02, 0x06, 0x00, 0x2a, 0x2b, | ||
// 0x0006 VALUE CHARACTERISTIC-GATT_DATABASE_HASH - READ -'' | ||
// READ_ANYBODY | ||
0x18, 0x00, 0x02, 0x00, 0x06, 0x00, 0x2a, 0x2b, 0x63, 0xd1, 0x0a, 0x98, 0x0b, 0xc9, 0x93, 0x5b, 0x8a, 0x75, 0x22, 0x95, 0x65, 0xde, 0x92, 0xe9, | ||
// Test Service | ||
// 0x0007 PRIMARY_SERVICE-0000FF10-0000-1000-8000-00805F9B34FB | ||
0x18, 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x28, 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x10, 0xff, 0x00, 0x00, | ||
// Test Characteristic A, write_without_response as well as notify | ||
// 0x0008 CHARACTERISTIC-0000FF11-0000-1000-8000-00805F9B34FB - WRITE_WITHOUT_RESPONSE | NOTIFY | DYNAMIC | ||
0x1b, 0x00, 0x02, 0x00, 0x08, 0x00, 0x03, 0x28, 0x14, 0x09, 0x00, 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x11, 0xff, 0x00, 0x00, | ||
// 0x0009 VALUE CHARACTERISTIC-0000FF11-0000-1000-8000-00805F9B34FB - WRITE_WITHOUT_RESPONSE | NOTIFY | DYNAMIC | ||
// WRITE_ANYBODY | ||
0x16, 0x00, 0x04, 0x03, 0x09, 0x00, 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x11, 0xff, 0x00, 0x00, | ||
// 0x000a CLIENT_CHARACTERISTIC_CONFIGURATION | ||
// READ_ANYBODY, WRITE_ANYBODY | ||
0x0a, 0x00, 0x0e, 0x01, 0x0a, 0x00, 0x02, 0x29, 0x00, 0x00, | ||
// Test Characteristic B, write_without_response as well as notify | ||
// 0x000b CHARACTERISTIC-0000FF12-0000-1000-8000-00805F9B34FB - WRITE_WITHOUT_RESPONSE | NOTIFY | DYNAMIC | ||
0x1b, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x03, 0x28, 0x14, 0x0c, 0x00, 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x12, 0xff, 0x00, 0x00, | ||
// 0x000c VALUE CHARACTERISTIC-0000FF12-0000-1000-8000-00805F9B34FB - WRITE_WITHOUT_RESPONSE | NOTIFY | DYNAMIC | ||
// WRITE_ANYBODY | ||
0x16, 0x00, 0x04, 0x03, 0x0c, 0x00, 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x12, 0xff, 0x00, 0x00, | ||
// 0x000d CLIENT_CHARACTERISTIC_CONFIGURATION | ||
// READ_ANYBODY, WRITE_ANYBODY | ||
0x0a, 0x00, 0x0e, 0x01, 0x0d, 0x00, 0x02, 0x29, 0x00, 0x00, | ||
// END | ||
0x00, 0x00, | ||
}; // total size 126 bytes | ||
|
||
|
||
// | ||
// list service handle ranges | ||
// | ||
#define ATT_SERVICE_GAP_SERVICE_START_HANDLE 0x0001 | ||
#define ATT_SERVICE_GAP_SERVICE_END_HANDLE 0x0003 | ||
#define ATT_SERVICE_GAP_SERVICE_01_START_HANDLE 0x0001 | ||
#define ATT_SERVICE_GAP_SERVICE_01_END_HANDLE 0x0003 | ||
#define ATT_SERVICE_GATT_SERVICE_START_HANDLE 0x0004 | ||
#define ATT_SERVICE_GATT_SERVICE_END_HANDLE 0x0006 | ||
#define ATT_SERVICE_GATT_SERVICE_01_START_HANDLE 0x0004 | ||
#define ATT_SERVICE_GATT_SERVICE_01_END_HANDLE 0x0006 | ||
#define ATT_SERVICE_0000FF10_0000_1000_8000_00805F9B34FB_START_HANDLE 0x0007 | ||
#define ATT_SERVICE_0000FF10_0000_1000_8000_00805F9B34FB_END_HANDLE 0x000d | ||
#define ATT_SERVICE_0000FF10_0000_1000_8000_00805F9B34FB_01_START_HANDLE 0x0007 | ||
#define ATT_SERVICE_0000FF10_0000_1000_8000_00805F9B34FB_01_END_HANDLE 0x000d | ||
|
||
// | ||
// list mapping between characteristics and handles | ||
// | ||
#define ATT_CHARACTERISTIC_GAP_DEVICE_NAME_01_VALUE_HANDLE 0x0003 | ||
#define ATT_CHARACTERISTIC_GATT_DATABASE_HASH_01_VALUE_HANDLE 0x0006 | ||
#define ATT_CHARACTERISTIC_0000FF11_0000_1000_8000_00805F9B34FB_01_VALUE_HANDLE 0x0009 | ||
#define ATT_CHARACTERISTIC_0000FF11_0000_1000_8000_00805F9B34FB_01_CLIENT_CONFIGURATION_HANDLE 0x000a | ||
#define ATT_CHARACTERISTIC_0000FF12_0000_1000_8000_00805F9B34FB_01_VALUE_HANDLE 0x000c | ||
#define ATT_CHARACTERISTIC_0000FF12_0000_1000_8000_00805F9B34FB_01_CLIENT_CONFIGURATION_HANDLE 0x000d |