-
Notifications
You must be signed in to change notification settings - Fork 1
/
gatt_db.c
268 lines (247 loc) · 10.7 KB
/
gatt_db.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
// Copyright 2019 Silicon Laboratories, Inc.
//
//
/********************************************************************
* Autogenerated file, do not edit.
*******************************************************************/
#include <stdint.h>
#include "bg_gattdb_def.h"
#ifdef __GNUC__
#define GATT_HEADER(F) F __attribute__ ((section (".gatt_header")))
#define GATT_DATA(F) F __attribute__ ((section (".gatt_data")))
#else
#ifdef __ICCARM__
#define GATT_HEADER(F) _Pragma("location=\".gatt_header\"") F
#define GATT_DATA(F) _Pragma("location=\".gatt_data\"") F
#else
#define GATT_HEADER(F) F
#define GATT_DATA(F) F
#endif
#endif
GATT_DATA(const uint16_t bg_gattdb_data_uuidtable_16_map [])=
{
0x2800,
0x2801,
0x2803,
0x1800,
0x2a00,
0x2a01,
0x180a,
0x2a29,
0x1827,
0x2adb,
0x2adc,
0x1828,
0x2add,
0x2ade,
0x1801,
0x2a05,
0x2b2a,
0x2b29,
0x2902,
};
GATT_DATA(const uint8_t bg_gattdb_data_uuidtable_128_map [])=
{
0xf0, 0x19, 0x21, 0xb4, 0x47, 0x8f, 0xa4, 0xbf, 0xa1, 0x4f, 0x63, 0xfd, 0xee, 0xd6, 0x14, 0x1d,
0x63, 0x60, 0x32, 0xe0, 0x37, 0x5e, 0xa4, 0x88, 0x53, 0x4e, 0x6d, 0xfb, 0x64, 0x35, 0xbf, 0xf7,
};
GATT_DATA(const struct bg_gattdb_attribute_chrvalue bg_gattdb_data_attribute_field_30 ) = {
.properties=0x08,
.index=8,
.max_len=0,
.data=NULL,
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_29 ) = {
.len=19,
.data={0x08,0x1f,0x00,0x63,0x60,0x32,0xe0,0x37,0x5e,0xa4,0x88,0x53,0x4e,0x6d,0xfb,0x64,0x35,0xbf,0xf7,}
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_28 ) = {
.len=16,
.data={0xf0,0x19,0x21,0xb4,0x47,0x8f,0xa4,0xbf,0xa1,0x4f,0x63,0xfd,0xee,0xd6,0x14,0x1d,}
};
GATT_DATA(const struct bg_gattdb_attribute_chrvalue bg_gattdb_data_attribute_field_26 ) = {
.properties=0x10,
.index=7,
.max_len=0,
.data=NULL,
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_25 ) = {
.len=5,
.data={0x10,0x1b,0x00,0xde,0x2a,}
};
GATT_DATA(const struct bg_gattdb_attribute_chrvalue bg_gattdb_data_attribute_field_24 ) = {
.properties=0x04,
.index=6,
.max_len=0,
.data=NULL,
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_23 ) = {
.len=5,
.data={0x04,0x19,0x00,0xdd,0x2a,}
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_22 ) = {
.len=2,
.data={0x28,0x18,}
};
GATT_DATA(const struct bg_gattdb_attribute_chrvalue bg_gattdb_data_attribute_field_20 ) = {
.properties=0x10,
.index=5,
.max_len=0,
.data=NULL,
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_19 ) = {
.len=5,
.data={0x10,0x15,0x00,0xdc,0x2a,}
};
GATT_DATA(const struct bg_gattdb_attribute_chrvalue bg_gattdb_data_attribute_field_18 ) = {
.properties=0x04,
.index=4,
.max_len=0,
.data=NULL,
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_17 ) = {
.len=5,
.data={0x04,0x13,0x00,0xdb,0x2a,}
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_16 ) = {
.len=2,
.data={0x27,0x18,}
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_15 ) = {
.len=12,
.data={0x53,0x69,0x6c,0x69,0x63,0x6f,0x6e,0x20,0x4c,0x61,0x62,0x73,}
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_14 ) = {
.len=5,
.data={0x02,0x10,0x00,0x29,0x2a,}
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_13 ) = {
.len=2,
.data={0x0a,0x18,}
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_12 ) = {
.len=2,
.data={0x40,0x03,}
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_11 ) = {
.len=5,
.data={0x02,0x0d,0x00,0x01,0x2a,}
};
struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_10_data = {
.len=20,
.data={0x42,0x6c,0x75,0x65,0x47,0x65,0x63,0x6b,0x6f,0x20,0x4d,0x65,0x73,0x68,0x20,0x44,0x65,0x6d,0x6f,0x20,}
};
GATT_DATA(const struct bg_gattdb_attribute_chrvalue bg_gattdb_data_attribute_field_10 ) = {
.properties=0x02,
.index=3,
.max_len=20,
.data_varlen=&bg_gattdb_data_attribute_field_10_data,
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_9 ) = {
.len=5,
.data={0x02,0x0b,0x00,0x00,0x2a,}
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_8 ) = {
.len=2,
.data={0x00,0x18,}
};
uint8_t bg_gattdb_data_attribute_field_7_data[1]={0x00,};
GATT_DATA(const struct bg_gattdb_attribute_chrvalue bg_gattdb_data_attribute_field_7 ) = {
.properties=0x0a,
.index=2,
.max_len=1,
.data=bg_gattdb_data_attribute_field_7_data,
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_6 ) = {
.len=5,
.data={0x0a,0x08,0x00,0x29,0x2b,}
};
uint8_t bg_gattdb_data_attribute_field_5_data[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};
GATT_DATA(const struct bg_gattdb_attribute_chrvalue bg_gattdb_data_attribute_field_5 ) = {
.properties=0x02,
.index=1,
.max_len=16,
.data=bg_gattdb_data_attribute_field_5_data,
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_4 ) = {
.len=5,
.data={0x02,0x06,0x00,0x2a,0x2b,}
};
uint8_t bg_gattdb_data_attribute_field_2_data[4]={0x00,0x00,0x00,0x00,};
GATT_DATA(const struct bg_gattdb_attribute_chrvalue bg_gattdb_data_attribute_field_2 ) = {
.properties=0x20,
.index=0,
.max_len=4,
.data=bg_gattdb_data_attribute_field_2_data,
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_1 ) = {
.len=5,
.data={0x20,0x03,0x00,0x05,0x2a,}
};
GATT_DATA(const struct bg_gattdb_buffer_with_len bg_gattdb_data_attribute_field_0 ) = {
.len=2,
.data={0x01,0x18,}
};
GATT_DATA(const struct bg_gattdb_attribute bg_gattdb_data_attributes_map[])={
{.uuid=0x0000,.permissions=0x801,.caps=0x07,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_0},
{.uuid=0x0002,.permissions=0x801,.caps=0x07,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_1},
{.uuid=0x000f,.permissions=0x800,.caps=0x07,.datatype=0x01,.min_key_size=0x00,.dynamicdata=&bg_gattdb_data_attribute_field_2},
{.uuid=0x0012,.permissions=0x807,.caps=0x07,.datatype=0x03,.min_key_size=0x00,.configdata={.flags=0x02,.index=0x00,.clientconfig_index=0x00}},
{.uuid=0x0002,.permissions=0x801,.caps=0x07,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_4},
{.uuid=0x0010,.permissions=0x801,.caps=0x07,.datatype=0x01,.min_key_size=0x00,.dynamicdata=&bg_gattdb_data_attribute_field_5},
{.uuid=0x0002,.permissions=0x801,.caps=0x07,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_6},
{.uuid=0x0011,.permissions=0x803,.caps=0x07,.datatype=0x01,.min_key_size=0x00,.dynamicdata=&bg_gattdb_data_attribute_field_7},
{.uuid=0x0000,.permissions=0x801,.caps=0x04,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_8},
{.uuid=0x0002,.permissions=0x801,.caps=0x04,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_9},
{.uuid=0x0004,.permissions=0x801,.caps=0x04,.datatype=0x02,.min_key_size=0x00,.dynamicdata=&bg_gattdb_data_attribute_field_10},
{.uuid=0x0002,.permissions=0x801,.caps=0x04,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_11},
{.uuid=0x0005,.permissions=0x801,.caps=0x04,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_12},
{.uuid=0x0000,.permissions=0x801,.caps=0x04,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_13},
{.uuid=0x0002,.permissions=0x801,.caps=0x04,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_14},
{.uuid=0x0007,.permissions=0x801,.caps=0x04,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_15},
{.uuid=0x0000,.permissions=0x801,.caps=0x01,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_16},
{.uuid=0x0002,.permissions=0x801,.caps=0x01,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_17},
{.uuid=0x0009,.permissions=0x804,.caps=0x01,.datatype=0x07,.min_key_size=0x00,.dynamicdata=&bg_gattdb_data_attribute_field_18},
{.uuid=0x0002,.permissions=0x801,.caps=0x01,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_19},
{.uuid=0x000a,.permissions=0x800,.caps=0x01,.datatype=0x07,.min_key_size=0x00,.dynamicdata=&bg_gattdb_data_attribute_field_20},
{.uuid=0x0012,.permissions=0x807,.caps=0x01,.datatype=0x03,.min_key_size=0x00,.configdata={.flags=0x01,.index=0x05,.clientconfig_index=0x01}},
{.uuid=0x0000,.permissions=0x801,.caps=0x02,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_22},
{.uuid=0x0002,.permissions=0x801,.caps=0x02,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_23},
{.uuid=0x000c,.permissions=0x804,.caps=0x02,.datatype=0x07,.min_key_size=0x00,.dynamicdata=&bg_gattdb_data_attribute_field_24},
{.uuid=0x0002,.permissions=0x801,.caps=0x02,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_25},
{.uuid=0x000d,.permissions=0x800,.caps=0x02,.datatype=0x07,.min_key_size=0x00,.dynamicdata=&bg_gattdb_data_attribute_field_26},
{.uuid=0x0012,.permissions=0x807,.caps=0x02,.datatype=0x03,.min_key_size=0x00,.configdata={.flags=0x01,.index=0x07,.clientconfig_index=0x02}},
{.uuid=0x0000,.permissions=0x801,.caps=0x04,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_28},
{.uuid=0x0002,.permissions=0x801,.caps=0x04,.datatype=0x00,.min_key_size=0x00,.constdata=&bg_gattdb_data_attribute_field_29},
{.uuid=0x8001,.permissions=0x802,.caps=0x04,.datatype=0x07,.min_key_size=0x00,.dynamicdata=&bg_gattdb_data_attribute_field_30},
};
GATT_DATA(const uint16_t bg_gattdb_data_attributes_dynamic_mapping_map[])={
0x0003,
0x0006,
0x0008,
0x000b,
0x0013,
0x0015,
0x0019,
0x001b,
0x001f,
};
GATT_DATA(const uint8_t bg_gattdb_data_adv_uuid16_map[])={0x0};
GATT_DATA(const uint8_t bg_gattdb_data_adv_uuid128_map[])={0x0};
GATT_HEADER(const struct bg_gattdb_def bg_gattdb_data)={
.attributes=bg_gattdb_data_attributes_map,
.attributes_max=31,
.uuidtable_16_size=19,
.uuidtable_16=bg_gattdb_data_uuidtable_16_map,
.uuidtable_128_size=2,
.uuidtable_128=bg_gattdb_data_uuidtable_128_map,
.attributes_dynamic_max=9,
.attributes_dynamic_mapping=bg_gattdb_data_attributes_dynamic_mapping_map,
.adv_uuid16=bg_gattdb_data_adv_uuid16_map,
.adv_uuid16_num=0,
.adv_uuid128=bg_gattdb_data_adv_uuid128_map,
.adv_uuid128_num=0,
.caps_mask=0x07,
.enabled_caps=0x00,
};
const struct bg_gattdb_def *bg_gattdb=&bg_gattdb_data;