Lines Matching full:handle
205 uint16_t handle, uint16_t start_handle, in gatt_foreach_iter() argument
214 if (handle > end_handle) { in gatt_foreach_iter()
218 /* Check if attribute handle is within range */ in gatt_foreach_iter()
219 if (handle < start_handle) { in gatt_foreach_iter()
235 result = func(attr, handle, user_data); in gatt_foreach_iter()
258 if (next->attrs[0].handle <= start_handle) { in foreach_attr_type_dyndb()
266 if (gatt_foreach_iter(attr, attr->handle, start_handle, end_handle, uuid, in foreach_attr_type_dyndb()
290 uint16_t handle = 1; in bt_gatt_foreach_attr_type() local
294 if (handle + static_svc->attr_count < start_handle) { in bt_gatt_foreach_attr_type()
295 handle += static_svc->attr_count; in bt_gatt_foreach_attr_type()
299 for (i = 0; i < static_svc->attr_count; i++, handle++) { in bt_gatt_foreach_attr_type()
301 handle, start_handle, in bt_gatt_foreach_attr_type()
329 static uint8_t found_attr(const struct bt_gatt_attr *attr, uint16_t handle, void *user_data) in found_attr() argument
339 static const struct bt_gatt_attr *find_attr(uint16_t handle) in find_attr() argument
343 bt_gatt_foreach_attr(handle, handle, found_attr, &attr); in find_attr()
353 if (last_handle == 0 || svc->attrs[0].handle > last_handle) { in gatt_insert()
360 if (tmp->attrs[0].handle > svc->attrs[0].handle) { in gatt_insert()
377 uint16_t handle, last_handle; in gatt_register() local
382 handle = last_static_handle; in gatt_register()
388 handle = last->attrs[last->attr_count - 1].handle; in gatt_register()
389 last_handle = handle; in gatt_register()
394 if (!attrs->handle) { in gatt_register()
395 /* Allocate handle if not set already */ in gatt_register()
396 attrs->handle = ++handle; in gatt_register()
397 } else if (attrs->handle > handle) { in gatt_register()
398 /* Use existing handle if valid */ in gatt_register()
399 handle = attrs->handle; in gatt_register()
400 } else if (find_attr(attrs->handle)) { in gatt_register()
402 LOG_ERR("Mock: Unable to register handle 0x%04x", attrs->handle); in gatt_register()
406 LOG_DBG("attr %p handle 0x%04x uuid %s perm 0x%02x", attrs, attrs->handle, in gatt_register()
476 LOG_DBG("handle 0x%04x offset %u length %u", attr->handle, offset, len); in bt_gatt_attr_read()
532 .handle = start_handle, in bt_gatt_discover()