Lines Matching refs:dis_cb

58 tDIS_CB dis_cb;  variable
94 if (handle >= dis_cb.service_handle && handle <= dis_cb.max_handle) in dis_valid_handle_range()
117 tDIS_DB_ENTRY *p_db_attr = dis_cb.dis_attr; in dis_read_attr_value()
145 pp = dis_cb.dis_value.data_string[p_db_attr->uuid - GATT_UUID_MODEL_NUMBER_STR]; in dis_read_attr_value()
171 UINT64_TO_STREAM(p, dis_cb.dis_value.system_id); /* int_min */ in dis_read_attr_value()
176 UINT8_TO_STREAM(p, dis_cb.dis_value.pnp_id.vendor_id_src); in dis_read_attr_value()
177 UINT16_TO_STREAM(p, dis_cb.dis_value.pnp_id.vendor_id); in dis_read_attr_value()
178 UINT16_TO_STREAM(p, dis_cb.dis_value.pnp_id.product_id); in dis_read_attr_value()
179 UINT16_TO_STREAM(p, dis_cb.dis_value.pnp_id.product_version); in dis_read_attr_value()
204 dis_cb.dis_read_uuid_idx = 0xff; in dis_gatt_c_read_dis_value_cmpl()
208 if (dis_cb.p_read_dis_cback && p_clcb) in dis_gatt_c_read_dis_value_cmpl()
213 (*dis_cb.p_read_dis_cback)(p_clcb->bda, &p_clcb->dis_value); in dis_gatt_c_read_dis_value_cmpl()
214 dis_cb.p_read_dis_cback = NULL; in dis_gatt_c_read_dis_value_cmpl()
238 while (dis_cb.dis_read_uuid_idx < DIS_MAX_CHAR_NUM) in dis_gatt_c_read_dis_req()
240 if (dis_uuid_to_attr(dis_attr_uuid[dis_cb.dis_read_uuid_idx]) & in dis_gatt_c_read_dis_req()
241 dis_cb.request_mask) in dis_gatt_c_read_dis_req()
243 param.service.uuid.uu.uuid16 = dis_attr_uuid[dis_cb.dis_read_uuid_idx]; in dis_gatt_c_read_dis_req()
251 dis_cb.dis_read_uuid_idx++; in dis_gatt_c_read_dis_req()
271 UINT16 read_type = dis_attr_uuid[dis_cb.dis_read_uuid_idx]; in dis_c_cmpl_cback()
331 dis_cb.dis_read_uuid_idx ++; in dis_c_cmpl_cback()
348 tDIS_DB_ENTRY *p_db_attr = &dis_cb.dis_attr[0]; in DIS_SrInit()
350 if (dis_cb.enabled) in DIS_SrInit()
356 memset(&dis_cb, 0, sizeof(tDIS_CB)); in DIS_SrInit()
358dis_cb.service_handle = GATTS_CreateService (srvc_eng_cb.gatt_if , &uuid, 0, DIS_MAX_ATTR_NUM, TRU… in DIS_SrInit()
360 if (dis_cb.service_handle == 0) in DIS_SrInit()
365 dis_cb.max_handle = dis_cb.service_handle + DIS_MAX_ATTR_NUM; in DIS_SrInit()
372 …p_db_attr->handle = GATTS_AddCharacteristic(dis_cb.service_handle, &uuid, GATT_PERM_READ, GATT_CH… in DIS_SrInit()
381 …status = GATTS_StartService (srvc_eng_cb.gatt_if, dis_cb.service_handle, GATT_TRANSPORT_LE_BR_EDR); in DIS_SrInit()
383 dis_cb.enabled = TRUE; in DIS_SrInit()
401 dis_cb.dis_value.system_id = p_info->system_id; in DIS_SrUpdate()
405 dis_cb.dis_value.pnp_id.vendor_id = p_info->pnp_id.vendor_id; in DIS_SrUpdate()
406 dis_cb.dis_value.pnp_id.vendor_id_src = p_info->pnp_id.vendor_id_src; in DIS_SrUpdate()
407 dis_cb.dis_value.pnp_id.product_id = p_info->pnp_id.product_id; in DIS_SrUpdate()
408 dis_cb.dis_value.pnp_id.product_version = p_info->pnp_id.product_version; in DIS_SrUpdate()
418 osi_free(dis_cb.dis_value.data_string[i - 1]); in DIS_SrUpdate()
423 dis_cb.dis_value.data_string[i - 1] = (UINT8 *)osi_malloc(p_info->data_str.len + 1); in DIS_SrUpdate()
424 … memcpy(dis_cb.dis_value.data_string[i - 1], p_info->data_str.p_data, p_info->data_str.len); in DIS_SrUpdate()
425dis_cb.dis_value.data_string[i - 1][p_info->data_str.len] = 0; /* make sure null terminate */ in DIS_SrUpdate()
452 if (dis_cb.dis_read_uuid_idx != 0xff) in DIS_ReadDISInfo()
458 dis_cb.p_read_dis_cback = p_cback; in DIS_ReadDISInfo()
460 dis_cb.dis_read_uuid_idx = 0; in DIS_ReadDISInfo()
462 dis_cb.request_mask = mask; in DIS_ReadDISInfo()
466 (peer_bda[4]<<8)+peer_bda[5], dis_attr_uuid[dis_cb.dis_read_uuid_idx]); in DIS_ReadDISInfo()