| Airoha M0 BLE API 1.0.5.4

ble_gatt_client.h
1 /******************************************************************************
2 Copyright (c) Airoha 2016 - All rights reserved
3
4 FILE NAME
5 ble_gatt_client.h
6 DESCRIPTION
7 NOTES
8 ********************************************************************************/
9 #ifndef _BLE_GATT_CLIENT_H_
10 #define _BLE_GATT_CLIENT_H_
11
20 #include <stdint.h>
21 #include <stddef.h>
22 #include <stdbool.h>
23 #include "ble_att.h"
24 #include "bt_constants.h"
25
26 #ifdef _MSC_VER
27 __pragma(pack(push, 1))
28 #define __attribute__(x)
29 #endif
30
31
35 typedef struct
36 {
37 uint8_t err_code;
38 } __attribute__((packed)) ble_gatt_evt_err_rsponse_t;
39
43 typedef struct
44 {
45 uint16_t new_mtu;
46 uint16_t conn_handle;
47 } __attribute__((packed)) ble_gatt_evt_mtu_exchange_t;
48
52 typedef struct
53 {
54 uint8_t num;
55 struct
56 {
57 uint16_t handle_start;
58 uint16_t handle_end;
59 uint8_t uuid_len;
60 uint8_t uuid[16];
61 }__attribute__((packed))service[1];
62 } __attribute__((packed)) ble_gatt_evt_prim_service_discovered_t;
63
67 typedef struct
68 {
69 uint8_t num;
70 uint8_t uuid_len;
71 uint8_t uuid[16];
72 struct
73 {
74 uint16_t handle_start;
75 uint16_t handle_end;
76 }__attribute__((packed))service[1];
77 } __attribute__((packed))ble_gatt_evt_uuid_service_discovered_t;
78
82 typedef struct
83 {
84 uint8_t num;
85 struct
86 {
87 uint16_t handle;
88 uint16_t service_start;
89 uint16_t service_end;
90 uint8_t service_uuid_len;
91 uint8_t service_uuid[16];
92 }__attribute__((packed))include[1];
93 } __attribute__((packed))ble_gatt_evt_included_service_found_t;
94
98 typedef struct
99 {
100 uint8_t num;
101 struct
102 {
103 uint16_t declaration_handle;
104 uint16_t value_handle;
105 uint8_t property;
106 uint8_t uuid_len;
107 uint8_t uuid[16];
108 }__attribute__((packed))charact[1];
109 } __attribute__((packed))ble_gatt_evt_service_char_discovered_t;
110
114 typedef struct
115 {
116 uint8_t num;
117 uint8_t uuid_len;
118 uint8_t uuid[16];
119 struct
120 {
121 uint16_t declaration_handle;
122 uint16_t value_handle;
123 uint8_t property;
124 }__attribute__((packed))charact[1];
125 } __attribute__((packed))ble_gatt_evt_uuid_char_discovered_t;
126
130 typedef struct
131 {
132 uint8_t num;
133 struct
134 {
135 uint16_t handle;
136 uint8_t uuid_len;
137 uint8_t uuid[16];
138 }__attribute__((packed))descrip[1];
139 } __attribute__((packed))ble_gatt_evt_char_descrip_discovered_t;
140
144 typedef struct
145 {
146 uint16_t handle;
147 uint16_t len;
148 uint8_t value[1];
149 } __attribute__((packed))ble_gatt_evt_char_value_read_t;
150
154 typedef struct
155 {
156 uint8_t num;
157 uint8_t uuid_len;
158 uint8_t uuid[16];
159 struct
160 {
161 uint16_t handle;
162 uint8_t len;
163 uint8_t value[19];
164 }__attribute__((packed))charact[1];
165 } __attribute__((packed))ble_gatt_evt_uuid_char_read_t;
166
170 typedef struct
171 {
172 uint16_t handle;
173 uint16_t len;
174 uint8_t value[1];
175 } __attribute__((packed))ble_gatt_evt_long_char_read_t;
176
180 typedef struct
181 {
182 uint8_t num;
183 uint16_t handle[5];
184 uint16_t len;
185 uint8_t value[1];
186 } __attribute__((packed))ble_gatt_evt_multi_char_read_t;
187
191 typedef struct
192 {
193 uint16_t handle;
194 } __attribute__((packed))ble_gatt_evt_char_value_written_t;
195
199 typedef struct
200 {
201 uint16_t handle;
202 uint16_t len;
203 } __attribute__((packed))ble_gatt_evt_long_char_written_t;
204
208 typedef struct
209 {
210 uint8_t is_cancelled;
211 uint8_t num;
212 } __attribute__((packed))ble_gatt_evt_reliable_write_finished_t;
213
217 typedef struct
218 {
219 uint16_t handle;
220 uint16_t len;
221 uint8_t value[1];
222 } __attribute__((packed))ble_gatt_evt_char_descrip_read_t;
223
227 typedef struct
228 {
229 uint16_t handle;
230 uint16_t len;
231 uint8_t value[1];
232 } __attribute__((packed))ble_gatt_evt_long_descrip_read_t;
233
237 typedef struct
238 {
239 uint16_t handle;
240 } __attribute__((packed))ble_gatt_evt_char_descrip_written_t;
241
245 typedef struct
246 {
247 uint16_t handle;
248 uint16_t len;
249 } __attribute__((packed))ble_gatt_evt_long_descrip_written_t;
250
254 typedef struct
255 {
256 uint16_t conn_handle;
257 uint16_t handle;
258 uint16_t len;
259 uint8_t value[1];
260 } __attribute__((packed))ble_gatt_evt_handle_value_reported_t;
261
262
263
267 typedef struct
268 {
269 union
270 {
271 ble_gatt_evt_err_rsponse_t err_response;
272 ble_gatt_evt_mtu_exchange_t mtu_exchanged;
273 ble_gatt_evt_prim_service_discovered_t prim_service_discovered;
274 ble_gatt_evt_uuid_service_discovered_t uuid_service_discovered;
275 ble_gatt_evt_included_service_found_t included_service_found;
276 ble_gatt_evt_service_char_discovered_t service_char_discovered;
277 ble_gatt_evt_uuid_char_discovered_t uuid_char_discovered;
278 ble_gatt_evt_char_descrip_discovered_t char_descrip_discovered;
279 ble_gatt_evt_char_value_read_t char_value_read;
280 ble_gatt_evt_uuid_char_read_t uuid_char_read;
281 ble_gatt_evt_long_char_read_t long_char_read;
282 ble_gatt_evt_multi_char_read_t multi_char_read;
283 ble_gatt_evt_char_value_written_t char_value_written;
284 ble_gatt_evt_long_char_written_t long_char_written;
285 ble_gatt_evt_reliable_write_finished_t reliable_write_finished;
286 ble_gatt_evt_char_descrip_read_t char_descrip_read;
287 ble_gatt_evt_long_descrip_read_t long_descrip_read;
288 ble_gatt_evt_char_descrip_written_t char_descrip_written;
289 ble_gatt_evt_long_descrip_written_t long_descrip_written;
290 ble_gatt_evt_handle_value_reported_t handle_value_reported;
291 } __attribute__((packed)) gatt;
292 } __attribute__((packed)) ble_gatt_evt_t;
293
294 #ifdef _MSC_VER
295 __pragma(pack(pop))
296 #undef __attribute__
297 #endif
298
302 typedef enum
303 {
304 BLE_GATT_EVT_UNEXPECTED_RESPONSE_FROM_SERVER = BT_EVENT_GATT,
305 BLE_GATT_EVT_GET_ERROR_RESPONSE_FROM_SERVER,
306 BLE_GATT_EVT_MTU_EXCHANGED,
307 BLE_GATT_EVT_PRIM_SERVICE_DISCOVERED,
308 BLE_GATT_EVT_UUID_SERVICE_DISCOVERED,
309 BLE_GATT_EVT_INCLUDED_SERVICE_FOUND,
310 BLE_GATT_EVT_SERVICE_CHAR_DISCOVERED,
311 BLE_GATT_EVT_UUID_CHAR_DISCOVERED,
312 BLE_GATT_EVT_CHAR_DESCRIP_DISCOVERED,
313 BLE_GATT_EVT_CHAR_VALUE_READ,
314 BLE_GATT_EVT_UUID_CHAR_READ,
315 BLE_GATT_EVT_LONG_CHAR_READ,
316 BLE_GATT_EVT_MULTI_CHAR_READ,
317 BLE_GATT_EVT_CHAR_VALUE_WRITTEN,
318 BLE_GATT_EVT_LONG_CHAR_WRITTEN,
319 BLE_GATT_EVT_RELIABLE_WRITE_FINISHED,
320 BLE_GATT_EVT_CHAR_DESCRIP_READ,
321 BLE_GATT_EVT_LONG_DESCRIP_READ,
322 BLE_GATT_EVT_CHAR_DESCRIP_WRITTEN,
323 BLE_GATT_EVT_LONG_DESCRIP_WRITTEN,
324 BLE_GATT_EVT_HANDLE_VALUE_REPORTED,
326 }ble_gatt_event_id;
327
331 typedef enum
332 {
333 GATT_SUCCESS,
334 GATT_FAILURE_INVALID_CONNECTION_HANDLE,
335 GATT_FAILURE_INVALID_PARAMETER,
336 GATT_FAILURE_PREVIOUS_PROCEDURE_NOT_ENDED,
337 GATT_FAILURE_TRANSACTION_TIMEOUT,
338 }GATT_STATUS;
339
340 #ifdef _MSC_VER
341 __pragma(pack(push, 1))
342 #define __attribute__(x)
343 #endif
344
345
349 typedef struct
350 {
351 uint16_t conn_handle;
352 uint16_t mtu;
353 } __attribute__((packed)) GATT_4_3_1_PARA;
354
358 typedef struct
359 {
360 uint16_t conn_handle;
361 } __attribute__((packed)) GATT_4_4_1_PARA;
362
366 typedef struct
367 {
368 uint16_t conn_handle;
369 uint8_t uuid_size;
370 uint8_t uuid[16];
371 } __attribute__((packed)) GATT_4_4_2_PARA;
372
376 typedef struct
377 {
378 uint16_t conn_handle;
379 uint16_t start;
380 uint16_t end;
381 } __attribute__((packed)) GATT_4_5_1_PARA;
382
386 typedef struct
387 {
388 uint16_t conn_handle;
389 uint16_t start;
390 uint16_t end;
391 } __attribute__((packed)) GATT_4_6_1_PARA;
392
396 typedef struct
397 {
398 uint16_t conn_handle;
399 uint16_t start;
400 uint16_t end;
401 uint8_t uuid_size;
402 uint8_t uuid[16];
403 } __attribute__((packed)) GATT_4_6_2_PARA;
404
408 typedef struct
409 {
410 uint16_t conn_handle;
411 uint16_t start;
412 uint16_t end;
413 uint8_t max_pair;
414 } __attribute__((packed)) GATT_4_7_1_PARA;
415
419 typedef struct
420 {
421 uint16_t conn_handle;
422 uint16_t att_handle;
423 } __attribute__((packed)) GATT_4_8_1_PARA;
424
428 typedef struct
429 {
430 uint16_t conn_handle;
431 uint16_t start;
432 uint16_t end;
433 uint8_t uuid_size;
434 uint8_t uuid[16];
435 } __attribute__((packed)) GATT_4_8_2_PARA;
436
440 typedef struct
441 {
442 uint16_t conn_handle;
443 uint16_t att_handle;
444 uint16_t offset;
445 } __attribute__((packed)) GATT_4_8_3_PARA;
446
450 typedef struct
451 {
452 uint16_t conn_handle;
453 uint8_t numofhandles;
454 uint16_t att_handle[5];
455 } __attribute__((packed)) GATT_4_8_4_PARA;
456
460 typedef struct
461 {
462 uint16_t conn_handle;
463 uint16_t att_handle;
464 uint16_t len;
465 uint8_t data[1];
466 } __attribute__((packed)) GATT_4_9_1_PARA;
467
471 typedef struct
472 {
473 uint16_t conn_handle;
474 uint16_t att_handle;
475 uint16_t len;
476 uint8_t data[1];
477 } __attribute__((packed)) GATT_4_9_2_PARA;
478
482 typedef struct
483 {
484 uint16_t conn_handle;
485 uint16_t att_handle;
486 uint16_t len;
487 uint8_t data[1];
488 } __attribute__((packed)) GATT_4_9_3_PARA;
489
493 typedef struct
494 {
495 uint16_t conn_handle;
496 uint16_t att_handle;
497 uint16_t len;
498 uint16_t offset;
499 uint8_t data[1];
500 } __attribute__((packed)) GATT_4_9_4_PARA;
501
505 typedef struct
506 {
507 uint16_t conn_handle;
508 uint8_t numofwrite;
509 struct
510 {
511 uint16_t att_handle;
512 uint16_t len;
513 uint16_t offset;
514 uint8_t value[10];
515 }__attribute__((packed)) write[6];
516 } __attribute__((packed)) GATT_4_9_5_PARA;
517
521 typedef struct
522 {
523 uint16_t conn_handle;
524 uint16_t att_handle;
525 } __attribute__((packed)) GATT_4_12_1_PARA;
526
530 typedef struct
531 {
532 uint16_t conn_handle;
533 uint16_t att_handle;
534 uint16_t offset;
535 } __attribute__((packed)) GATT_4_12_2_PARA;
536
540 typedef struct
541 {
542 uint16_t conn_handle;
543 uint16_t att_handle;
544 uint16_t len;
545 uint8_t data[1];
546 } __attribute__((packed)) GATT_4_12_3_PARA;
547
551 typedef struct
552 {
553 uint16_t conn_handle;
554 uint16_t att_handle;
555 uint16_t len;
556 uint16_t offset;
557 uint8_t data[1];
558 } __attribute__((packed)) GATT_4_12_4_PARA;
559
560 #ifdef _MSC_VER
561 __pragma(pack(pop))
562 #undef __attribute__
563 #endif
564
568 typedef union
569 {
570 GATT_4_3_1_PARA p_4_3_1;
571 GATT_4_4_1_PARA p_4_4_1;
572 GATT_4_4_2_PARA p_4_4_2;
573 GATT_4_5_1_PARA p_4_5_1;
574 GATT_4_6_1_PARA p_4_6_1;
575 GATT_4_6_2_PARA p_4_6_2;
576 GATT_4_7_1_PARA p_4_7_1;
577 GATT_4_8_1_PARA p_4_8_1;
578 GATT_4_8_2_PARA p_4_8_2;
579 GATT_4_8_3_PARA p_4_8_3;
580 GATT_4_8_4_PARA p_4_8_4;
581 GATT_4_9_1_PARA p_4_9_1;
582 GATT_4_9_2_PARA p_4_9_2;
583 GATT_4_9_3_PARA p_4_9_3;
584 GATT_4_9_4_PARA p_4_9_4;
585 GATT_4_9_5_PARA p_4_9_5;
586 GATT_4_12_1_PARA p_4_12_1;
587 GATT_4_12_2_PARA p_4_12_2;
588 GATT_4_12_3_PARA p_4_12_3;
589 GATT_4_12_4_PARA p_4_12_4;
590 }GATT_PROC_PARA_UNION;
591
592
599 GATT_STATUS ble_gatt_4_3_1_exchange_mtu(GATT_4_3_1_PARA * para);
600
607 GATT_STATUS ble_gatt_4_4_1_disc_all_primary_services(GATT_4_4_1_PARA * para);
608
615 GATT_STATUS ble_gatt_4_4_2_disc_primary_service_by_UUID(GATT_4_4_2_PARA * para);
616
623 GATT_STATUS ble_gatt_4_5_1_find_included_services(GATT_4_5_1_PARA * para);
624
631 GATT_STATUS ble_gatt_4_6_1_disc_all_chars(GATT_4_6_1_PARA * para);
632
639 GATT_STATUS ble_gatt_4_6_2_disc_chars_by_UUID(GATT_4_6_2_PARA * para);
640
647 GATT_STATUS ble_gatt_4_7_1_disc_all_char_descs(GATT_4_7_1_PARA * para);
648
655 GATT_STATUS ble_gatt_4_8_1_read_char_value(GATT_4_8_1_PARA * para);
656
663 GATT_STATUS ble_gatt_4_8_2_read_using_char_UUID(GATT_4_8_2_PARA * para);
664
671 GATT_STATUS ble_gatt_4_8_3_read_long_char_value(GATT_4_8_3_PARA * para);
672
679 GATT_STATUS ble_gatt_4_8_4_read_multi_char_values(GATT_4_8_4_PARA * para);
680
687 GATT_STATUS ble_gatt_4_9_1_write_no_rsp(GATT_4_9_1_PARA * para);
688
695 GATT_STATUS ble_gatt_4_9_2_signed_write_no_rsp(GATT_4_9_2_PARA * para);
696
703 GATT_STATUS ble_gatt_4_9_3_write_char_value(GATT_4_9_3_PARA * para);
704
711 GATT_STATUS ble_gatt_4_9_4_write_long_char_value(GATT_4_9_4_PARA * para);
712
719 GATT_STATUS ble_gatt_4_9_5_reliable_writes(GATT_4_9_5_PARA * para);
720
727 GATT_STATUS ble_gatt_4_12_1_read_char_desc(GATT_4_12_1_PARA * para);
728
735 GATT_STATUS ble_gatt_4_12_2_read_long_char_desc(GATT_4_12_2_PARA * para);
736
743 GATT_STATUS ble_gatt_4_12_3_write_char_desc(GATT_4_12_3_PARA * para);
744
751 GATT_STATUS ble_gatt_4_12_4_write_long_char_desc(GATT_4_12_4_PARA * para);
752
753
757 #endif
ble_gatt_evt_t::char_descrip_written
ble_gatt_evt_char_descrip_written_t char_descrip_written
parameter of gatt event BLE_GATT_EVT_CHAR_DESCRIP_WRITTEN
Definition: ble_gatt_client.h:288
GATT_4_9_4_PARA::att_handle
uint16_t att_handle
attribute handle to be written
Definition: ble_gatt_client.h:496
GATT_4_4_2_PARA
GATT Client API parameter for ble_gatt_4_4_2_disc_primary_service_by_UUID.
Definition: ble_gatt_client.h:366
GATT_4_12_2_PARA
GATT Client API parameter for ble_gatt_4_12_2_read_long_char_desc.
Definition: ble_gatt_client.h:530
ble_gatt_evt_long_descrip_written_t
Event parameter of gatt event BLE_GATT_EVT_LONG_DESCRIP_WRITTEN.
Definition: ble_gatt_client.h:245
ble_gatt_evt_long_descrip_read_t
Event parameter of gatt event BLE_GATT_EVT_LONG_DESCRIP_READ.
Definition: ble_gatt_client.h:227
ble_gatt_evt_uuid_service_discovered_t::uuid_len
uint8_t uuid_len
Definition: ble_gatt_client.h:70
ble_gatt_evt_uuid_service_discovered_t
Event parameter of gatt event BLE_GATT_EVT_UUID_SERVICE_DISCOVERED.
Definition: ble_gatt_client.h:67
ble_gatt_evt_char_descrip_discovered_t::uuid_len
uint8_t uuid_len
Definition: ble_gatt_client.h:136
GATT_4_5_1_PARA::start
uint16_t start
first attribute handle of discovering range
Definition: ble_gatt_client.h:379
GATT_4_12_2_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:532
BLE_GATT_EVT_UUID_CHAR_DISCOVERED
Definition: ble_gatt_client.h:311
GATT_4_5_1_PARA
GATT Client API parameter for ble_gatt_4_5_1_find_included_services.
Definition: ble_gatt_client.h:376
ble_gatt_evt_char_descrip_read_t
Event parameter of gatt event BLE_GATT_EVT_CHAR_DESCRIP_READ.
Definition: ble_gatt_client.h:217
ble_gatt_evt_uuid_char_discovered_t::uuid_len
uint8_t uuid_len
Definition: ble_gatt_client.h:117
GATT_4_9_4_PARA::len
uint16_t len
length of attribute data
Definition: ble_gatt_client.h:497
GATT_4_9_5_PARA::att_handle
uint16_t att_handle
attribute handle to be written
Definition: ble_gatt_client.h:511
GATT_4_12_2_PARA::att_handle
uint16_t att_handle
attribute handle to be read
Definition: ble_gatt_client.h:533
ble_gatt_evt_multi_char_read_t
Event parameter of gatt event BLE_GATT_EVT_MULTI_CHAR_READ.
Definition: ble_gatt_client.h:180
ble_gatt_evt_t::mtu_exchanged
ble_gatt_evt_mtu_exchange_t mtu_exchanged
parameter of gatt event BLE_GATT_EVT_MTU_EXCHANGED
Definition: ble_gatt_client.h:272
GATT_4_12_3_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:542
GATT_4_8_1_PARA::att_handle
uint16_t att_handle
attribute handle to be read
Definition: ble_gatt_client.h:422
ble_gatt_evt_t::included_service_found
ble_gatt_evt_included_service_found_t included_service_found
parameter of gatt event BLE_GATT_EVT_INCLUDED_SERVICE_FOUND
Definition: ble_gatt_client.h:275
ble_gatt_evt_err_rsponse_t
Event parameter of gatt event BLE_GATT_EVT_GET_ERROR_RESPONSE_FROM_SERVER.
Definition: ble_gatt_client.h:35
GATT_4_5_1_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:378
GATT_4_8_2_PARA::end
uint16_t end
last handle of reading range
Definition: ble_gatt_client.h:432
ble_gatt_evt_handle_value_reported_t::len
uint16_t len
Definition: ble_gatt_client.h:258
ble_gatt_evt_long_char_written_t
Event parameter of gatt event BLE_GATT_EVT_LONG_CHAR_WRITTEN.
Definition: ble_gatt_client.h:199
ble_gatt_evt_mtu_exchange_t
Event parameter of gatt event BLE_GATT_EVT_MTU_EXCHANGED.
Definition: ble_gatt_client.h:43
ble_gatt_4_9_5_reliable_writes
GATT_STATUS ble_gatt_4_9_5_reliable_writes(GATT_4_9_5_PARA *para)
API for starting GATT procedure: Characteristic Value Reliable Writes. This API would invoke gatt ev...
ble_gatt_evt_multi_char_read_t::len
uint16_t len
Definition: ble_gatt_client.h:184
GATT_4_9_4_PARA::offset
uint16_t offset
offset of attribute data
Definition: ble_gatt_client.h:498
GATT_4_4_2_PARA::uuid_size
uint8_t uuid_size
size of uuid
Definition: ble_gatt_client.h:369
ble_gatt_evt_char_value_written_t
Event parameter of gatt event BLE_GATT_EVT_CHAR_VALUE_WRITTEN.
Definition: ble_gatt_client.h:191
att_handle
uint16_t att_handle
attribute handle.
Definition: ble_att.h:52
GATT_4_7_1_PARA
GATT Client API parameter for ble_gatt_4_7_1_disc_all_char_descs.
Definition: ble_gatt_client.h:408
GATT_4_9_1_PARA::len
uint16_t len
length of attribute data
Definition: ble_gatt_client.h:464
GATT_4_8_4_PARA
GATT Client API parameter for ble_gatt_4_8_4_read_multi_char_values.
Definition: ble_gatt_client.h:450
BLE_GATT_EVT_MTU_EXCHANGED
Definition: ble_gatt_client.h:306
ble_gatt_evt_char_value_read_t
Event parameter of gatt event BLE_GATT_EVT_CHAR_VALUE_READ.
Definition: ble_gatt_client.h:144
ble_gatt_4_9_3_write_char_value
GATT_STATUS ble_gatt_4_9_3_write_char_value(GATT_4_9_3_PARA *para)
API for starting GATT procedure: Write Characteristic Value. This API would invoke gatt event BLE_GA...
ble_gatt_evt_included_service_found_t
Event parameter of gatt event BLE_GATT_EVT_INCLUDED_SERVICE_FOUND.
Definition: ble_gatt_client.h:82
BLE_GATT_EVT_UNEXPECTED_RESPONSE_FROM_SERVER
Definition: ble_gatt_client.h:304
GATT_4_4_1_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:360
GATT_4_8_1_PARA
GATT Client API parameter for ble_gatt_4_8_1_read_char_value.
Definition: ble_gatt_client.h:419
GATT_4_9_4_PARA
GATT Client API parameter for ble_gatt_4_9_4_write_long_char_value.
Definition: ble_gatt_client.h:493
ble_gatt_evt_t::uuid_char_read
ble_gatt_evt_uuid_char_read_t uuid_char_read
parameter of gatt event BLE_GATT_EVT_UUID_CHAR_READ
Definition: ble_gatt_client.h:280
ble_gatt_evt_char_descrip_written_t
Event parameter of gatt event BLE_GATT_EVT_CHAR_DESCRIP_WRITTEN.
Definition: ble_gatt_client.h:237
ble_gatt_evt_prim_service_discovered_t::uuid_len
uint8_t uuid_len
Definition: ble_gatt_client.h:59
GATT_4_12_3_PARA::len
uint16_t len
length of attribute data
Definition: ble_gatt_client.h:544
ble_gatt_evt_long_char_read_t
Event parameter of gatt event BLE_GATT_EVT_LONG_CHAR_READ.
Definition: ble_gatt_client.h:170
GATT_4_9_5_PARA::len
uint16_t len
length of attribute data (10 bytes at most)
Definition: ble_gatt_client.h:512
BLE_GATT_EVT_GET_ERROR_RESPONSE_FROM_SERVER
Definition: ble_gatt_client.h:305
GATT_4_6_2_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:398
BT_EVENT_GATT
GATT event.
Definition: bt_constants.h:45
ble_gatt_4_6_2_disc_chars_by_UUID
GATT_STATUS ble_gatt_4_6_2_disc_chars_by_UUID(GATT_4_6_2_PARA *para)
API for starting GATT procedure: Discover Characteristics by UUID. This API would invoke gatt event ...
GATT_4_9_1_PARA
GATT Client API parameter for ble_gatt_4_9_1_write_no_rsp.
Definition: ble_gatt_client.h:460
ble_gatt_4_6_1_disc_all_chars
GATT_STATUS ble_gatt_4_6_1_disc_all_chars(GATT_4_6_1_PARA *para)
API for starting GATT procedure: Discover All Characteristic of A Service. This API would invoke gat...
BLE_GATT_EVT_SERVICE_CHAR_DISCOVERED
Definition: ble_gatt_client.h:310
ble_gatt_evt_service_char_discovered_t::property
uint8_t property
Definition: ble_gatt_client.h:105
ble_gatt_4_4_2_disc_primary_service_by_UUID
GATT_STATUS ble_gatt_4_4_2_disc_primary_service_by_UUID(GATT_4_4_2_PARA *para)
API for starting GATT procedure: Discover Primary Services By Service UUID. This API would invoke ga...
ble_gatt_evt_long_char_written_t::len
uint16_t len
Definition: ble_gatt_client.h:202
ble_gatt_evt_t::multi_char_read
ble_gatt_evt_multi_char_read_t multi_char_read
parameter of gatt event BLE_GATT_EVT_MULTI_CHAR_READ
Definition: ble_gatt_client.h:282
GATT_4_3_1_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:351
BLE_GATT_EVT_LONG_DESCRIP_WRITTEN
Definition: ble_gatt_client.h:323
GATT_4_9_4_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:495
GATT_4_8_2_PARA::start
uint16_t start
first handle of reading range
Definition: ble_gatt_client.h:431
GATT_4_8_3_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:442
GATT_4_12_4_PARA::att_handle
uint16_t att_handle
attribute handle to be written
Definition: ble_gatt_client.h:554
ble_gatt_4_9_4_write_long_char_value
GATT_STATUS ble_gatt_4_9_4_write_long_char_value(GATT_4_9_4_PARA *para)
API for starting GATT procedure: Write Long Characteristic Values. This API would invoke gatt event ...
ble_gatt_4_5_1_find_included_services
GATT_STATUS ble_gatt_4_5_1_find_included_services(GATT_4_5_1_PARA *para)
API for starting GATT procedure: Find Included Services. This API would invoke gatt event BLE_GATT_E...
BLE_GATT_EVT_CHAR_VALUE_WRITTEN
Definition: ble_gatt_client.h:317
ble_gatt_evt_uuid_service_discovered_t::handle_end
uint16_t handle_end
Definition: ble_gatt_client.h:75
ble_gatt_evt_t::char_descrip_read
ble_gatt_evt_char_descrip_read_t char_descrip_read
parameter of gatt event BLE_GATT_EVT_CHAR_DESCRIP_READ
Definition: ble_gatt_client.h:286
GATT_4_9_5_PARA::offset
uint16_t offset
offset of attribute data
Definition: ble_gatt_client.h:513
ble_gatt_evt_t::uuid_char_discovered
ble_gatt_evt_uuid_char_discovered_t uuid_char_discovered
parameter of gatt event BLE_GATT_EVT_UUID_CHAR_DISCOVERED
Definition: ble_gatt_client.h:277
GATT_4_6_2_PARA::start
uint16_t start
first attribute handle of discovering range
Definition: ble_gatt_client.h:399
GATT_4_9_3_PARA::att_handle
uint16_t att_handle
attribute handle to be written
Definition: ble_gatt_client.h:485
BLE_GATT_EVT_UUID_CHAR_READ
Definition: ble_gatt_client.h:314
GATT_4_7_1_PARA::max_pair
uint8_t max_pair
maximum number of attributes in returned event (10-20 is recommended)
Definition: ble_gatt_client.h:413
GATT_4_8_3_PARA
GATT Client API parameter for ble_gatt_4_8_3_read_long_char_value.
Definition: ble_gatt_client.h:440
GATT_4_12_3_PARA::att_handle
uint16_t att_handle
attribute handle to be written
Definition: ble_gatt_client.h:543
GATT_4_9_3_PARA::len
uint16_t len
length of attribute data
Definition: ble_gatt_client.h:486
GATT_4_9_3_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:484
BLE_GATT_EVT_INCLUDED_SERVICE_FOUND
Definition: ble_gatt_client.h:309
BLE_GATT_EVT_CHAR_VALUE_READ
Definition: ble_gatt_client.h:313
ble_gatt_evt_char_descrip_read_t::len
uint16_t len
Definition: ble_gatt_client.h:220
GATT_4_12_2_PARA::offset
uint16_t offset
offset of attribute data
Definition: ble_gatt_client.h:534
ble_gatt_evt_t::char_descrip_discovered
ble_gatt_evt_char_descrip_discovered_t char_descrip_discovered
parameter of gatt event BLE_GATT_EVT_CHAR_DESCRIP_DISCOVERED
Definition: ble_gatt_client.h:278
ble_gatt_evt_mtu_exchange_t::conn_handle
uint16_t conn_handle
Definition: ble_gatt_client.h:46
GATT_4_8_2_PARA
GATT Client API parameter for ble_gatt_4_8_2_read_using_char_UUID.
Definition: ble_gatt_client.h:428
BLE_GATT_EVT_CHAR_DESCRIP_READ
Definition: ble_gatt_client.h:320
GATT_4_9_3_PARA
GATT Client API parameter for ble_gatt_4_9_3_write_char_value.
Definition: ble_gatt_client.h:482
GATT_4_12_1_PARA
GATT Client API parameter for ble_gatt_4_12_1_read_char_desc.
Definition: ble_gatt_client.h:521
ble_gatt_evt_reliable_write_finished_t::num
uint8_t num
Definition: ble_gatt_client.h:211
ble_gatt_evt_t::handle_value_reported
ble_gatt_evt_handle_value_reported_t handle_value_reported
parameter of gatt event BLE_GATT_EVT_HANDLE_VALUE_REPORTED
Definition: ble_gatt_client.h:290
GATT_4_8_4_PARA::numofhandles
uint8_t numofhandles
number of handles to be read
Definition: ble_gatt_client.h:453
ble_gatt_evt_handle_value_reported_t
Event parameter of gatt event BLE_GATT_EVT_HANDLE_VALUE_REPORTED.
Definition: ble_gatt_client.h:254
GATT_SUCCESS
Definition: ble_gatt_client.h:333
GATT_4_12_1_PARA::att_handle
uint16_t att_handle
attribute handle to be read
Definition: ble_gatt_client.h:524
ble_gatt_evt_long_descrip_written_t::len
uint16_t len
Definition: ble_gatt_client.h:248
GATT_4_9_2_PARA
GATT Client API parameter for ble_gatt_4_9_2_signed_write_no_rsp.
Definition: ble_gatt_client.h:471
GATT_4_8_2_PARA::uuid_size
uint8_t uuid_size
size of uuid
Definition: ble_gatt_client.h:433
BLE_GATT_EVT_UUID_SERVICE_DISCOVERED
Definition: ble_gatt_client.h:308
ble_gatt_evt_service_char_discovered_t::uuid_len
uint8_t uuid_len
Definition: ble_gatt_client.h:106
GATT_FAILURE_PREVIOUS_PROCEDURE_NOT_ENDED
Definition: ble_gatt_client.h:336
GATT_4_8_3_PARA::att_handle
uint16_t att_handle
attribute handle to be read
Definition: ble_gatt_client.h:443
GATT_4_6_1_PARA
GATT Client API parameter for ble_gatt_4_6_1_disc_all_chars.
Definition: ble_gatt_client.h:386
GATT_4_7_1_PARA::start
uint16_t start
first attribute handle of discovering range
Definition: ble_gatt_client.h:411
ble_gatt_evt_uuid_char_discovered_t
Event parameter of gatt event BLE_GATT_EVT_UUID_CHAR_DISCOVERED.
Definition: ble_gatt_client.h:114
ble_gatt_evt_uuid_char_read_t::uuid_len
uint8_t uuid_len
Definition: ble_gatt_client.h:157
ble_gatt_evt_t::prim_service_discovered
ble_gatt_evt_prim_service_discovered_t prim_service_discovered
parameter of gatt event BLE_GATT_EVT_PRIM_SERVICE_DISCOVERED
Definition: ble_gatt_client.h:273
ble_gatt_evt_t::long_char_read
ble_gatt_evt_long_char_read_t long_char_read
parameter of gatt event BLE_GATT_EVT_LONG_CHAR_READ
Definition: ble_gatt_client.h:281
GATT_4_8_1_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:421
ble_gatt_evt_prim_service_discovered_t
Event parameter of gatt event BLE_GATT_EVT_PRIM_SERVICE_DISCOVERED.
Definition: ble_gatt_client.h:52
BLE_GATT_EVT_MULTI_CHAR_READ
Definition: ble_gatt_client.h:316
BLE_GATT_EVT_PRIM_SERVICE_DISCOVERED
Definition: ble_gatt_client.h:307
GATT_4_12_4_PARA::len
uint16_t len
length of attribute data
Definition: ble_gatt_client.h:555
GATT_4_12_4_PARA
GATT Client API parameter for ble_gatt_4_12_4_write_long_char_desc.
Definition: ble_gatt_client.h:551
GATT_4_7_1_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:410
ble_gatt_4_9_1_write_no_rsp
GATT_STATUS ble_gatt_4_9_1_write_no_rsp(GATT_4_9_1_PARA *para)
API for starting GATT procedure: Write Without Response. This API would not invoke gatt event...
GATT_4_6_1_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:388
BLE_GATT_EVT_LONG_CHAR_WRITTEN
Definition: ble_gatt_client.h:318
ble_gatt_evt_t::long_char_written
ble_gatt_evt_long_char_written_t long_char_written
parameter of gatt event BLE_GATT_EVT_LONG_CHAR_WRITTEN
Definition: ble_gatt_client.h:284
GATT_4_8_3_PARA::offset
uint16_t offset
attribute value offset
Definition: ble_gatt_client.h:444
ble_gatt_4_7_1_disc_all_char_descs
GATT_STATUS ble_gatt_4_7_1_disc_all_char_descs(GATT_4_7_1_PARA *para)
API for starting GATT procedure: Discover All Characteristic Descriptors. This API would invoke gatt...
GATT_PROC_PARA_UNION
Union of GATT client API parameter.
Definition: ble_gatt_client.h:568
ble_gatt_evt_t
GATT event structure.
Definition: ble_gatt_client.h:267
GATT_4_12_4_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:553
ble_gatt_4_8_4_read_multi_char_values
GATT_STATUS ble_gatt_4_8_4_read_multi_char_values(GATT_4_8_4_PARA *para)
API for starting GATT procedure: Read Multiple Characteristic Values. This API would invoke gatt eve...
ble_gatt_evt_t::char_value_read
ble_gatt_evt_char_value_read_t char_value_read
parameter of gatt event BLE_GATT_EVT_CHAR_VALUE_READ
Definition: ble_gatt_client.h:279
ble_gatt_evt_included_service_found_t::service_uuid_len
uint8_t service_uuid_len
Definition: ble_gatt_client.h:90
GATT_4_9_5_PARA
GATT Client API parameter for ble_gatt_4_9_5_reliable_writes.
Definition: ble_gatt_client.h:505
ble_gatt_4_12_2_read_long_char_desc
GATT_STATUS ble_gatt_4_12_2_read_long_char_desc(GATT_4_12_2_PARA *para)
API for starting GATT procedure: Read Long Characteristic Descriptors. This API would invoke gatt ev...
GATT_4_3_1_PARA::mtu
uint16_t mtu
desired mtu size to be negotiated (only 23~200 is supported)
Definition: ble_gatt_client.h:352
ble_gatt_evt_t::reliable_write_finished
ble_gatt_evt_reliable_write_finished_t reliable_write_finished
parameter of gatt event BLE_GATT_EVT_RELIABLE_WRITE_FINISHED
Definition: ble_gatt_client.h:285
ble_gatt_4_12_1_read_char_desc
GATT_STATUS ble_gatt_4_12_1_read_char_desc(GATT_4_12_1_PARA *para)
API for starting GATT procedure: Read Characteristic Descriptors. This API would invoke gatt event B...
GATT_4_9_2_PARA::att_handle
uint16_t att_handle
attribute handle to be written
Definition: ble_gatt_client.h:474
ble_gatt_evt_handle_value_reported_t::handle
uint16_t handle
Definition: ble_gatt_client.h:257
GATT_4_4_2_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:368
ble_gatt_evt_char_descrip_discovered_t
Event parameter of gatt event BLE_GATT_EVT_CHAR_DESCRIP_DISCOVERED.
Definition: ble_gatt_client.h:130
ble_gatt_evt_t::service_char_discovered
ble_gatt_evt_service_char_discovered_t service_char_discovered
parameter of gatt event BLE_GATT_EVT_SERVICE_CHAR_DISCOVERED
Definition: ble_gatt_client.h:276
ble_gatt_4_4_1_disc_all_primary_services
GATT_STATUS ble_gatt_4_4_1_disc_all_primary_services(GATT_4_4_1_PARA *para)
API for starting GATT procedure: Discover All Primary Services. This API would invoke gatt event BLE...
GATT_4_9_2_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:473
ble_gatt_evt_uuid_char_discovered_t::value_handle
uint16_t value_handle
Definition: ble_gatt_client.h:122
BLE_GATT_EVT_LONG_CHAR_READ
Definition: ble_gatt_client.h:315
ble_gatt_4_9_2_signed_write_no_rsp
GATT_STATUS ble_gatt_4_9_2_signed_write_no_rsp(GATT_4_9_2_PARA *para)
API for starting GATT procedure: Signed Write Without Response. This API would not invoke gatt event...
ble_gatt_evt_reliable_write_finished_t
Event parameter of gatt event BLE_GATT_EVT_RELIABLE_WRITE_FINISHED.
Definition: ble_gatt_client.h:208
GATT_4_6_2_PARA
GATT Client API parameter for ble_gatt_4_6_2_disc_chars_by_UUID.
Definition: ble_gatt_client.h:396
ble_gatt_evt_long_descrip_read_t::len
uint16_t len
Definition: ble_gatt_client.h:230
GATT_4_9_1_PARA::att_handle
uint16_t att_handle
attribute handle to be written
Definition: ble_gatt_client.h:463
BLE_GATT_EVT_CHAR_DESCRIP_DISCOVERED
Definition: ble_gatt_client.h:312
ble_gatt_4_12_3_write_char_desc
GATT_STATUS ble_gatt_4_12_3_write_char_desc(GATT_4_12_3_PARA *para)
API for starting GATT procedure: Write Characteristic Descriptors. This API would invoke gatt event ...
GATT_4_6_2_PARA::uuid_size
uint8_t uuid_size
size of uuid
Definition: ble_gatt_client.h:401
GATT_4_5_1_PARA::end
uint16_t end
last attribute handle of discovering range
Definition: ble_gatt_client.h:380
BLE_GATT_EVT_HANDLE_VALUE_REPORTED
Definition: ble_gatt_client.h:324
ble_gatt_evt_uuid_char_read_t
Event parameter of gatt event BLE_GATT_EVT_UUID_CHAR_READ.
Definition: ble_gatt_client.h:154
ble_gatt_4_8_3_read_long_char_value
GATT_STATUS ble_gatt_4_8_3_read_long_char_value(GATT_4_8_3_PARA *para)
API for starting GATT procedure: Read Long Characteristic Values. This API would invoke gatt event B...
ble_gatt_evt_uuid_char_discovered_t::property
uint8_t property
Definition: ble_gatt_client.h:123
ble_gatt_evt_uuid_char_read_t::len
uint8_t len
Definition: ble_gatt_client.h:162
ble_gatt_evt_included_service_found_t::service_start
uint16_t service_start
Definition: ble_gatt_client.h:88
ble_gatt_evt_char_value_read_t::len
uint16_t len
Definition: ble_gatt_client.h:147
GATT_4_4_1_PARA
GATT Client API parameter for ble_gatt_4_4_1_disc_all_primary_services.
Definition: ble_gatt_client.h:358
ble_gatt_evt_long_char_read_t::len
uint16_t len
Definition: ble_gatt_client.h:173
GATT_4_12_1_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:523
ble_gatt_4_3_1_exchange_mtu
GATT_STATUS ble_gatt_4_3_1_exchange_mtu(GATT_4_3_1_PARA *para)
API for starting GATT procedure: Exchange MTU. This API would invoke gatt event BLE_GATT_EVT_MTU_EXC...
GATT_FAILURE_TRANSACTION_TIMEOUT
Definition: ble_gatt_client.h:337
ble_gatt_evt_prim_service_discovered_t::handle_end
uint16_t handle_end
Definition: ble_gatt_client.h:58
GATT_4_9_2_PARA::len
uint16_t len
length of attribute data
Definition: ble_gatt_client.h:475
GATT_FAILURE_INVALID_CONNECTION_HANDLE
Definition: ble_gatt_client.h:334
GATT_4_6_1_PARA::end
uint16_t end
last attribute handle of discovering range
Definition: ble_gatt_client.h:390
ble_gatt_evt_t::long_descrip_read
ble_gatt_evt_long_descrip_read_t long_descrip_read
parameter of gatt event BLE_GATT_EVT_LONG_DESCRIP_READ
Definition: ble_gatt_client.h:287
GATT_4_6_2_PARA::end
uint16_t end
last attribute handle of discovering range
Definition: ble_gatt_client.h:400
ble_gatt_4_12_4_write_long_char_desc
GATT_STATUS ble_gatt_4_12_4_write_long_char_desc(GATT_4_12_4_PARA *para)
API for starting GATT procedure: Write Long Characteristic Descriptors. This API would invoke gatt e...
GATT_4_8_4_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:452
ble_gatt_4_8_2_read_using_char_UUID
GATT_STATUS ble_gatt_4_8_2_read_using_char_UUID(GATT_4_8_2_PARA *para)
API for starting GATT procedure: Read Using Characteristic UUID. This API would invoke gatt event BL...
BLE_GATT_EVT_CHAR_DESCRIP_WRITTEN
Definition: ble_gatt_client.h:322
ble_gatt_evt_t::uuid_service_discovered
ble_gatt_evt_uuid_service_discovered_t uuid_service_discovered
parameter of gatt event BLE_GATT_EVT_UUID_SERVICE_DISCOVERED
Definition: ble_gatt_client.h:274
GATT_FAILURE_INVALID_PARAMETER
Definition: ble_gatt_client.h:335
ble_gatt_evt_t::char_value_written
ble_gatt_evt_char_value_written_t char_value_written
parameter of gatt event BLE_GATT_EVT_CHAR_VALUE_WRITTEN
Definition: ble_gatt_client.h:283
GATT_4_6_1_PARA::start
uint16_t start
first attribute handle of discovering range
Definition: ble_gatt_client.h:389
ble_gatt_evt_t::err_response
ble_gatt_evt_err_rsponse_t err_response
parameter of gatt event BLE_GATT_EVT_GET_ERROR_RESPONSE_FROM_SERVER
Definition: ble_gatt_client.h:271
GATT_STATUS
GATT_STATUS
GATT Client API status.
Definition: ble_gatt_client.h:331
ble_gatt_evt_service_char_discovered_t::value_handle
uint16_t value_handle
Definition: ble_gatt_client.h:104
GATT_4_12_4_PARA::offset
uint16_t offset
offset of attribute data
Definition: ble_gatt_client.h:556
GATT_4_9_1_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:462
BLE_GATT_EVT_RELIABLE_WRITE_FINISHED
Definition: ble_gatt_client.h:319
BLE_GATT_EVT_LONG_DESCRIP_READ
Definition: ble_gatt_client.h:321
GATT_4_3_1_PARA
GATT Client API parameter for ble_gatt_4_3_1_exchange_mtu.
Definition: ble_gatt_client.h:349
GATT_4_9_5_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:507
GATT_4_7_1_PARA::end
uint16_t end
last attribute handle of discovering range
Definition: ble_gatt_client.h:412
ble_gatt_evt_included_service_found_t::service_end
uint16_t service_end
Definition: ble_gatt_client.h:89
ble_gatt_evt_service_char_discovered_t
Event parameter of gatt event BLE_GATT_EVT_SERVICE_CHAR_DISCOVERED.
Definition: ble_gatt_client.h:98
GATT_4_12_3_PARA
GATT Client API parameter for ble_gatt_4_12_3_write_char_desc.
Definition: ble_gatt_client.h:540
ble_gatt_event_id
ble_gatt_event_id
GATT Event ID enumeration.
Definition: ble_gatt_client.h:302
ble_gatt_evt_t::long_descrip_written
ble_gatt_evt_long_descrip_written_t long_descrip_written
parameter of gatt event BLE_GATT_EVT_LONG_DESCRIP_WRITTEN
Definition: ble_gatt_client.h:289
ble_gatt_4_8_1_read_char_value
GATT_STATUS ble_gatt_4_8_1_read_char_value(GATT_4_8_1_PARA *para)
API for starting GATT procedure: Read Characteristic Value. This API would invoke gatt event BLE_GAT...
GATT_4_8_2_PARA::conn_handle
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:430