Lines Matching refs:uuid
153 union uuid { union
154 struct bt_uuid uuid; member
163 const union uuid *u = CONTAINER_OF(pattern->uuid, union uuid, uuid); in gatt_db_add()
164 size_t uuid_size = u->uuid.type == BT_UUID_TYPE_16 ? sizeof(u->u16) : in gatt_db_add()
180 attr->uuid = server_buf_push(uuid_size); in gatt_db_add()
181 memcpy((void *) attr->uuid, &u->uuid, uuid_size); in gatt_db_add()
198 static uint8_t btp2bt_uuid(const uint8_t *uuid, uint8_t len, in btp2bt_uuid() argument
206 memcpy(&le16, uuid, sizeof(le16)); in btp2bt_uuid()
211 memcpy(BT_UUID_128(bt_uuid)->val, uuid, 16); in btp2bt_uuid()
294 union uuid uuid; in add_service() local
302 if (btp2bt_uuid(cp->uuid, cp->uuid_length, &uuid.uuid)) { in add_service()
306 uuid_size = uuid.uuid.type == BT_UUID_TYPE_16 ? sizeof(uuid.u16) : in add_service()
307 sizeof(uuid.u128); in add_service()
321 BT_GATT_PRIMARY_SERVICE(&uuid.uuid), in add_service()
326 BT_GATT_SECONDARY_SERVICE(&uuid.uuid), in add_service()
429 const struct bt_uuid *uuid; member
474 BT_GATT_ATTRIBUTE(ch->uuid, in alloc_characteristic()
487 chrc_data->uuid = attr_value->uuid; in alloc_characteristic()
499 union uuid uuid; in add_characteristic() local
510 cmd_data.uuid = &uuid.uuid; in add_characteristic()
512 if (btp2bt_uuid(cp->uuid, cp->uuid_length, &uuid.uuid)) { in add_characteristic()
603 const struct bt_uuid *uuid; member
612 if (!bt_uuid_cmp(d->uuid, BT_UUID_GATT_CEP)) { in alloc_descriptor()
614 } else if (!bt_uuid_cmp(d->uuid, BT_UUID_GATT_CCC)) { in alloc_descriptor()
649 BT_GATT_DESCRIPTOR(d->uuid, in alloc_descriptor()
669 if (!bt_uuid_cmp(tmp->uuid, BT_UUID_GATT_PRIMARY) || in get_base_chrc()
670 !bt_uuid_cmp(tmp->uuid, BT_UUID_GATT_SECONDARY)) { in get_base_chrc()
674 if (!bt_uuid_cmp(tmp->uuid, BT_UUID_GATT_CHRC)) { in get_base_chrc()
689 union uuid uuid; in add_descriptor() local
704 cmd_data.uuid = &uuid.uuid; in add_descriptor()
706 if (btp2bt_uuid(cp->uuid, cp->uuid_length, &uuid.uuid)) { in add_descriptor()
775 if (bt_uuid_cmp(svc->uuid, BT_UUID_GATT_PRIMARY) && in add_included()
776 bt_uuid_cmp(svc->uuid, BT_UUID_GATT_SECONDARY)) { in add_included()
830 if (!bt_uuid_cmp(attr->uuid, BT_UUID_GATT_CCC)) { in alloc_value()
835 if (!bt_uuid_cmp(attr->uuid, BT_UUID_GATT_CEP)) { in alloc_value()
939 if (!bt_uuid_cmp(attr->uuid, BT_UUID_GATT_PRIMARY) || in set_attr_enc_key_size()
940 !bt_uuid_cmp(attr->uuid, BT_UUID_GATT_SECONDARY) || in set_attr_enc_key_size()
941 !bt_uuid_cmp(attr->uuid, BT_UUID_GATT_INCLUDE)) { in set_attr_enc_key_size()
1025 static union uuid uuid; variable
1052 uuid_length = data->uuid->type == BT_UUID_TYPE_16 ? 2 : 16; in disc_prim_cb()
1065 if (data->uuid->type == BT_UUID_TYPE_16) { in disc_prim_cb()
1066 uint16_t u16 = sys_cpu_to_le16(BT_UUID_16(data->uuid)->val); in disc_prim_cb()
1068 memcpy(service->uuid, &u16, uuid_length); in disc_prim_cb()
1070 memcpy(service->uuid, BT_UUID_128(data->uuid)->val, in disc_prim_cb()
1095 discover_params.uuid = NULL; in disc_all_prim()
1131 if (btp2bt_uuid(cp->uuid, cp->uuid_length, &uuid.uuid)) { in disc_prim_uuid()
1141 discover_params.uuid = &uuid.uuid; in disc_prim_uuid()
1179 uuid_length = data->uuid->type == BT_UUID_TYPE_16 ? 2 : 16; in find_included_cb()
1193 if (data->uuid->type == BT_UUID_TYPE_16) { in find_included_cb()
1194 uint16_t u16 = sys_cpu_to_le16(BT_UUID_16(data->uuid)->val); in find_included_cb()
1196 memcpy(included->service.uuid, &u16, uuid_length); in find_included_cb()
1198 memcpy(included->service.uuid, BT_UUID_128(data->uuid)->val, in find_included_cb()
1258 uuid_length = data->uuid->type == BT_UUID_TYPE_16 ? 2 : 16; in disc_chrc_cb()
1272 if (data->uuid->type == BT_UUID_TYPE_16) { in disc_chrc_cb()
1273 uint16_t u16 = sys_cpu_to_le16(BT_UUID_16(data->uuid)->val); in disc_chrc_cb()
1275 memcpy(chrc->uuid, &u16, uuid_length); in disc_chrc_cb()
1277 memcpy(chrc->uuid, BT_UUID_128(data->uuid)->val, uuid_length); in disc_chrc_cb()
1337 if (btp2bt_uuid(cp->uuid, cp->uuid_length, &uuid.uuid)) { in disc_chrc_uuid()
1347 discover_params.uuid = &uuid.uuid; in disc_chrc_uuid()
1383 uuid_length = attr->uuid->type == BT_UUID_TYPE_16 ? 2 : 16; in disc_all_desc_cb()
1395 if (attr->uuid->type == BT_UUID_TYPE_16) { in disc_all_desc_cb()
1396 uint16_t u16 = sys_cpu_to_le16(BT_UUID_16(attr->uuid)->val); in disc_all_desc_cb()
1398 memcpy(descriptor->uuid, &u16, uuid_length); in disc_all_desc_cb()
1400 memcpy(descriptor->uuid, BT_UUID_128(attr->uuid)->val, in disc_all_desc_cb()
1575 if (btp2bt_uuid(cp->uuid, cp->uuid_length, &uuid.uuid)) { in read_uuid()
1585 read_params.by_uuid.uuid = &uuid.uuid; in read_uuid()
2144 params[i].uuid = 0; in notify_mult()
2167 const struct bt_uuid *uuid; member
2177 if (foreach->uuid && bt_uuid_cmp(foreach->uuid, attr->uuid)) { in get_attrs_rp()
2186 if (attr->uuid->type == BT_UUID_TYPE_16) { in get_attrs_rp()
2189 BT_UUID_16(attr->uuid)->val); in get_attrs_rp()
2193 BT_UUID_128(attr->uuid)->val, in get_attrs_rp()
2210 union uuid search_uuid; in get_attrs()
2223 if (btp2bt_uuid(cp->type, cp->type_length, &search_uuid.uuid)) { in get_attrs()
2227 bt_uuid_to_str(&search_uuid.uuid, uuid_str, sizeof(uuid_str)); in get_attrs()
2231 foreach.uuid = &search_uuid.uuid; in get_attrs()
2235 foreach.uuid = NULL; in get_attrs()