ble_gattc.h
Go to the documentation of this file.
1 /**
2 ****************************************************************************************
3 *
4 * @file ble_gattc.h
5 *
6 * @brief BLE GATTC API
7 *
8 ****************************************************************************************
9 * @attention
10 #####Copyright (c) 2019 GOODIX
11 All rights reserved.
12
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions are met:
15 * Redistributions of source code must retain the above copyright
16 notice, this list of conditions and the following disclaimer.
17 * Redistributions in binary form must reproduce the above copyright
18 notice, this list of conditions and the following disclaimer in the
19 documentation and/or other materials provided with the distribution.
20 * Neither the name of GOODIX nor the names of its contributors may be used
21 to endorse or promote products derived from this software without
22 specific prior written permission.
23
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 POSSIBILITY OF SUCH DAMAGE.
35 *****************************************************************************************
36 */
37
38 /**
39 * @addtogroup BLE
40 * @{
41 */
42
43 /**
44 * @addtogroup BLE_GATT Generic Attribute Profile (GATT)
45 * @{
46 * @brief Definitions and prototypes for the GATT interface.
47 */
48
49 /**
50 @addtogroup BLE_GATTC Generic Attribute Profile (GATT) Client
51 @{
52 @brief Definitions and prototypes for the GATT client interfaces.
53 */
54
55 #ifndef __BLE_GATTC_H__
56 #define __BLE_GATTC_H__
57
58 #include "ble_error.h"
59 #include "ble_gatt.h"
60 #include "ble_att.h"
61 #include "gr55xx_sys_cfg.h"
62
63 #include <stdint.h>
64 #include <stdbool.h>
65
66 /** @addtogroup BLE_GATTC_ENUMERATIONS Enumerations
67 * @{ */
68
69 /**
70 * @brief GATT Client Service type IDs.
71 */
72 typedef enum
73 {
74 BLE_GATTC_PRI_SERV, /**< Primary Service. */
75 BLE_GATTC_SEC_SERV, /**< Secondary Service. */
76 } gatt_serv_type_t;
77
78 /** @} */
79
80
81 /**
82 * @brief GATT Client Service Discover Attribute type IDs.
83 */
84 typedef enum
85 {
86 BLE_GATTC_BROWSE_NONE, /**< No Attribute Information. */
87 BLE_GATTC_BROWSE_INC_SRVC, /**< Included Service information. */
88 BLE_GATTC_BROWSE_ATTR_CHAR, /**< Characteristic Declaration. */
89 BLE_GATTC_BROWSE_ATTR_VAL, /**< Attribute Value definition. */
90 BLE_GATTC_BROWSE_ATTR_DESC, /**< Attribute Descriptor. */
91 } ble_gattc_attr_type_t;
92
93 /** @} */
94
95 /** @addtogroup BLE_GATTC_STRUCTURES Structures
96 * @{ */
97
98 /**
99 * @brief GATTC discovery characteristic structure.
100 */
101 typedef struct
102 {
103 uint16_t start_hdl; /**< Start handle. */
104 uint16_t end_hdl; /**< End handle. */
105 ble_uuid_t *p_uuid; /**< Characteristic UUID. */
106 } ble_gattc_disc_char_t;
107
108 /**
109 * @brief GATTC read by characteristic UUID structure.
110 */
111 typedef struct
112 {
113 uint16_t start_hdl; /**< Start handle. */
114 uint16_t end_hdl; /**< End handle. */
115 ble_uuid_t *p_uuid; /**< Characteristic UUID. */
116 } ble_gattc_read_by_uuid_t;
117
118 /**
119 * @brief GATTC write attribute value structure.
120 */
121 typedef struct
122 {
123 uint16_t handle; /**< Attribute handle. */
124 uint16_t offset; /**< value offset to start with. */
125 uint16_t length; /**< Write length. */
126 uint8_t *p_value; /**< Value to write. */
127 } ble_gattc_write_attr_value_t;
128
129 /**
130 * @brief GATTC write without response structure.
131 */
132 typedef struct
133 {
134 bool signed_write; /**< True if signed write should be used when possible/applicable. */
135 uint16_t handle; /**< Attribute handle. */
136 uint16_t length; /**< Write length. */
137 uint8_t *p_value; /**< Value to write. */
138 } ble_gattc_write_no_resp_t;
139
140 /**@brief Read Multiple Handles. */
141 typedef struct
142 {
143 uint16_t handle; /**< Attribute handle. */
144 uint16_t len; /**< Known value: length of the handle (len shall not be set to 0). */
145 } ble_gattc_multiple_att_t;
146
147 /**@brief GATTC Read Multiple. */
148 typedef struct
149 {
150 uint16_t handle_count; /**< Handle count of the multiple attributes to be read. */
151 ble_gattc_multiple_att_t *p_read_multiple; /**< Pointer to the multiple attributes to be read. */
152 } ble_gattc_read_multiple_t;
153
154 /**@brief GATTC Browse information about Characteristic. */
155 typedef struct
156 {
157 ble_gattc_attr_type_t attr_type; /**< Attribute type. See @ref BLE_GATTC_BROWSE_ATTR_CHAR for Characteristic Declaration. */
158 uint8_t prop; /**< Value property. */
159 uint16_t handle; /**< Value handle. */
160 uint8_t uuid_len; /**< Characteristic UUID length. */
161 uint8_t uuid[BLE_ATT_UUID_128_LEN]; /**< Characteristic UUID. */
162 } ble_gattc_browse_attr_char_t;
163
164 /**@brief GATTC Browse information about Included Service. */
165 typedef struct
166 {
167 ble_gattc_attr_type_t attr_type; /**< Attribute type. See @ref BLE_GATTC_BROWSE_INC_SRVC for Included Service Information. */
168 uint8_t uuid_len; /**< Included Service UUID length. */
169 uint8_t uuid[BLE_ATT_UUID_128_LEN]; /**< Included Service UUID. */
170 uint16_t start_hdl; /**< Included Service start handle. */
171 uint16_t end_hdl; /**< Included Service end handle. */
172 } ble_gattc_browse_inc_srvc_t;
173
174 /**@brief GATTC Browse information about Attribute. */
175 typedef struct
176 {
177 ble_gattc_attr_type_t attr_type; /**< Attribute type. See @ref BLE_GATTC_BROWSE_ATTR_VAL for Attribute Value. See @ref BLE_GATTC_BROWSE_ATTR_DESC for Attribute Descriptor. */
178 uint8_t uuid_len; /**< Attribute UUID length. */
179 uint8_t uuid[BLE_ATT_UUID_128_LEN]; /**< Characteristic UUID or Characteristic Descriptor UUID. */
180 } ble_gattc_browse_attr_t;
181
182 /**@brief GATTC Browse attribute information. */
183 union ble_gattc_browse_attr_info
184 {
185 ble_gattc_attr_type_t attr_type; /**< Attribute type. See @ref ble_gattc_attr_type_t. */
186 ble_gattc_browse_attr_char_t attr_char; /**< Information about Characteristic. When union attr_type is @ref BLE_GATTC_BROWSE_ATTR_CHAR */
187 ble_gattc_browse_inc_srvc_t inc_srvc; /**< Information about Included Service. When union attr_type is @ref BLE_GATTC_BROWSE_INC_SRVC */
188 ble_gattc_browse_attr_t attr; /**< Information about Attribute. When union attr_type is @ref BLE_GATTC_BROWSE_ATTR_VAL or @ref BLE_GATTC_BROWSE_ATTR_DESC. */
189 };
190
191 /**@brief GATTC Browse service(s) indication. */
192 typedef struct
193 {
194 uint8_t serv_type; /**< Service type. See @ref gatt_serv_type_t.*/
195 uint8_t uuid_len; /**< Service UUID length. */
196 uint8_t uuid[BLE_ATT_UUID_128_LEN]; /**< Service UUID. */
197 uint16_t start_hdl; /**< Service start handle. */
198 uint16_t end_hdl; /**< Service end handle. */
199 union ble_gattc_browse_attr_info info[__ARRAY_EMPTY]; /**< Attribute information presented in the service(array length = end_hdl - start_hdl);
200 If attr_type is equal to BLE_GATTC_BROWSE_NONE, the last attribute information has been found in previous one, although not reach the service end handle. */
201 } ble_gattc_browse_srvc_t;
202
203
204
205 /**@brief GATT service. */
206 typedef struct
207 {
208 uint16_t start_hdl; /**< Start handle. */
209 uint16_t end_hdl; /**< End handle. */
210 uint8_t uuid_len; /**< Service UUID length. */
211 uint8_t *p_uuid; /**< Service UUID. */
212 } ble_gattc_service_t;
213
214 /**@brief GATT include. */
215 typedef struct
216 {
217 uint16_t attr_hdl; /**< Attribute handle. */
218 uint16_t start_hdl; /**< Start handle. */
219 uint16_t end_hdl; /**< End handle. */
220 uint8_t uuid_len; /**< Service UUID length. */
221 uint8_t *p_uuid; /**< Service UUID. */
222 } ble_gattc_include_t;
223
224 /**@brief GATT characteristic. */
225 typedef struct
226 {
227 uint16_t handle_decl; /**< Handle of the Characteristic Declaration. */
228 uint16_t handle_value; /**< Handle of the Characteristic Value. */
229 uint8_t prop; /**< Properties. */
230 uint8_t uuid_len; /**< Characteristic UUID length. */
231 uint8_t *p_uuid; /**< Characteristic UUID. */
232 } ble_gattc_char_t;
233
234 /**@brief GATT descriptor. */
235 typedef struct
236 {
237 uint16_t attr_hdl; /**< Attribute handle. */
238 uint8_t uuid_len; /**< Descriptor UUID length. */
239 uint8_t *p_uuid; /**< Descriptor UUID. */
240 } ble_gattc_desc_t;
241
242 /**@brief GATT service discovery. */
243 typedef struct
244 {
245 uint16_t count; /**< Service count. */
246 ble_gattc_service_t services[__ARRAY_EMPTY]; /**< Service data. */
247 }ble_gattc_srvc_disc_t;
248
249 /**@brief GATT include discovery. */
250 typedef struct
251 {
252 uint16_t count; /**< Include count. */
253 ble_gattc_include_t includes[__ARRAY_EMPTY]; /**< Include data. */
254 }ble_gattc_incl_disc_t;
255
256 /**@brief GATT characteristic discovery. */
257 typedef struct
258 {
259 uint16_t count; /**< Characteristic count. */
260 ble_gattc_char_t chars[__ARRAY_EMPTY]; /**< Characteristic data. */
261 }ble_gattc_char_disc_t;
262
263 /**@brief GATT characteristic descriptor discovery. */
264 typedef struct
265 {
266 uint16_t count; /**< Descriptor count. */
267 ble_gattc_desc_t char_descs[__ARRAY_EMPTY]; /**< Descriptor data. */
268 }ble_gattc_char_desc_disc_t;
269
270 /**@brief GATT Client Read value. */
271 typedef struct
272 {
273 uint16_t handle; /**< Attribute handle. */
274 uint16_t offset; /**< Offset of the attribute value. */
275 uint16_t length; /**< Attribute value length. */
276 uint8_t *p_value; /**< Pointer to the attribute value data. */
277 } ble_gattc_read_value_t;
278
279 /**@brief GATT value Read response. */
280 typedef struct
281 {
282 uint16_t count; /**< Value Count. */
283 ble_gattc_read_value_t vals[__ARRAY_EMPTY]; /**< Value(s) list. */
284 }ble_gattc_read_rsp_t;
285
286
287 /**@brief GATT Client Write. */
288 typedef struct
289 {
290 uint16_t handle; /**< Attribute handle. */
291 } ble_gattc_write_t;
292
293
294 /**@brief GATTC Notification and Indication value indication. */
295 typedef struct
296 {
297 ble_gatt_evt_type_t type; /**< Event type. */
298 uint16_t length; /**< Attribute value length. */
299 uint16_t handle; /**< Attribute handle. */
300 uint8_t *p_value; /**< Pointer to the attribute value data. */
301 } ble_gattc_ntf_ind_t;
302
303 /**
304 * @brief GATTC profile register enumeration.
305 */
306 typedef enum
307 {
308 BLE_GATTC_EVT_REGISTER, /**< GATT client event register. */
309 BLE_GATTC_EVT_UNREGISTER, /**< GATT client event unregister. */
310 }ble_gattc_prf_reg_evt_t;
311
312
313 /**@brief GATTC profile register event for @ref BLE_GATTC_EVT_PRIMARY_SRVC_DISC. */
314 typedef struct
315 {
316 ble_gattc_prf_reg_evt_t prf_reg_evt; /**< Porfile Register Event. */
317 } ble_gattc_evt_prf_reg_t;
318
319 /**@brief GATTC Browse service(s) event for @ref BLE_GATTC_EVT_SRVC_BROWSE. */
320 typedef struct
321 {
322 uint8_t serv_type; /**< Service type. See @ref gatt_serv_type_t.*/
323 uint8_t uuid_len; /**< Service UUID length. */
324 uint8_t uuid[BLE_ATT_UUID_128_LEN]; /**< Service UUID. */
325 uint16_t start_hdl; /**< Service start handle. */
326 uint16_t end_hdl; /**< Service end handle. */
327 union ble_gattc_browse_attr_info *info; /**< Attribute information presented in the service(array length = end_hdl - start_hdl);If attr_type is equal to BLE_GATTC_BROWSE_NONE, the last attribute information has been found in previous one, although not reach the service end handle. */
328 } ble_gattc_evt_browse_srvc_t;
329
330 /**@brief GATT service discovery event for @ref BLE_GATTC_EVT_PRIMARY_SRVC_DISC. */
331 typedef struct
332 {
333 uint16_t count; /**< Service count. */
334 ble_gattc_service_t *services; /**< Service data. */
335 } ble_gattc_evt_srvc_disc_t;
336
337 /**@brief GATT include discovery event for @ref BLE_GATTC_EVT_INCLUDE_SRVC_DISC. */
338 typedef struct
339 {
340 uint16_t count; /**< Include count. */
341 ble_gattc_include_t *includes; /**< Include data. */
342 } ble_gattc_evt_incl_disc_t;
343
344 /**@brief GATT characteristic discovery event for @ref BLE_GATTC_EVT_CHAR_DISC. */
345 typedef struct
346 {
347 uint16_t count; /**< Characteristic count. */
348 ble_gattc_char_t *chars; /**< Characteristic data. */
349 } ble_gattc_evt_char_disc_t;
350
351 /**@brief GATT characteristic descriptor discovery event for @ref BLE_GATTC_EVT_CHAR_DESC_DISC. */
352 typedef struct
353 {
354 uint16_t count; /**< Descriptor count. */
355 ble_gattc_desc_t *char_descs; /**< Descriptor data. */
356 } ble_gattc_evt_char_desc_disc_t;
357
358 /**@brief GATT Client Read response event for @ref BLE_GATTC_EVT_READ_RSP. */
359 typedef struct
360 {
361 uint16_t count; /**< Value Count. */
362 ble_gattc_read_value_t *value; /**< Value(s) list. */
363 } ble_gattc_evt_read_t;
364
365
366 /**@brief GATT Client Write Response event for @ref BLE_GATTC_EVT_WRITE_RSP. */
367 typedef struct
368 {
369 uint16_t handle; /**< Attribute handle. */
370 } ble_gattc_evt_write_t;
371
372
373 /**@brief GATTC Notification and Indication event for @ref BLE_GATTC_EVT_NTF_IND. */
374 typedef struct
375 {
376 ble_gatt_evt_type_t type; /**< Event type. */
377 uint16_t length; /**< Attribute value length. */
378 uint16_t handle; /**< Attribute handle. */
379 uint8_t *p_value; /**< Pointer to the attribute value data. */
380 } ble_gattc_evt_ntf_ind_t;
381
382
383 /**@brief GATT Client Cache Update Current State. */
384 typedef enum
385 {
386 BLE_GATT_CACHE_UPDATING, /**< GATT Cache in updating process. */
387 BLE_GATT_CACHE_FINISH, /**< GATT Cache is updated or checked. */
388 } ble_gattc_cache_current_state_t;
389
390
391 /**@brief GATT Client Cache Update event for @ref BLE_GATTC_EVT_CACHE_UPDATE. */
392 typedef struct
393 {
394 bool cache_valid; /**< Cache validity. */
395 ble_gattc_cache_current_state_t cache_current_state;
396 } ble_gattc_evt_cache_update_t;
397
398
399 /**@brief BLE GATTC event structure. */
400 typedef struct
401 {
402 uint8_t index; /**< Index of connection. */
403 union
404 {
405 ble_gattc_evt_browse_srvc_t srvc_browse; /**< Browce service discovery response event. */
406 ble_gattc_evt_srvc_disc_t prim_srvc_disc; /**< Primary service discovery response event. */
407 ble_gattc_evt_incl_disc_t inc_srvc_disc; /**< Include service discovery response event. */
408 ble_gattc_evt_char_disc_t char_disc; /**< Characteristic discovery response event. */
409 ble_gattc_evt_char_desc_disc_t char_desc_disc; /**< Characteristic descriptor discovery response event. */
410 ble_gattc_evt_read_t read_rsp; /**< Read response event. */
411 ble_gattc_evt_write_t write_rsp; /**< Write response event. */
412 ble_gattc_evt_ntf_ind_t ntf_ind; /**< Handle value Notification/Indication response. */
413 ble_gattc_evt_cache_update_t cache_update;
414 ble_gattc_evt_prf_reg_t prf_reg;
415 } params; /**< Event Parameters. */
416 } ble_gattc_evt_t;
417 /** @} */
418
419 /** @addtogroup BLE_GATTC_FUNCTIONS Functions
420 * @{ */
421
422 /**
423 ****************************************************************************************
424 * @brief Perform MTU Exchange.
425 *
426 * @param[in] conn_idx: Current connection index.
427 *
428 * @retval ::SDK_SUCCESS: Successfully send an MTU Exchange request.
429 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
430 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
431 ****************************************************************************************
432 */
433 uint16_t ble_gattc_mtu_exchange(uint8_t conn_idx);
434
435 /**
436 ****************************************************************************************
437 * @brief Browse all Primary Services or specific Primary Service information on remote GATT server.
438 *
439 * @note This discovery automatically searches for Primary Services, Included Services, Characteristics and Descriptors of each service.
440 * To discover one or more services only, use ble_gattc_primary_services_discover() instead.
441 * This discovery is able to search all Primary Services or a specific one.
442 * If srvc_uuid is NULL, all services are returned.
443 *
444 * @param[in] conn_idx: Current connection index.
445 * @param[in] p_srvc_uuid: Pointer to Service UUID. If it is NULL, all services will be returned.
446 *
447 * @retval ::SDK_SUCCESS: Successfully start the Browse Service(s) procedure.
448 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
449 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
450 ****************************************************************************************
451 */
452 uint16_t ble_gattc_services_browse(uint8_t conn_idx, const ble_uuid_t *p_srvc_uuid);
453
454 /**
455 ****************************************************************************************
456 * @brief Discover Primary Services on remote GATT server.
457 *
458 * @param[in] conn_idx: Current connection index.
459 * @param[in] p_srvc_uuid: Pointer to Service UUID. If it is NULL, all Primary Services will be returned.
460 *
461 * @retval ::SDK_SUCCESS: Successfully start the Primary Service Discovery procedure.
462 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
463 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
464 ****************************************************************************************
465 */
466 uint16_t ble_gattc_primary_services_discover(uint8_t conn_idx, const ble_uuid_t *p_srvc_uuid);
467
468 /**
469 ****************************************************************************************
470 * @brief Discover Included Services on remote GATT server.
471 *
472 * @param[in] conn_idx: Current connection index.
473 * @param[in] start_hdl: Start handle.
474 * @param[in] end_hdl: End handle.
475 *
476 * @retval ::SDK_SUCCESS: Successfully start the Relationship Discovery procedure.
477 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
478 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
479 ****************************************************************************************
480 */
481 uint16_t ble_gattc_included_services_discover(uint8_t conn_idx, uint16_t start_hdl, uint16_t end_hdl);
482
483 /**
484 ****************************************************************************************
485 * @brief Discover Characteristics on remote GATT server.
486 *
487 * @param[in] conn_idx: Current connection index.
488 * @param[in] start_hdl: Start handle.
489 * @param[in] end_hdl: End handle.
490 * @param[in] p_char_uuid: Pointer to Characteristic UUID.If it is NULL, all characteristics are returned.
491 *
492 * @retval ::SDK_SUCCESS: Successfully start the Characteristic Discovery procedure.
493 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
494 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
495 ****************************************************************************************
496 */
497 uint16_t ble_gattc_char_discover(uint8_t conn_idx, uint16_t start_hdl, uint16_t end_hdl, const ble_uuid_t *p_char_uuid);
498
499 /**
500 ****************************************************************************************
501 * @brief Discover Characteristics Descriptors on remote GATT server.
502 *
503 * @param[in] conn_idx: Current connection index.
504 * @param[in] start_hdl: Start handle.
505 * @param[in] end_hdl: End handle.
506 *
507 * @retval ::SDK_SUCCESS: Successfully start the Descriptor Discovery procedure.
508 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
509 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
510 ****************************************************************************************
511 */
512 uint16_t ble_gattc_char_desc_discover(uint8_t conn_idx, uint16_t start_hdl, uint16_t end_hdl);
513
514 /**
515 ****************************************************************************************
516 * @brief Read Attribute from remote GATT server.
517 *
518 * @note This uses either the "Read Characteristic Value" procedure or the "Read Characteristic Descriptor"
519 * procedure, depending on the attribute pointed by handle. If offset is non-zero or the
520 * attribute length is larger than the MTU, the "Read Long Characteristic Value" procedure or the
521 * "Read Long Characteristic Descriptor" procedure will be used respectively.
522 *
523 * @param[in] conn_idx: Current connection index.
524 * @param[in] handle: Attribute handle.
525 * @param[in] offset: Value offset to start with.
526 *
527 * @retval ::SDK_SUCCESS: Successfully start the Read (Long) procedure.
528 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
529 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
530 ****************************************************************************************
531 */
532 uint16_t ble_gattc_read(uint8_t conn_idx, uint16_t handle, uint16_t offset);
533
534 /**
535 ****************************************************************************************
536 * @brief Read Attribute by UUID.
537 *
538 * @param[in] conn_idx: Current connection index.
539 * @param[in] start_hdl: Start handle.
540 * @param[in] end_hdl: End handle.
541 * @param[in] p_char_uuid: Pointer to Characteristic UUID.
542 *
543 *
544 * @retval ::SDK_SUCCESS: Successfully start the Read using Characteristic UUID procedure.
545 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
546 * @retval ::SDK_ERR_POINTER_NULL: Invalid pointer supplied.
547 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
548 ****************************************************************************************
549 */
550 uint16_t ble_gattc_read_by_uuid(uint8_t conn_idx, uint16_t start_hdl, uint16_t end_hdl, const ble_uuid_t *p_char_uuid);
551
552 /**
553 ****************************************************************************************
554 * @brief Initiate a Read Multiple Characteristic Values procedure
555 *
556 * @param[in] conn_idx: Current connection index.
557 * @param[in] p_param: Pointer to the parameters of the value.
558 *
559 * @retval ::SDK_SUCCESS: Successfully start the Read Multiple Characteristic Values procedure.
560 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
561 * @retval ::SDK_ERR_POINTER_NULL: Invalid pointer supplied.
562 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
563 ****************************************************************************************
564 */
565 uint16_t ble_gattc_read_multiple(uint8_t conn_idx, const ble_gattc_read_multiple_t *p_param);
566
567 /**
568 ****************************************************************************************
569 * @brief Write (long) Characteristic (Descriptor) Value.
570 *
571 * @note This uses either the "Write Characteristic Value" procedure or the "Write Characteristic
572 * Descriptor" procedure, depending on the attribute pointed by handle. If offset is non-zero
573 * or the attribute length is larger than the MTU, the "Write Long Characteristic Value" procedure
574 * or the "Write Long Characteristic Descriptor" procedure will be used respectively.
575 *
576 * @param[in] conn_idx: Current connection index.
577 * @param[in] handle: The handle of the attribute to be written.
578 * @param[in] offset: Offset into the attribute value to be written.
579 * @param[in] length: Length of the value data in bytes.
580 * @param[in] p_value: Pointer to the value data.
581 *
582 * @retval ::SDK_SUCCESS: Successfully start the Write procedure.
583 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
584 * @retval ::SDK_ERR_POINTER_NULL: Invalid pointer supplied.
585 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
586 ****************************************************************************************
587 */
588 uint16_t ble_gattc_write(uint8_t conn_idx, uint16_t handle, uint16_t offset, uint16_t length, const uint8_t *p_value);
589
590 /**
591 ****************************************************************************************
592 * @brief Prepare Long/Reliable Write to remote GATT server.
593 *
594 * @param[in] conn_idx: Current connection index.
595 * @param[in] handle: Attribute handle.
596 * @param[in] offset: Value offset to start with.
597 * @param[in] length: Value length.
598 * @param[in] p_value: Value data.
599 *
600 * @retval ::SDK_SUCCESS: Successfully send a Prepare Write request.
601 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
602 * @retval ::SDK_ERR_POINTER_NULL: Invalid pointer supplied.
603 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
604 ****************************************************************************************
605 */
606 uint16_t ble_gattc_write_prepare(uint8_t conn_idx, uint16_t handle, uint16_t offset, uint16_t length, const uint8_t *p_value);
607
608 /**
609 ****************************************************************************************
610 * @brief Execute Reliable/Long Write to remote GATT server.
611 *
612 * @param[in] conn_idx: Current connection index.
613 * @param[in] execute: True if data shall be written; false if cancel all prepared writes.
614 *
615 * @retval ::SDK_SUCCESS: Successfully send an Execute Write request.
616 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
617 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
618 ****************************************************************************************
619 */
620 uint16_t ble_gattc_write_execute(uint8_t conn_idx, bool execute);
621
622 /**
623 ****************************************************************************************
624 * @brief Write Attribute to remote GATT server (without response).
625 *
626 * @note If signed_write is set to false, the "Write Without Response" procedure will be used.
627 * If signed_write is set to true, the "Signed Write Without Response" procedure will be used on
628 * a link which is not encrypted.
629 * If a link is already encrypted, "Write Without Response" procedure shall be used instead of "Signed Write Without Response".
630 *
631 * @param[in] conn_idx: Current connection index.
632 * @param[in] handle: Attribute handle.
633 * @param[in] signed_write: True if signed write should be used, false write without response.
634 * @param[in] length: Value length.
635 * @param[in] p_value: Value data.
636 *
637 * @retval ::SDK_SUCCESS: Successfully start the (Signed) Write Without Response procedure.
638 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
639 * @retval ::SDK_ERR_POINTER_NULL: Invalid pointer supplied.
640 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
641 ****************************************************************************************
642 */
643 uint16_t ble_gattc_write_no_resp(uint8_t conn_idx, bool signed_write, uint16_t handle, uint16_t length, const uint8_t *p_value);
644
645 /**
646 ****************************************************************************************
647 * @brief Confirm Reception of Indication.
648 *
649 * @note Confirm indication which has been correctly received from the peer.
650 *
651 * @param[in] conn_idx: Current connection index.
652 * @param[in] handle: Value handle.
653 *
654 * @retval ::SDK_SUCCESS: Successfully send indication confirm.
655 * @retval ::SDK_ERR_INVALID_CONN_IDX: Invalid connection index supplied.
656 * @retval ::SDK_ERR_NO_RESOURCES: Not enough resources.
657 ****************************************************************************************
658 */
659 uint16_t ble_gattc_indicate_cfm(uint8_t conn_idx, uint16_t handle);
660
661 /** @} */
662
663 #endif
664
665 /** @} */
666
667 /** @} */
668
ble_gattc_browse_attr_char_t::handle
uint16_t handle
Definition: ble_gattc.h:159
ble_gattc_ntf_ind_t
GATTC Notification and Indication value indication.
Definition: ble_gattc.h:296
ble_gattc_browse_attr_t::uuid_len
uint8_t uuid_len
Definition: ble_gattc.h:178
BLE_GATTC_BROWSE_NONE
@ BLE_GATTC_BROWSE_NONE
Definition: ble_gattc.h:86
ble_gattc_evt_ntf_ind_t
GATTC Notification and Indication event for BLE_GATTC_EVT_NTF_IND.
Definition: ble_gattc.h:375
ble_gattc_evt_read_t
GATT Client Read response event for BLE_GATTC_EVT_READ_RSP.
Definition: ble_gattc.h:360
ble_gattc_evt_char_desc_disc_t::count
uint16_t count
Definition: ble_gattc.h:354
ble_gattc_prf_reg_evt_t
ble_gattc_prf_reg_evt_t
GATTC profile register enumeration.
Definition: ble_gattc.h:307
BLE_GATTC_SEC_SERV
@ BLE_GATTC_SEC_SERV
Definition: ble_gattc.h:75
ble_gattc_evt_browse_srvc_t
GATTC Browse service(s) event for BLE_GATTC_EVT_SRVC_BROWSE.
Definition: ble_gattc.h:321
BLE_GATTC_BROWSE_ATTR_CHAR
@ BLE_GATTC_BROWSE_ATTR_CHAR
Definition: ble_gattc.h:88
BLE_ATT_UUID_128_LEN
#define BLE_ATT_UUID_128_LEN
Definition: ble_att.h:65
gatt_serv_type_t
gatt_serv_type_t
GATT Client Service type IDs.
Definition: ble_gattc.h:73
ble_gattc_evt_t::ntf_ind
ble_gattc_evt_ntf_ind_t ntf_ind
Definition: ble_gattc.h:412
ble_gattc_srvc_disc_t
GATT service discovery.
Definition: ble_gattc.h:244
ble_gattc_char_disc_t::count
uint16_t count
Definition: ble_gattc.h:259
ble_gattc_char_t::handle_value
uint16_t handle_value
Definition: ble_gattc.h:228
BLE_GATTC_BROWSE_INC_SRVC
@ BLE_GATTC_BROWSE_INC_SRVC
Definition: ble_gattc.h:87
BLE_GATTC_EVT_REGISTER
@ BLE_GATTC_EVT_REGISTER
Definition: ble_gattc.h:308
BLE_GATTC_BROWSE_ATTR_DESC
@ BLE_GATTC_BROWSE_ATTR_DESC
Definition: ble_gattc.h:90
ble_gattc_service_t::p_uuid
uint8_t * p_uuid
Definition: ble_gattc.h:211
ble_gattc_write_prepare
uint16_t ble_gattc_write_prepare(uint8_t conn_idx, uint16_t handle, uint16_t offset, uint16_t length, const uint8_t *p_value)
Prepare Long/Reliable Write to remote GATT server.
ble_gattc_browse_inc_srvc_t::end_hdl
uint16_t end_hdl
Definition: ble_gattc.h:171
BLE_GATTC_BROWSE_ATTR_VAL
@ BLE_GATTC_BROWSE_ATTR_VAL
Definition: ble_gattc.h:89
ble_gattc_read_by_uuid_t::start_hdl
uint16_t start_hdl
Definition: ble_gattc.h:113
ble_gattc_included_services_discover
uint16_t ble_gattc_included_services_discover(uint8_t conn_idx, uint16_t start_hdl, uint16_t end_hdl)
Discover Included Services on remote GATT server.
ble_gattc_evt_browse_srvc_t::start_hdl
uint16_t start_hdl
Definition: ble_gattc.h:325
ble_gattc_evt_browse_srvc_t::serv_type
uint8_t serv_type
Definition: ble_gattc.h:322
ble_gattc_read_multiple_t::handle_count
uint16_t handle_count
Definition: ble_gattc.h:150
ble_gattc_evt_read_t::value
ble_gattc_read_value_t * value
Definition: ble_gattc.h:362
ble_gattc_write_attr_value_t::length
uint16_t length
Definition: ble_gattc.h:125
ble_gattc_write_attr_value_t::p_value
uint8_t * p_value
Definition: ble_gattc.h:126
ble_gattc_char_disc_t
GATT characteristic discovery.
Definition: ble_gattc.h:258
ble_gattc_include_t::end_hdl
uint16_t end_hdl
Definition: ble_gattc.h:219
ble_gattc_evt_t::inc_srvc_disc
ble_gattc_evt_incl_disc_t inc_srvc_disc
Definition: ble_gattc.h:407
ble_gattc_char_desc_discover
uint16_t ble_gattc_char_desc_discover(uint8_t conn_idx, uint16_t start_hdl, uint16_t end_hdl)
Discover Characteristics Descriptors on remote GATT server.
ble_gattc_multiple_att_t::len
uint16_t len
Definition: ble_gattc.h:144
ble_gattc_evt_read_t::count
uint16_t count
Definition: ble_gattc.h:361
ble_gattc_evt_write_t
GATT Client Write Response event for BLE_GATTC_EVT_WRITE_RSP.
Definition: ble_gattc.h:368
ble_gattc_write_attr_value_t::offset
uint16_t offset
Definition: ble_gattc.h:124
ble_gattc_char_t::handle_decl
uint16_t handle_decl
Definition: ble_gattc.h:227
ble_gattc_ntf_ind_t::length
uint16_t length
Definition: ble_gattc.h:298
ble_gattc_mtu_exchange
uint16_t ble_gattc_mtu_exchange(uint8_t conn_idx)
Perform MTU Exchange.
ble_gattc_multiple_att_t::handle
uint16_t handle
Definition: ble_gattc.h:143
ble_gattc_desc_t::uuid_len
uint8_t uuid_len
Definition: ble_gattc.h:238
ble_gattc_service_t::uuid_len
uint8_t uuid_len
Definition: ble_gattc.h:210
ble_gattc_evt_t::write_rsp
ble_gattc_evt_write_t write_rsp
Definition: ble_gattc.h:411
ble_gattc_char_t::uuid_len
uint8_t uuid_len
Definition: ble_gattc.h:230
ble_gattc_evt_srvc_disc_t
GATT service discovery event for BLE_GATTC_EVT_PRIMARY_SRVC_DISC.
Definition: ble_gattc.h:332
ble_gattc_evt_browse_srvc_t::uuid_len
uint8_t uuid_len
Definition: ble_gattc.h:323
ble_gattc_services_browse
uint16_t ble_gattc_services_browse(uint8_t conn_idx, const ble_uuid_t *p_srvc_uuid)
Browse all Primary Services or specific Primary Service information on remote GATT server.
ble_gattc_evt_char_desc_disc_t::char_descs
ble_gattc_desc_t * char_descs
Definition: ble_gattc.h:355
ble_gatt.h
BLE GATT.
ble_gattc_browse_attr_info::attr
ble_gattc_browse_attr_t attr
Definition: ble_gattc.h:188
BLE_GATT_CACHE_UPDATING
@ BLE_GATT_CACHE_UPDATING
Definition: ble_gattc.h:386
ble_gattc_read_multiple_t::p_read_multiple
ble_gattc_multiple_att_t * p_read_multiple
Definition: ble_gattc.h:151
ble_gattc_browse_attr_char_t
GATTC Browse information about Characteristic.
Definition: ble_gattc.h:156
gr55xx_sys_cfg.h
Define the chip configuration.
ble_gattc_evt_t::char_disc
ble_gattc_evt_char_disc_t char_disc
Definition: ble_gattc.h:408
ble_gattc_browse_attr_info::inc_srvc
ble_gattc_browse_inc_srvc_t inc_srvc
Definition: ble_gattc.h:187
ble_gattc_browse_srvc_t
GATTC Browse service(s) indication.
Definition: ble_gattc.h:193
ble_gattc_char_t
GATT characteristic.
Definition: ble_gattc.h:226
ble_gattc_evt_t::prf_reg
ble_gattc_evt_prf_reg_t prf_reg
Definition: ble_gattc.h:414
ble_gattc_browse_inc_srvc_t::uuid_len
uint8_t uuid_len
Definition: ble_gattc.h:168
ble_gattc_evt_ntf_ind_t::handle
uint16_t handle
Definition: ble_gattc.h:378
ble_gattc_read_value_t
GATT Client Read value.
Definition: ble_gattc.h:272
ble_gattc_evt_cache_update_t::cache_valid
bool cache_valid
Definition: ble_gattc.h:394
ble_gattc_write_no_resp_t
GATTC write without response structure.
Definition: ble_gattc.h:133
ble_gattc_browse_srvc_t::uuid_len
uint8_t uuid_len
Definition: ble_gattc.h:195
ble_gattc_evt_write_t::handle
uint16_t handle
Definition: ble_gattc.h:369
ble_gattc_incl_disc_t
GATT include discovery.
Definition: ble_gattc.h:251
ble_gattc_multiple_att_t
Read Multiple Handles.
Definition: ble_gattc.h:142
BLE_GATTC_PRI_SERV
@ BLE_GATTC_PRI_SERV
Definition: ble_gattc.h:74
ble_gattc_char_desc_disc_t
GATT characteristic descriptor discovery.
Definition: ble_gattc.h:265
ble_gattc_write_attr_value_t::handle
uint16_t handle
Definition: ble_gattc.h:123
ble_gattc_char_t::prop
uint8_t prop
Definition: ble_gattc.h:229
ble_gattc_evt_incl_disc_t::includes
ble_gattc_include_t * includes
Definition: ble_gattc.h:341
ble_gattc_evt_prf_reg_t
GATTC profile register event for BLE_GATTC_EVT_PRIMARY_SRVC_DISC.
Definition: ble_gattc.h:315
ble_gattc_attr_type_t
ble_gattc_attr_type_t
GATT Client Service Discover Attribute type IDs.
Definition: ble_gattc.h:85
ble_gattc_evt_browse_srvc_t::end_hdl
uint16_t end_hdl
Definition: ble_gattc.h:326
ble_error.h
File that contains error codes.
ble_gattc_browse_inc_srvc_t::attr_type
ble_gattc_attr_type_t attr_type
Definition: ble_gattc.h:167
ble_gattc_service_t::end_hdl
uint16_t end_hdl
Definition: ble_gattc.h:209
ble_gattc_write_no_resp_t::p_value
uint8_t * p_value
Definition: ble_gattc.h:137
ble_gattc_write
uint16_t ble_gattc_write(uint8_t conn_idx, uint16_t handle, uint16_t offset, uint16_t length, const uint8_t *p_value)
Write (long) Characteristic (Descriptor) Value.
ble_gattc_include_t::uuid_len
uint8_t uuid_len
Definition: ble_gattc.h:220
ble_gattc_primary_services_discover
uint16_t ble_gattc_primary_services_discover(uint8_t conn_idx, const ble_uuid_t *p_srvc_uuid)
Discover Primary Services on remote GATT server.
ble_gattc_write_no_resp
uint16_t ble_gattc_write_no_resp(uint8_t conn_idx, bool signed_write, uint16_t handle, uint16_t length, const uint8_t *p_value)
Write Attribute to remote GATT server (without response).
ble_gattc_browse_attr_info::attr_type
ble_gattc_attr_type_t attr_type
Definition: ble_gattc.h:185
BLE_GATTC_EVT_UNREGISTER
@ BLE_GATTC_EVT_UNREGISTER
Definition: ble_gattc.h:309
ble_gattc_write_no_resp_t::length
uint16_t length
Definition: ble_gattc.h:136
__ARRAY_EMPTY
#define __ARRAY_EMPTY
Definition: gr55xx_sys_cfg.h:53
ble_gattc_browse_attr_char_t::attr_type
ble_gattc_attr_type_t attr_type
Definition: ble_gattc.h:157
ble_gattc_evt_char_disc_t
GATT characteristic discovery event for BLE_GATTC_EVT_CHAR_DISC.
Definition: ble_gattc.h:346
ble_gattc_disc_char_t::p_uuid
ble_uuid_t * p_uuid
Definition: ble_gattc.h:105
ble_gattc_evt_char_disc_t::count
uint16_t count
Definition: ble_gattc.h:347
ble_gattc_read_value_t::offset
uint16_t offset
Definition: ble_gattc.h:274
ble_gattc_evt_incl_disc_t::count
uint16_t count
Definition: ble_gattc.h:340
ble_gattc_desc_t
GATT descriptor.
Definition: ble_gattc.h:236
ble_gattc_evt_ntf_ind_t::type
ble_gatt_evt_type_t type
Definition: ble_gattc.h:376
ble_gattc_srvc_disc_t::count
uint16_t count
Definition: ble_gattc.h:245
ble_gatt_evt_type_t
ble_gatt_evt_type_t
GATT common events.
Definition: ble_gatt.h:67
ble_gattc_write_t::handle
uint16_t handle
Definition: ble_gattc.h:290
ble_gattc_service_t
GATT service.
Definition: ble_gattc.h:207
ble_gattc_read
uint16_t ble_gattc_read(uint8_t conn_idx, uint16_t handle, uint16_t offset)
Read Attribute from remote GATT server.
ble_gattc_read_by_uuid_t::p_uuid
ble_uuid_t * p_uuid
Definition: ble_gattc.h:115
ble_gattc_browse_srvc_t::start_hdl
uint16_t start_hdl
Definition: ble_gattc.h:197
ble_gattc_browse_inc_srvc_t::start_hdl
uint16_t start_hdl
Definition: ble_gattc.h:170
ble_gattc_char_discover
uint16_t ble_gattc_char_discover(uint8_t conn_idx, uint16_t start_hdl, uint16_t end_hdl, const ble_uuid_t *p_char_uuid)
Discover Characteristics on remote GATT server.
ble_gattc_read_value_t::p_value
uint8_t * p_value
Definition: ble_gattc.h:276
ble_gattc_write_attr_value_t
GATTC write attribute value structure.
Definition: ble_gattc.h:122
ble_gattc_ntf_ind_t::handle
uint16_t handle
Definition: ble_gattc.h:299
ble_gattc_desc_t::p_uuid
uint8_t * p_uuid
Definition: ble_gattc.h:239
ble_gattc_include_t
GATT include.
Definition: ble_gattc.h:216
ble_gattc_indicate_cfm
uint16_t ble_gattc_indicate_cfm(uint8_t conn_idx, uint16_t handle)
Confirm Reception of Indication.
ble_gattc_cache_current_state_t
ble_gattc_cache_current_state_t
GATT Client Cache Update Current State.
Definition: ble_gattc.h:385
ble_gattc_evt_srvc_disc_t::count
uint16_t count
Definition: ble_gattc.h:333
ble_gattc_write_no_resp_t::signed_write
bool signed_write
Definition: ble_gattc.h:134
ble_gattc_evt_t::cache_update
ble_gattc_evt_cache_update_t cache_update
Definition: ble_gattc.h:413
ble_gattc_browse_srvc_t::serv_type
uint8_t serv_type
Definition: ble_gattc.h:194
ble_gattc_evt_t::prim_srvc_disc
ble_gattc_evt_srvc_disc_t prim_srvc_disc
Definition: ble_gattc.h:406
ble_gattc_browse_attr_char_t::prop
uint8_t prop
Definition: ble_gattc.h:158
ble_gattc_char_t::p_uuid
uint8_t * p_uuid
Definition: ble_gattc.h:231
ble_gattc_read_by_uuid_t
GATTC read by characteristic UUID structure.
Definition: ble_gattc.h:112
ble_gattc_read_by_uuid_t::end_hdl
uint16_t end_hdl
Definition: ble_gattc.h:114
BLE_GATT_CACHE_FINISH
@ BLE_GATT_CACHE_FINISH
Definition: ble_gattc.h:387
ble_gattc_evt_browse_srvc_t::info
union ble_gattc_browse_attr_info * info
Definition: ble_gattc.h:327
ble_gattc_evt_t::index
uint8_t index
Definition: ble_gattc.h:402
ble_gattc_incl_disc_t::count
uint16_t count
Definition: ble_gattc.h:252
ble_gattc_disc_char_t::start_hdl
uint16_t start_hdl
Definition: ble_gattc.h:103
ble_gattc_evt_char_desc_disc_t
GATT characteristic descriptor discovery event for BLE_GATTC_EVT_CHAR_DESC_DISC.
Definition: ble_gattc.h:353
ble_att.h
Attribute Protocol.
ble_gattc_evt_t::char_desc_disc
ble_gattc_evt_char_desc_disc_t char_desc_disc
Definition: ble_gattc.h:409
ble_gattc_evt_char_disc_t::chars
ble_gattc_char_t * chars
Definition: ble_gattc.h:348
ble_gattc_browse_inc_srvc_t
GATTC Browse information about Included Service.
Definition: ble_gattc.h:166
ble_gattc_write_t
GATT Client Write.
Definition: ble_gattc.h:289
ble_gattc_browse_attr_info
GATTC Browse attribute information.
Definition: ble_gattc.h:184
ble_gattc_include_t::p_uuid
uint8_t * p_uuid
Definition: ble_gattc.h:221
ble_gattc_evt_t::srvc_browse
ble_gattc_evt_browse_srvc_t srvc_browse
Definition: ble_gattc.h:405
ble_gattc_evt_cache_update_t::cache_current_state
ble_gattc_cache_current_state_t cache_current_state
Definition: ble_gattc.h:395
ble_gattc_evt_srvc_disc_t::services
ble_gattc_service_t * services
Definition: ble_gattc.h:334
ble_gattc_evt_t::read_rsp
ble_gattc_evt_read_t read_rsp
Definition: ble_gattc.h:410
ble_uuid_t
GATT UUID structure.
Definition: ble_gatt.h:81
ble_gattc_evt_cache_update_t
GATT Client Cache Update event for BLE_GATTC_EVT_CACHE_UPDATE.
Definition: ble_gattc.h:393
ble_gattc_read_rsp_t
GATT value Read response.
Definition: ble_gattc.h:281
ble_gattc_read_by_uuid
uint16_t ble_gattc_read_by_uuid(uint8_t conn_idx, uint16_t start_hdl, uint16_t end_hdl, const ble_uuid_t *p_char_uuid)
Read Attribute by UUID.
ble_gattc_char_desc_disc_t::count
uint16_t count
Definition: ble_gattc.h:266
ble_gattc_browse_attr_char_t::uuid_len
uint8_t uuid_len
Definition: ble_gattc.h:160
ble_gattc_browse_attr_info::attr_char
ble_gattc_browse_attr_char_t attr_char
Definition: ble_gattc.h:186
ble_gattc_evt_incl_disc_t
GATT include discovery event for BLE_GATTC_EVT_INCLUDE_SRVC_DISC.
Definition: ble_gattc.h:339
ble_gattc_read_multiple_t
GATTC Read Multiple.
Definition: ble_gattc.h:149
ble_gattc_include_t::start_hdl
uint16_t start_hdl
Definition: ble_gattc.h:218
ble_gattc_desc_t::attr_hdl
uint16_t attr_hdl
Definition: ble_gattc.h:237
ble_gattc_include_t::attr_hdl
uint16_t attr_hdl
Definition: ble_gattc.h:217
ble_gattc_evt_ntf_ind_t::p_value
uint8_t * p_value
Definition: ble_gattc.h:379
ble_gattc_ntf_ind_t::type
ble_gatt_evt_type_t type
Definition: ble_gattc.h:297
ble_gattc_read_value_t::length
uint16_t length
Definition: ble_gattc.h:275
ble_gattc_read_value_t::handle
uint16_t handle
Definition: ble_gattc.h:273
ble_gattc_write_no_resp_t::handle
uint16_t handle
Definition: ble_gattc.h:135
ble_gattc_browse_attr_t
GATTC Browse information about Attribute.
Definition: ble_gattc.h:176
ble_gattc_browse_attr_t::attr_type
ble_gattc_attr_type_t attr_type
Definition: ble_gattc.h:177
ble_gattc_evt_prf_reg_t::prf_reg_evt
ble_gattc_prf_reg_evt_t prf_reg_evt
Definition: ble_gattc.h:316
ble_gattc_ntf_ind_t::p_value
uint8_t * p_value
Definition: ble_gattc.h:300
ble_gattc_write_execute
uint16_t ble_gattc_write_execute(uint8_t conn_idx, bool execute)
Execute Reliable/Long Write to remote GATT server.
ble_gattc_read_multiple
uint16_t ble_gattc_read_multiple(uint8_t conn_idx, const ble_gattc_read_multiple_t *p_param)
Initiate a Read Multiple Characteristic Values procedure.
ble_gattc_evt_ntf_ind_t::length
uint16_t length
Definition: ble_gattc.h:377
ble_gattc_read_rsp_t::count
uint16_t count
Definition: ble_gattc.h:282
ble_gattc_disc_char_t::end_hdl
uint16_t end_hdl
Definition: ble_gattc.h:104
ble_gattc_service_t::start_hdl
uint16_t start_hdl
Definition: ble_gattc.h:208
ble_gattc_evt_t
BLE GATTC event structure.
Definition: ble_gattc.h:401
ble_gattc_disc_char_t
GATTC discovery characteristic structure.
Definition: ble_gattc.h:102