/device/soc/esp/esp32/components/bt/host/bluedroid/stack/gatt/ |
D | gatt_db.c | 42 static BOOLEAN allocate_svc_db_buf(tGATT_SVC_DB *p_db); 43 static void *allocate_attr_in_db(tGATT_SVC_DB *p_db, tBT_UUID *p_uuid, tGATT_PERM perm); 44 static BOOLEAN deallocate_attr_in_db(tGATT_SVC_DB *p_db, void *p_attr); 45 static BOOLEAN copy_extra_byte_in_db(tGATT_SVC_DB *p_db, void **p_dst, UINT16 len); 47 static BOOLEAN gatts_db_add_service_declaration(tGATT_SVC_DB *p_db, tBT_UUID *p_service, BOOLEAN is… 64 BOOLEAN gatts_init_service_db (tGATT_SVC_DB *p_db, tBT_UUID *p_service, BOOLEAN is_pri, in gatts_init_service_db() argument 67 if (p_db->svc_buffer == NULL) { //in case already alloc in gatts_init_service_db() 68 p_db->svc_buffer = fixed_queue_new(QUEUE_SIZE_MAX); in gatts_init_service_db() 71 if (!allocate_svc_db_buf(p_db)) { in gatts_init_service_db() 80 p_db->next_handle = s_hdl; in gatts_init_service_db() [all …]
|
D | gatt_sr.c | 511 if ((err = gatts_read_attr_perm_check( gatt_cb.sr_reg[i_rcb].p_db, in gatt_process_read_multi_req() 550 gatt_cb.sr_reg[i_rcb].p_db, in gatt_process_read_multi_req() 616 if ((p_uuid = gatts_get_service_uuid (p_rcb->p_db)) != NULL) { in gatt_build_primary_service_rsp() 686 if (!p_rcb->p_db || !p_rcb->p_db->p_attr_list) { in gatt_build_find_info_rsp() 691 p_attr = (tGATT_ATTR16 *) p_rcb->p_db->p_attr_list; in gatt_build_find_info_rsp() 1051 p_rcb->p_db, in gatts_process_read_by_type_req() 1141 status = gatts_write_attr_perm_check (gatt_cb.sr_reg[i_rcb].p_db, in gatts_process_write_req() 1154 status = gatts_write_attr_value_by_handle(gatt_cb.sr_reg[i_rcb].p_db, in gatts_process_write_req() 1210 tGATT_SVC_DB *p_db; in gatt_attr_process_prepare_write() local 1234 status = gatts_write_attr_perm_check (gatt_cb.sr_reg[i_rcb].p_db, in gatt_attr_process_prepare_write() [all …]
|
D | gatt_utils.c | 444 tGATT_SVC_DB *p_db = &(p->svc_db); in gatt_free_attr_value_buffer() local 445 tGATT_ATTR16 *p_attr = p_db->p_attr_list; in gatt_free_attr_value_buffer() 530 p_svc_uuid = gatts_get_service_uuid (p_rcb->p_db); in gatt_is_last_attribute() 1414 p_this_uuid = gatts_get_service_uuid (p_sreg->p_db); in gatt_sr_find_i_rcb_by_app_id() 1456 p_sreg->p_db = &p_list->svc_db; in gatt_sr_alloc_rcb() 1458 … GATT_TRACE_DEBUG ("total buffer in db [%d]", fixed_queue_length(p_sreg->p_db->svc_buffer)); in gatt_sr_alloc_rcb()
|
D | gatt_api.c | 488 p_uuid = gatts_get_service_uuid (p_sreg->p_db); in GATTS_StartService()
|
/device/soc/esp/esp32/components/bt/host/bluedroid/stack/sdp/ |
D | sdp_discovery.c | 52 static tSDP_DISC_REC *add_record (tSDP_DISCOVERY_DB *p_db, BD_ADDR p_bda); 53 static UINT8 *add_attr (UINT8 *p, tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_rec, 139 p = sdpu_build_uuid_seq (p, 1, &p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx]); in sdp_snd_service_search_req() 141 p = sdpu_build_uuid_seq (p, p_ccb->p_db->num_uuid_filters, p_ccb->p_db->uuid_filters); in sdp_snd_service_search_req() 348 if (p_ccb->p_db->raw_data) { in sdp_copy_raw_data() 349 cpy_len = p_ccb->p_db->raw_size - p_ccb->p_db->raw_used; in sdp_copy_raw_data() 362 list_len, cpy_len, p_ccb->p_db->raw_size, p_ccb->p_db->raw_used); in sdp_copy_raw_data() 365 memcpy (&p_ccb->p_db->raw_data[p_ccb->p_db->raw_used], p, cpy_len); in sdp_copy_raw_data() 366 p_ccb->p_db->raw_used += cpy_len; in sdp_copy_raw_data() 484 if (p_ccb->p_db->num_attr_filters) { in process_service_attr_rsp() [all …]
|
D | sdp_api.c | 65 BOOLEAN SDP_InitDiscoveryDb (tSDP_DISCOVERY_DB *p_db, UINT32 len, UINT16 num_uuid, in SDP_InitDiscoveryDb() argument 72 if (p_db == NULL || (sizeof (tSDP_DISCOVERY_DB) > len) || in SDP_InitDiscoveryDb() 75 (UINT32)p_db, len, num_uuid, num_attr); in SDP_InitDiscoveryDb() 80 memset (p_db, 0, (size_t)len); in SDP_InitDiscoveryDb() 82 p_db->mem_size = len - sizeof (tSDP_DISCOVERY_DB); in SDP_InitDiscoveryDb() 83 p_db->mem_free = p_db->mem_size; in SDP_InitDiscoveryDb() 84 p_db->p_first_rec = NULL; in SDP_InitDiscoveryDb() 85 p_db->p_free_mem = (UINT8 *)(p_db + 1); in SDP_InitDiscoveryDb() 88 p_db->uuid_filters[xx] = *p_uuid_list++; in SDP_InitDiscoveryDb() 91 p_db->num_uuid_filters = num_uuid; in SDP_InitDiscoveryDb() [all …]
|
D | sdp_main.c | 589 if ((p_ccb->cur_uuid_idx == 0) && (p_ccb->p_db->p_first_rec)) { in sdp_disconnect() 590 p_ccb->cur_uuid_idx = p_ccb->p_db->num_uuid_filters; in sdp_disconnect() 593 while (++p_ccb->cur_uuid_idx < p_ccb->p_db->num_uuid_filters) { in sdp_disconnect() 595 if ((p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx].len == 2) in sdp_disconnect() 596 && (SDP_FindServiceInDb (p_ccb->p_db, in sdp_disconnect() 597 … p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx].uu.uuid16, in sdp_disconnect() 602 if ((p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx].len > 2) in sdp_disconnect() 603 && (SDP_FindServiceUUIDInDb (p_ccb->p_db, in sdp_disconnect() 604 … &p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx], NULL))) { in sdp_disconnect() 618 if ((reason == SDP_NO_RECS_MATCH) && (p_ccb->p_db->p_first_rec)) { in sdp_disconnect()
|
D | sdp_utils.c | 85 tCONN_CB *sdpu_find_ccb_by_db (tSDP_DISCOVERY_DB *p_db) in sdpu_find_ccb_by_db() argument 91 if (p_db) { in sdpu_find_ccb_by_db() 94 if ((p_ccb->con_state != SDP_STATE_IDLE) && (p_ccb->p_db == p_db)) { in sdpu_find_ccb_by_db() 801 void sdpu_sort_attr_list( UINT16 num_attr, tSDP_DISCOVERY_DB *p_db ) in sdpu_sort_attr_list() argument 815 if ( p_db->attr_filters[i] > p_db->attr_filters[i + 1] ) { in sdpu_sort_attr_list() 817 x = p_db->attr_filters[i]; in sdpu_sort_attr_list() 818 p_db->attr_filters[i] = p_db->attr_filters[i + 1]; in sdpu_sort_attr_list() 819 p_db->attr_filters[i + 1] = x; in sdpu_sort_attr_list()
|
D | sdp_db.c | 290 tSDP_DB *p_db = &sdp_cb.server_db; in SDP_CreateRecord() local 295 if (p_db->num_records < SDP_MAX_RECORDS) { in SDP_CreateRecord() 300 if (p_db->num_records) { in SDP_CreateRecord() 301 p_rec_prev = list_back(p_db->p_record_list); in SDP_CreateRecord() 304 list_append(p_db->p_record_list, p_rec); in SDP_CreateRecord() 308 if (p_db->num_records) { in SDP_CreateRecord() 316 p_db->num_records++; in SDP_CreateRecord() 317 SDP_TRACE_DEBUG("SDP_CreateRecord ok, num_records:%d\n", p_db->num_records); in SDP_CreateRecord()
|
/device/soc/esp/esp32/components/bt/host/bluedroid/stack/include/stack/ |
D | sdp_api.h | 187 extern BOOLEAN SDP_InitDiscoveryDb (tSDP_DISCOVERY_DB *p_db, UINT32 len, 202 extern BOOLEAN SDP_CancelServiceSearch (tSDP_DISCOVERY_DB *p_db); 214 tSDP_DISCOVERY_DB *p_db, 232 tSDP_DISCOVERY_DB *p_db, 250 tSDP_DISCOVERY_DB *p_db, 267 extern tSDP_DISC_REC *SDP_FindAttributeInDb (tSDP_DISCOVERY_DB *p_db, 298 extern tSDP_DISC_REC *SDP_FindServiceInDb (tSDP_DISCOVERY_DB *p_db, 319 extern tSDP_DISC_REC *SDP_FindServiceUUIDInDb (tSDP_DISCOVERY_DB *p_db, 350 extern tSDP_DISC_REC *SDP_FindServiceInDb_128bit(tSDP_DISCOVERY_DB *p_db, 626 tSDP_DISCOVERY_DB *p_db, UINT32 len, [all …]
|
D | hidh_api.h | 104 tSDP_DISCOVERY_DB *p_db,
|
/device/soc/esp/esp32/components/bt/host/bluedroid/stack/btm/ |
D | btm_pm.c | 390 tBTM_PM_MCB *p_db = (tBTM_PM_MCB *) osi_malloc(sizeof(tBTM_PM_MCB)); /* per ACL link */ in btm_pm_sm_alloc() local 391 if (p_db) { in btm_pm_sm_alloc() 392 memset (p_db, 0, sizeof(tBTM_PM_MCB)); in btm_pm_sm_alloc() 393 p_db->state = BTM_PM_ST_ACTIVE; in btm_pm_sm_alloc() 395 osi_free(p_db); in btm_pm_sm_alloc() 396 p_db = NULL; in btm_pm_sm_alloc() 398 if (!list_append(btm_cb.p_pm_mode_db_list, p_db)) { in btm_pm_sm_alloc() 399 osi_free(p_db); in btm_pm_sm_alloc() 400 p_db = NULL; in btm_pm_sm_alloc() 403 return p_db; in btm_pm_sm_alloc()
|
D | btm_inq.c | 1472 tINQ_BDADDR *p_db = &p_inq->p_bd_db[0]; in btm_inq_find_bdaddr() local 1476 if ((p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) || !p_db) { in btm_inq_find_bdaddr() 1480 for (xx = 0; xx < p_inq->num_bd_entries; xx++, p_db++) { in btm_inq_find_bdaddr() 1481 if (!memcmp(p_db->bd_addr, p_bda, BD_ADDR_LEN) in btm_inq_find_bdaddr() 1482 && p_db->inq_count == p_inq->inq_counter) { in btm_inq_find_bdaddr() 1488 p_db->inq_count = p_inq->inq_counter; in btm_inq_find_bdaddr() 1489 memcpy(p_db->bd_addr, p_bda, BD_ADDR_LEN); in btm_inq_find_bdaddr()
|
/device/soc/esp/esp32/components/bt/host/bluedroid/stack/gatt/include/ |
D | gatt_int.h | 240 tGATT_SVC_DB *p_db; /* pointer to the service database */ member 728 extern BOOLEAN gatts_init_service_db (tGATT_SVC_DB *p_db, tBT_UUID *p_service, BOOLEAN is_pri, UINT… 729 extern UINT16 gatts_add_included_service (tGATT_SVC_DB *p_db, UINT16 s_handle, UINT16 e_handle, tBT… 730 extern UINT16 gatts_add_characteristic (tGATT_SVC_DB *p_db, tGATT_PERM perm, 734 extern UINT16 gatts_add_char_descr (tGATT_SVC_DB *p_db, tGATT_PERM perm, 738 extern tGATT_STATUS gatts_set_attribute_value(tGATT_SVC_DB *p_db, UINT16 attr_handle, 741 extern tGATT_STATUS gatts_get_attribute_value(tGATT_SVC_DB *p_db, UINT16 attr_handle, 744 extern tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb, tGATT_SVC_DB *p_db, UINT8 o… 746 extern tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb, tGATT_SVC_DB *p_db, UINT8 op_… 748 extern tGATT_STATUS gatts_write_attr_value_by_handle(tGATT_SVC_DB *p_db, [all …]
|
/device/soc/esp/esp32/components/bt/host/bluedroid/btc/profile/std/hid/ |
D | hidh_api.c | 56 tHID_STATUS HID_HostGetSDPRecord ( BD_ADDR addr, tSDP_DISCOVERY_DB *p_db, UINT32 db_len, in HID_HostGetSDPRecord() argument 68 hh_cb.p_sdp_db = p_db; in HID_HostGetSDPRecord() 69 SDP_InitDiscoveryDb (p_db, db_len, 1, &uuid_list, 0, NULL); in HID_HostGetSDPRecord() 71 if (SDP_ServiceSearchRequest (addr, p_db, hidh_search_callback)) { in HID_HostGetSDPRecord() 101 tSDP_DISCOVERY_DB *p_db = hh_cb.p_sdp_db; in hidh_search_callback() local 118 if ((p_rec = SDP_FindServiceUUIDInDb (p_db, &hid_uuid, NULL)) == NULL) { in hidh_search_callback()
|
/device/soc/esp/esp32/components/bt/host/bluedroid/stack/sdp/include/ |
D | sdpint.h | 180 tSDP_DISCOVERY_DB *p_db; /* Database to save info into */ member 266 extern tCONN_CB *sdpu_find_ccb_by_db (tSDP_DISCOVERY_DB *p_db); 283 extern void sdpu_sort_attr_list( UINT16 num_attr, tSDP_DISCOVERY_DB *p_db );
|