ble_gatt_client
|
collection of functions to facilitate gatt implementation More...
#include "queue.h"
#include "att.h"
#include "bluetooth.h"
#include "uuid.h"
#include "gatt-helpers.h"
#include "util.h"
Go to the source code of this file.
Data Structures | |
struct | bt_gatt_result |
struct | bt_gatt_request |
struct | mtu_op |
struct | read_incl_data |
Macros | |
#define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
Functions | |
static struct bt_gatt_result * | result_create (uint8_t opcode, const void *pdu, uint16_t pdu_len, uint16_t data_len, void *op) |
static void | result_destroy (struct bt_gatt_result *result) |
static unsigned int | result_element_count (struct bt_gatt_result *result) |
unsigned int | bt_gatt_result_service_count (struct bt_gatt_result *result) |
unsigned int | bt_gatt_result_characteristic_count (struct bt_gatt_result *result) |
unsigned int | bt_gatt_result_descriptor_count (struct bt_gatt_result *result) |
unsigned int | bt_gatt_result_included_count (struct bt_gatt_result *result) |
bool | bt_gatt_iter_init (struct bt_gatt_iter *iter, struct bt_gatt_result *result) |
static bool | convert_uuid_le (const uint8_t *src, size_t len, uint8_t dst[16]) |
static struct bt_gatt_result * | result_append (uint8_t opcode, const void *pdu, uint16_t pdu_len, uint16_t data_len, struct bt_gatt_request *op) |
bool | bt_gatt_iter_next_included_service (struct bt_gatt_iter *iter, uint16_t *handle, uint16_t *start_handle, uint16_t *end_handle, uint8_t uuid[16]) |
bool | bt_gatt_iter_next_service (struct bt_gatt_iter *iter, uint16_t *start_handle, uint16_t *end_handle, uint8_t uuid[16]) |
bool | bt_gatt_iter_next_characteristic (struct bt_gatt_iter *iter, uint16_t *start_handle, uint16_t *end_handle, uint16_t *value_handle, uint8_t *properties, uint8_t uuid[16]) |
bool | bt_gatt_iter_next_descriptor (struct bt_gatt_iter *iter, uint16_t *handle, uint8_t uuid[16]) |
bool | bt_gatt_iter_next_read_by_type (struct bt_gatt_iter *iter, uint16_t *handle, uint16_t *length, const uint8_t **value) |
static void | destroy_mtu_op (void *user_data) |
static uint8_t | process_error (const void *pdu, uint16_t length) |
static void | mtu_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
unsigned int | bt_gatt_exchange_mtu (struct bt_att *att, uint16_t client_rx_mtu, bt_gatt_result_callback_t callback, void *user_data, bt_gatt_destroy_func_t destroy) |
static int | get_uuid_len (const bt_uuid_t *uuid) |
struct bt_gatt_request * | bt_gatt_request_ref (struct bt_gatt_request *req) |
void | bt_gatt_request_unref (struct bt_gatt_request *req) |
void | bt_gatt_request_cancel (struct bt_gatt_request *req) |
static void | async_req_unref (void *data) |
static void | discovery_op_complete (struct bt_gatt_request *op, bool success, uint8_t ecode) |
static void | read_by_grp_type_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
static void | find_by_type_val_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
static struct bt_gatt_request * | discover_services (struct bt_att *att, bt_uuid_t *uuid, uint16_t start, uint16_t end, bt_gatt_request_callback_t callback, void *user_data, bt_gatt_destroy_func_t destroy, bool primary) |
struct bt_gatt_request * | bt_gatt_discover_all_primary_services (struct bt_att *att, bt_uuid_t *uuid, bt_gatt_request_callback_t callback, void *user_data, bt_gatt_destroy_func_t destroy) |
struct bt_gatt_request * | bt_gatt_discover_primary_services (struct bt_att *att, bt_uuid_t *uuid, uint16_t start, uint16_t end, bt_gatt_request_callback_t callback, void *user_data, bt_gatt_destroy_func_t destroy) |
struct bt_gatt_request * | bt_gatt_discover_secondary_services (struct bt_att *att, bt_uuid_t *uuid, uint16_t start, uint16_t end, bt_gatt_request_callback_t callback, void *user_data, bt_gatt_destroy_func_t destroy) |
static struct read_incl_data * | new_read_included (struct bt_gatt_result *res) |
static struct read_incl_data * | read_included_ref (struct read_incl_data *data) |
static void | read_included_unref (void *data) |
static void | discover_included_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
static void | read_included_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
static void | read_included (struct read_incl_data *data) |
struct bt_gatt_request * | bt_gatt_discover_included_services (struct bt_att *att, uint16_t start, uint16_t end, bt_gatt_request_callback_t callback, void *user_data, bt_gatt_destroy_func_t destroy) |
static void | discover_chrcs_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
struct bt_gatt_request * | bt_gatt_discover_characteristics (struct bt_att *att, uint16_t start, uint16_t end, bt_gatt_request_callback_t callback, void *user_data, bt_gatt_destroy_func_t destroy) |
static void | read_by_type_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
bool | bt_gatt_read_by_type (struct bt_att *att, uint16_t start, uint16_t end, const bt_uuid_t *uuid, bt_gatt_request_callback_t callback, void *user_data, bt_gatt_destroy_func_t destroy) |
static void | discover_descs_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
struct bt_gatt_request * | bt_gatt_discover_descriptors (struct bt_att *att, uint16_t start, uint16_t end, bt_gatt_request_callback_t callback, void *user_data, bt_gatt_destroy_func_t destroy) |
Variables | |
static const uint8_t | bt_base_uuid [16] |
collection of functions to facilitate gatt implementation
Definition in file gatt-helpers.c.
#define MIN | ( | a, | |
b | |||
) | ((a) < (b) ? (a) : (b)) |
Definition at line 46 of file gatt-helpers.c.
Referenced by mtu_cb().
|
static |
Definition at line 662 of file gatt-helpers.c.
References bt_gatt_request_unref().
Referenced by bt_gatt_discover_characteristics(), bt_gatt_discover_descriptors(), bt_gatt_discover_included_services(), bt_gatt_read_by_type(), discover_chrcs_cb(), discover_descs_cb(), discover_included_cb(), discover_services(), discovery_op_complete(), find_by_type_val_cb(), read_by_grp_type_cb(), read_by_type_cb(), read_included_cb(), and read_included_unref().
struct bt_gatt_request* bt_gatt_discover_all_primary_services | ( | struct bt_att * | att, |
bt_uuid_t * | uuid, | ||
bt_gatt_request_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_destroy_func_t | destroy | ||
) |
Definition at line 925 of file gatt-helpers.c.
References bt_gatt_discover_primary_services().
Referenced by exchange_mtu_cb().
struct bt_gatt_request* bt_gatt_discover_characteristics | ( | struct bt_att * | att, |
uint16_t | start, | ||
uint16_t | end, | ||
bt_gatt_request_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_destroy_func_t | destroy | ||
) |
Definition at line 1311 of file gatt-helpers.c.
References async_req_unref(), bt_gatt_request::att, BT_ATT_OP_READ_BY_TYPE_REQ, bt_att_send(), bt_gatt_request_ref(), bt_gatt_request::callback, bt_gatt_request::destroy, discover_chrcs_cb(), bt_gatt_request::end_handle, GATT_CHARAC_UUID, bt_gatt_request::id, new0, put_le16(), bt_gatt_request::start_handle, and bt_gatt_request::user_data.
Referenced by discover_chrcs_cb(), discover_descs_cb(), and discover_incl_cb().
struct bt_gatt_request* bt_gatt_discover_descriptors | ( | struct bt_att * | att, |
uint16_t | start, | ||
uint16_t | end, | ||
bt_gatt_request_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_destroy_func_t | destroy | ||
) |
Definition at line 1544 of file gatt-helpers.c.
References async_req_unref(), bt_gatt_request::att, BT_ATT_OP_FIND_INFO_REQ, bt_att_send(), bt_gatt_request_ref(), bt_gatt_request::callback, bt_gatt_request::destroy, discover_descs_cb(), bt_gatt_request::end_handle, bt_gatt_request::id, new0, put_le16(), bt_gatt_request::start_handle, and bt_gatt_request::user_data.
Referenced by discover_descs().
struct bt_gatt_request* bt_gatt_discover_included_services | ( | struct bt_att * | att, |
uint16_t | start, | ||
uint16_t | end, | ||
bt_gatt_request_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_destroy_func_t | destroy | ||
) |
Definition at line 1194 of file gatt-helpers.c.
References async_req_unref(), bt_gatt_request::att, BT_ATT_OP_READ_BY_TYPE_REQ, bt_att_send(), bt_gatt_request_ref(), bt_gatt_request::callback, bt_gatt_request::destroy, discover_included_cb(), bt_gatt_request::end_handle, GATT_INCLUDE_UUID, bt_gatt_request::id, new0, put_le16(), bt_gatt_request::start_handle, and bt_gatt_request::user_data.
Referenced by discover_incl_cb(), and discover_secondary_cb().
struct bt_gatt_request* bt_gatt_discover_primary_services | ( | struct bt_att * | att, |
bt_uuid_t * | uuid, | ||
uint16_t | start, | ||
uint16_t | end, | ||
bt_gatt_request_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_destroy_func_t | destroy | ||
) |
Definition at line 936 of file gatt-helpers.c.
References discover_services().
Referenced by bt_gatt_discover_all_primary_services(), and process_service_changed().
struct bt_gatt_request* bt_gatt_discover_secondary_services | ( | struct bt_att * | att, |
bt_uuid_t * | uuid, | ||
uint16_t | start, | ||
uint16_t | end, | ||
bt_gatt_request_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_destroy_func_t | destroy | ||
) |
Definition at line 947 of file gatt-helpers.c.
References discover_services().
Referenced by discover_primary_cb().
unsigned int bt_gatt_exchange_mtu | ( | struct bt_att * | att, |
uint16_t | client_rx_mtu, | ||
bt_gatt_result_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_destroy_func_t | destroy | ||
) |
Exchange MTU trigger
att | pointer to bt_att data structure |
client_rx_mtu | mtu client size |
callback | user callback to call from mtu_cb (set in mtu_op internal data structure) |
user_data | pointer for user, set in the mtu_op internal data structure |
destroy | housekeeping data management function set in the mtu_op internal data structure |
Definition at line 582 of file gatt-helpers.c.
References mtu_op::att, BT_ATT_OP_MTU_REQ, bt_att_send(), mtu_op::callback, mtu_op::client_rx_mtu, mtu_op::destroy, destroy_mtu_op(), mtu_cb(), new0, put_le16(), and mtu_op::user_data.
Referenced by gatt_client_init().
bool bt_gatt_iter_init | ( | struct bt_gatt_iter * | iter, |
struct bt_gatt_result * | result | ||
) |
Definition at line 188 of file gatt-helpers.c.
References bt_gatt_iter::pos, and bt_gatt_iter::result.
Referenced by discover_chrcs_cb(), discover_descs_cb(), discover_incl_cb(), discover_primary_cb(), and discover_secondary_cb().
bool bt_gatt_iter_next_characteristic | ( | struct bt_gatt_iter * | iter, |
uint16_t * | start_handle, | ||
uint16_t * | end_handle, | ||
uint16_t * | value_handle, | ||
uint8_t * | properties, | ||
uint8_t | uuid[16] | ||
) |
Definition at line 378 of file gatt-helpers.c.
References BT_ATT_OP_READ_BY_TYPE_RSP, convert_uuid_le(), bt_gatt_result::data_len, bt_gatt_request::end_handle, get_le16(), bt_gatt_result::next, bt_gatt_result::op, bt_gatt_result::opcode, bt_gatt_result::pdu, bt_gatt_result::pdu_len, bt_gatt_iter::pos, bt_gatt_iter::result, bt_uuid_t::type, and bt_gatt_request::uuid.
Referenced by discover_chrcs_cb().
bool bt_gatt_iter_next_descriptor | ( | struct bt_gatt_iter * | iter, |
uint16_t * | handle, | ||
uint8_t | uuid[16] | ||
) |
Definition at line 430 of file gatt-helpers.c.
References BT_ATT_OP_FIND_INFO_RSP, convert_uuid_le(), bt_gatt_result::data_len, get_le16(), bt_gatt_result::next, bt_gatt_result::opcode, bt_gatt_result::pdu, bt_gatt_result::pdu_len, bt_gatt_iter::pos, and bt_gatt_iter::result.
Referenced by discover_descs_cb().
bool bt_gatt_iter_next_included_service | ( | struct bt_gatt_iter * | iter, |
uint16_t * | handle, | ||
uint16_t * | start_handle, | ||
uint16_t * | end_handle, | ||
uint8_t | uuid[16] | ||
) |
Definition at line 257 of file gatt-helpers.c.
References BT_ATT_OP_READ_BY_TYPE_RSP, convert_uuid_le(), bt_gatt_result::data_len, get_le16(), bt_gatt_result::next, bt_gatt_result::op, bt_gatt_result::opcode, bt_gatt_result::pdu, bt_gatt_result::pdu_len, bt_gatt_iter::pos, bt_gatt_iter::result, bt_uuid_t::type, and bt_gatt_request::uuid.
Referenced by discover_incl_cb().
bool bt_gatt_iter_next_read_by_type | ( | struct bt_gatt_iter * | iter, |
uint16_t * | handle, | ||
uint16_t * | length, | ||
const uint8_t ** | value | ||
) |
Definition at line 455 of file gatt-helpers.c.
References BT_ATT_OP_READ_BY_TYPE_RSP, bt_gatt_result::data_len, get_le16(), bt_gatt_result::next, bt_gatt_result::op, bt_gatt_result::opcode, bt_gatt_result::pdu, bt_gatt_result::pdu_len, bt_gatt_iter::pos, bt_gatt_iter::result, bt_uuid_t::type, and bt_gatt_request::uuid.
bool bt_gatt_iter_next_service | ( | struct bt_gatt_iter * | iter, |
uint16_t * | start_handle, | ||
uint16_t * | end_handle, | ||
uint8_t | uuid[16] | ||
) |
Definition at line 337 of file gatt-helpers.c.
References BT_ATT_OP_FIND_BY_TYPE_VAL_RSP, BT_ATT_OP_READ_BY_GRP_TYPE_RSP, bt_uuid_to_uuid128(), convert_uuid_le(), uint128_t::data, bt_gatt_result::data_len, get_le16(), bt_gatt_result::next, bt_gatt_result::op, bt_gatt_result::opcode, bt_gatt_result::pdu, bt_gatt_result::pdu_len, bt_gatt_iter::pos, bt_gatt_iter::result, bt_uuid_t::u128, bt_gatt_request::uuid, and bt_uuid_t::value.
Referenced by discover_primary_cb(), and discover_secondary_cb().
bool bt_gatt_read_by_type | ( | struct bt_att * | att, |
uint16_t | start, | ||
uint16_t | end, | ||
const bt_uuid_t * | uuid, | ||
bt_gatt_request_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_destroy_func_t | destroy | ||
) |
Definition at line 1421 of file gatt-helpers.c.
References async_req_unref(), bt_gatt_request::att, BT_ATT_OP_READ_BY_TYPE_REQ, bt_att_send(), bt_gatt_request_ref(), bt_uuid_to_le(), bt_gatt_request::callback, bt_gatt_request::destroy, bt_gatt_request::end_handle, get_uuid_len(), bt_gatt_request::id, new0, put_le16(), read_by_type_cb(), bt_gatt_request::start_handle, bt_uuid_t::type, bt_gatt_request::user_data, and bt_gatt_request::uuid.
void bt_gatt_request_cancel | ( | struct bt_gatt_request * | req | ) |
Definition at line 650 of file gatt-helpers.c.
References bt_gatt_request::att, bt_att_cancel(), and bt_gatt_request::id.
Referenced by bt_gatt_client_cancel_all(), and bt_gatt_request_unref().
struct bt_gatt_request* bt_gatt_request_ref | ( | struct bt_gatt_request * | req | ) |
Definition at line 622 of file gatt-helpers.c.
References bt_gatt_request::ref_count.
Referenced by bt_gatt_discover_characteristics(), bt_gatt_discover_descriptors(), bt_gatt_discover_included_services(), bt_gatt_read_by_type(), discover_chrcs_cb(), discover_descs_cb(), discover_included_cb(), discover_services(), find_by_type_val_cb(), new_read_included(), read_by_grp_type_cb(), read_by_type_cb(), and read_included_cb().
void bt_gatt_request_unref | ( | struct bt_gatt_request * | req | ) |
Definition at line 632 of file gatt-helpers.c.
References bt_gatt_request_cancel(), bt_gatt_request::destroy, bt_gatt_request::ref_count, result_destroy(), bt_gatt_request::result_head, and bt_gatt_request::user_data.
Referenced by async_req_unref(), bt_gatt_client_cancel_all(), and discovery_req_clear().
unsigned int bt_gatt_result_characteristic_count | ( | struct bt_gatt_result * | result | ) |
Definition at line 128 of file gatt-helpers.c.
References BT_ATT_OP_READ_BY_TYPE_RSP, bt_gatt_result::data_len, bt_gatt_result::opcode, and result_element_count().
Referenced by discover_chrcs_cb().
unsigned int bt_gatt_result_descriptor_count | ( | struct bt_gatt_result * | result | ) |
Definition at line 149 of file gatt-helpers.c.
References BT_ATT_OP_FIND_INFO_RSP, bt_gatt_result::opcode, and result_element_count().
Referenced by discover_descs_cb().
unsigned int bt_gatt_result_included_count | ( | struct bt_gatt_result * | result | ) |
Definition at line 160 of file gatt-helpers.c.
References BT_ATT_OP_READ_BY_TYPE_RSP, bt_gatt_result::data_len, bt_gatt_result::next, bt_gatt_result::opcode, and bt_gatt_result::pdu_len.
Referenced by discover_incl_cb().
unsigned int bt_gatt_result_service_count | ( | struct bt_gatt_result * | result | ) |
Definition at line 116 of file gatt-helpers.c.
References BT_ATT_OP_FIND_BY_TYPE_VAL_RSP, BT_ATT_OP_READ_BY_GRP_TYPE_RSP, bt_gatt_result::opcode, and result_element_count().
Referenced by discover_primary_cb(), and discover_secondary_cb().
|
static |
Definition at line 204 of file gatt-helpers.c.
References bswap_128(), and bt_base_uuid.
Referenced by bt_gatt_iter_next_characteristic(), bt_gatt_iter_next_descriptor(), bt_gatt_iter_next_included_service(), and bt_gatt_iter_next_service().
|
static |
Definition at line 499 of file gatt-helpers.c.
References mtu_op::destroy, and mtu_op::user_data.
Referenced by bt_gatt_exchange_mtu().
|
static |
Definition at line 1232 of file gatt-helpers.c.
References async_req_unref(), bt_gatt_request::att, BT_ATT_OP_ERROR_RSP, BT_ATT_OP_READ_BY_TYPE_REQ, BT_ATT_OP_READ_BY_TYPE_RSP, bt_att_send(), bt_gatt_request_ref(), discovery_op_complete(), bt_gatt_request::end_handle, GATT_CHARAC_UUID, get_le16(), bt_gatt_request::id, process_error(), put_le16(), result_append(), bt_gatt_request::start_handle, and bt_gatt_request::user_data.
Referenced by bt_gatt_discover_characteristics().
|
static |
Definition at line 1460 of file gatt-helpers.c.
References async_req_unref(), bt_gatt_request::att, BT_ATT_OP_ERROR_RSP, BT_ATT_OP_FIND_INFO_REQ, BT_ATT_OP_FIND_INFO_RSP, bt_att_send(), bt_gatt_request_ref(), discovery_op_complete(), bt_gatt_request::end_handle, get_le16(), bt_gatt_request::id, process_error(), put_le16(), result_append(), bt_gatt_request::start_handle, and bt_gatt_request::user_data.
Referenced by bt_gatt_discover_descriptors().
|
static |
Definition at line 1099 of file gatt-helpers.c.
References async_req_unref(), bt_gatt_request::att, BT_ATT_OP_ERROR_RSP, BT_ATT_OP_READ_BY_TYPE_REQ, BT_ATT_OP_READ_BY_TYPE_RSP, bt_att_send(), bt_gatt_request_ref(), discovery_op_complete(), bt_gatt_request::end_handle, GATT_INCLUDE_UUID, get_le16(), bt_gatt_request::id, new_read_included(), process_error(), put_le16(), read_included(), result_append(), bt_gatt_request::start_handle, and bt_gatt_request::user_data.
Referenced by bt_gatt_discover_included_services(), and read_included_cb().
|
static |
Definition at line 855 of file gatt-helpers.c.
References async_req_unref(), bt_gatt_request::att, BT_ATT_OP_FIND_BY_TYPE_VAL_REQ, BT_ATT_OP_READ_BY_GRP_TYPE_REQ, bt_att_send(), bt_gatt_request_ref(), bt_uuid_to_le(), bt_gatt_request::callback, bt_gatt_request::destroy, bt_gatt_request::end_handle, find_by_type_val_cb(), GATT_PRIM_SVC_UUID, GATT_SND_SVC_UUID, get_uuid_len(), bt_gatt_request::id, new0, put_le16(), read_by_grp_type_cb(), bt_gatt_request::service_type, bt_gatt_request::start_handle, bt_uuid_t::type, bt_gatt_request::user_data, and bt_gatt_request::uuid.
Referenced by bt_gatt_discover_primary_services(), and bt_gatt_discover_secondary_services().
|
static |
Definition at line 669 of file gatt-helpers.c.
References async_req_unref(), BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND, bt_gatt_request::callback, bt_gatt_request::id, bt_gatt_request::result_head, and bt_gatt_request::user_data.
Referenced by discover_chrcs_cb(), discover_descs_cb(), discover_included_cb(), find_by_type_val_cb(), read_by_grp_type_cb(), read_by_type_cb(), and read_included_cb().
|
static |
Definition at line 782 of file gatt-helpers.c.
References async_req_unref(), bt_gatt_request::att, BT_ATT_OP_ERROR_RSP, BT_ATT_OP_FIND_BY_TYPE_VAL_REQ, BT_ATT_OP_FIND_BY_TYPE_VAL_RSP, bt_att_send(), bt_gatt_request_ref(), bt_uuid_to_le(), discovery_op_complete(), bt_gatt_request::end_handle, get_le16(), get_uuid_len(), bt_gatt_request::id, process_error(), put_le16(), result_append(), bt_gatt_request::service_type, bt_gatt_request::start_handle, bt_gatt_request::user_data, and bt_gatt_request::uuid.
Referenced by discover_services().
|
inlinestatic |
Definition at line 614 of file gatt-helpers.c.
References bt_uuid_t::type.
Referenced by bt_gatt_read_by_type(), discover_services(), find_by_type_val_cb(), and read_by_type_cb().
|
static |
opcode | |
pdu | |
length | |
user_data |
Definition at line 528 of file gatt-helpers.c.
References mtu_op::att, BT_ATT_OP_ERROR_RSP, BT_ATT_OP_MTU_RSP, bt_att_set_mtu(), mtu_op::callback, mtu_op::client_rx_mtu, get_le16(), MIN, process_error(), and mtu_op::user_data.
Referenced by bt_gatt_exchange_mtu().
|
static |
Definition at line 965 of file gatt-helpers.c.
References bt_gatt_request_ref(), new0, bt_gatt_result::op, read_incl_data::op, and read_incl_data::result.
Referenced by discover_included_cb().
|
static |
Definition at line 509 of file gatt-helpers.c.
References bt_att_pdu_error_rsp::ecode.
Referenced by discover_chrcs_cb(), discover_descs_cb(), discover_included_cb(), find_by_type_val_cb(), mtu_cb(), read_by_grp_type_cb(), read_by_type_cb(), and read_included_cb().
|
static |
Definition at line 687 of file gatt-helpers.c.
References async_req_unref(), bt_gatt_request::att, BT_ATT_OP_ERROR_RSP, BT_ATT_OP_READ_BY_GRP_TYPE_REQ, BT_ATT_OP_READ_BY_GRP_TYPE_RSP, bt_att_send(), bt_gatt_request_ref(), discovery_op_complete(), bt_gatt_request::end_handle, get_le16(), bt_gatt_request::id, bt_gatt_result::pdu, process_error(), put_le16(), result_append(), bt_gatt_request::service_type, bt_gatt_request::start_handle, and bt_gatt_request::user_data.
Referenced by discover_services().
|
static |
Definition at line 1349 of file gatt-helpers.c.
References async_req_unref(), bt_gatt_request::att, BT_ATT_OP_ERROR_RSP, BT_ATT_OP_READ_BY_TYPE_REQ, BT_ATT_OP_READ_BY_TYPE_RSP, bt_att_send(), bt_gatt_request_ref(), bt_uuid_to_le(), discovery_op_complete(), bt_gatt_request::end_handle, get_le16(), get_uuid_len(), bt_gatt_request::id, process_error(), put_le16(), result_append(), bt_gatt_request::start_handle, bt_gatt_request::user_data, and bt_gatt_request::uuid.
Referenced by bt_gatt_read_by_type().
|
static |
Definition at line 1078 of file gatt-helpers.c.
References bt_gatt_request::att, BT_ATT_OP_READ_REQ, bt_att_send(), bt_gatt_request::callback, bt_gatt_result::data_len, read_incl_data::op, bt_gatt_result::pdu, read_incl_data::pos, read_included_cb(), read_included_ref(), read_included_unref(), read_incl_data::result, and bt_gatt_request::user_data.
Referenced by discover_included_cb().
|
static |
Definition at line 1001 of file gatt-helpers.c.
References async_req_unref(), bt_gatt_request::att, BT_ATT_OP_ERROR_RSP, BT_ATT_OP_READ_BY_TYPE_REQ, BT_ATT_OP_READ_REQ, BT_ATT_OP_READ_RSP, bt_att_send(), bt_gatt_request_ref(), bt_gatt_result::data_len, discover_included_cb(), discovery_op_complete(), bt_gatt_request::end_handle, GATT_INCLUDE_UUID, get_le16(), bt_gatt_request::id, read_incl_data::op, bt_gatt_result::pdu, bt_gatt_result::pdu_len, read_incl_data::pos, process_error(), put_le16(), read_included_ref(), read_included_unref(), read_incl_data::result, and result_append().
Referenced by read_included().
|
static |
Definition at line 979 of file gatt-helpers.c.
References read_incl_data::ref_count.
Referenced by read_included(), and read_included_cb().
|
static |
Definition at line 986 of file gatt-helpers.c.
References async_req_unref(), read_incl_data::op, and read_incl_data::ref_count.
Referenced by read_included(), and read_included_cb().
|
static |
Definition at line 236 of file gatt-helpers.c.
References bt_gatt_result::next, result_create(), bt_gatt_request::result_head, and bt_gatt_request::result_tail.
Referenced by discover_chrcs_cb(), discover_descs_cb(), discover_included_cb(), find_by_type_val_cb(), read_by_grp_type_cb(), read_by_type_cb(), and read_included_cb().
|
static |
Definition at line 60 of file gatt-helpers.c.
References bt_gatt_result::data_len, new0, bt_gatt_result::op, bt_gatt_result::opcode, opcode, bt_gatt_result::pdu, and bt_gatt_result::pdu_len.
Referenced by result_append().
|
static |
Definition at line 87 of file gatt-helpers.c.
References bt_gatt_result::next, and bt_gatt_result::pdu.
Referenced by bt_gatt_request_unref().
|
static |
Definition at line 101 of file gatt-helpers.c.
References bt_gatt_result::data_len, bt_gatt_result::next, and bt_gatt_result::pdu_len.
Referenced by bt_gatt_result_characteristic_count(), bt_gatt_result_descriptor_count(), and bt_gatt_result_service_count().
|
static |
Definition at line 199 of file gatt-helpers.c.
Referenced by convert_uuid_le().