Lines Matching refs:p_rpt

90   tBTA_HH_LE_RPT* p_rpt = &p_cb->hid_srvc.report[0];  in bta_hh_le_hid_report_dbg()  local
92 for (int j = 0; j < BTA_HH_LE_RPT_MAX; j++, p_rpt++) { in bta_hh_le_hid_report_dbg()
95 if (!p_rpt->in_use) break; in bta_hh_le_hid_report_dbg()
97 if (p_rpt->uuid == GATT_UUID_HID_REPORT) rpt_name = "Report"; in bta_hh_le_hid_report_dbg()
98 if (p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT) rpt_name = "Boot KB Input"; in bta_hh_le_hid_report_dbg()
99 if (p_rpt->uuid == GATT_UUID_HID_BT_KB_OUTPUT) rpt_name = "Boot KB Output"; in bta_hh_le_hid_report_dbg()
100 if (p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT) rpt_name = "Boot MI Input"; in bta_hh_le_hid_report_dbg()
105 rpt_name, p_rpt->uuid, in bta_hh_le_hid_report_dbg()
106 ((p_rpt->rpt_type < 4) ? bta_hh_le_rpt_name[p_rpt->rpt_type] in bta_hh_le_hid_report_dbg()
108 p_rpt->rpt_id, p_rpt->srvc_inst_id, p_rpt->char_inst_id, in bta_hh_le_hid_report_dbg()
109 p_rpt->client_cfg_value); in bta_hh_le_hid_report_dbg()
327 tBTA_HH_LE_RPT* p_rpt; in bta_hh_le_find_report_entry() local
336 p_rpt = &p_cb->hid_srvc.report[0]; in bta_hh_le_find_report_entry()
338 for (i = 0; i < BTA_HH_LE_RPT_MAX; i++, p_rpt++) { in bta_hh_le_find_report_entry()
339 if (p_rpt->uuid == rpt_uuid && p_rpt->srvc_inst_id == srvc_inst_id && in bta_hh_le_find_report_entry()
340 p_rpt->char_inst_id == char_inst_id) { in bta_hh_le_find_report_entry()
341 return p_rpt; in bta_hh_le_find_report_entry()
360 tBTA_HH_LE_RPT* p_rpt = p_head; in bta_hh_le_find_rpt_by_idtype() local
366 for (i = 0; i < BTA_HH_LE_RPT_MAX; i++, p_rpt++) { in bta_hh_le_find_rpt_by_idtype()
367 if (p_rpt->in_use && p_rpt->rpt_id == rpt_id && r_type == p_rpt->rpt_type) { in bta_hh_le_find_rpt_by_idtype()
369 if (p_rpt->uuid == GATT_UUID_BATTERY_LEVEL) return p_rpt; in bta_hh_le_find_rpt_by_idtype()
371 if (mode == BTA_HH_PROTO_RPT_MODE && p_rpt->uuid == GATT_UUID_HID_REPORT) in bta_hh_le_find_rpt_by_idtype()
372 return p_rpt; in bta_hh_le_find_rpt_by_idtype()
375 (p_rpt->uuid >= GATT_UUID_HID_BT_KB_INPUT && in bta_hh_le_find_rpt_by_idtype()
376 p_rpt->uuid <= GATT_UUID_HID_BT_MOUSE_INPUT)) in bta_hh_le_find_rpt_by_idtype()
377 return p_rpt; in bta_hh_le_find_rpt_by_idtype()
396 tBTA_HH_LE_RPT* p_rpt; in bta_hh_le_find_alloc_report_entry() local
404 p_rpt = &p_cb->hid_srvc.report[0]; in bta_hh_le_find_alloc_report_entry()
406 for (i = 0; i < BTA_HH_LE_RPT_MAX; i++, p_rpt++) { in bta_hh_le_find_alloc_report_entry()
407 if (!p_rpt->in_use || in bta_hh_le_find_alloc_report_entry()
408 (p_rpt->uuid == rpt_uuid && p_rpt->srvc_inst_id == srvc_inst_id && in bta_hh_le_find_alloc_report_entry()
409 p_rpt->char_inst_id == inst_id)) { in bta_hh_le_find_alloc_report_entry()
410 if (!p_rpt->in_use) { in bta_hh_le_find_alloc_report_entry()
411 p_rpt->in_use = true; in bta_hh_le_find_alloc_report_entry()
412 p_rpt->index = i; in bta_hh_le_find_alloc_report_entry()
413 p_rpt->srvc_inst_id = srvc_inst_id; in bta_hh_le_find_alloc_report_entry()
414 p_rpt->char_inst_id = inst_id; in bta_hh_le_find_alloc_report_entry()
415 p_rpt->uuid = rpt_uuid; in bta_hh_le_find_alloc_report_entry()
420 p_rpt->rpt_type = (tBTA_HH_RPT_TYPE)bta_hh_uuid_to_rtp_type[i][1]; in bta_hh_le_find_alloc_report_entry()
424 p_rpt->rpt_id = BTA_HH_KEYBD_RPT_ID; in bta_hh_le_find_alloc_report_entry()
427 p_rpt->rpt_id = BTA_HH_MOUSE_RPT_ID; in bta_hh_le_find_alloc_report_entry()
433 return p_rpt; in bta_hh_le_find_alloc_report_entry()
486 tBTA_HH_LE_RPT* p_rpt, in bta_hh_le_save_report_ref() argument
501 STREAM_TO_UINT8(p_rpt->rpt_id, pp); in bta_hh_le_save_report_ref()
502 STREAM_TO_UINT8(p_rpt->rpt_type, pp); in bta_hh_le_save_report_ref()
504 if (p_rpt->rpt_type > BTA_HH_RPTT_FEATURE) /* invalid report type */ in bta_hh_le_save_report_ref()
505 p_rpt->rpt_type = BTA_HH_RPTT_RESRV; in bta_hh_le_save_report_ref()
507 APPL_TRACE_DEBUG("%s: report ID: %d", __func__, p_rpt->rpt_id); in bta_hh_le_save_report_ref()
509 rpt_entry.rpt_id = p_rpt->rpt_id; in bta_hh_le_save_report_ref()
510 rpt_entry.rpt_type = p_rpt->rpt_type; in bta_hh_le_save_report_ref()
511 rpt_entry.rpt_uuid = p_rpt->uuid; in bta_hh_le_save_report_ref()
512 rpt_entry.srvc_inst_id = p_rpt->srvc_inst_id; in bta_hh_le_save_report_ref()
513 rpt_entry.char_inst_id = p_rpt->char_inst_id; in bta_hh_le_save_report_ref()
518 if (p_rpt->index < BTA_HH_LE_RPT_MAX - 1) in bta_hh_le_save_report_ref()
519 p_rpt++; in bta_hh_le_save_report_ref()
521 p_rpt = NULL; in bta_hh_le_save_report_ref()
537 tBTA_HH_LE_RPT* p_rpt = &p_dev_cb->hid_srvc.report[0]; in bta_hh_le_register_input_notif() local
542 for (int i = 0; i < BTA_HH_LE_RPT_MAX; i++, p_rpt++) { in bta_hh_le_register_input_notif()
543 if (p_rpt->rpt_type == BTA_HH_RPTT_INPUT) { in bta_hh_le_register_input_notif()
544 if (register_ba && p_rpt->uuid == GATT_UUID_BATTERY_LEVEL) { in bta_hh_le_register_input_notif()
546 p_rpt->char_inst_id); in bta_hh_le_register_input_notif()
550 if (p_rpt->uuid == GATT_UUID_HID_REPORT && in bta_hh_le_register_input_notif()
551 p_rpt->client_cfg_value == GATT_CLT_CONFIG_NOTIFICATION) { in bta_hh_le_register_input_notif()
553 p_rpt->rpt_id); in bta_hh_le_register_input_notif()
555 bta_hh_cb.gatt_if, p_dev_cb->addr, p_rpt->char_inst_id); in bta_hh_le_register_input_notif()
558 else if (p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT || in bta_hh_le_register_input_notif()
559 p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT) { in bta_hh_le_register_input_notif()
561 p_rpt->rpt_id); in bta_hh_le_register_input_notif()
563 p_rpt->char_inst_id); in bta_hh_le_register_input_notif()
566 if ((p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT || in bta_hh_le_register_input_notif()
567 p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT) && in bta_hh_le_register_input_notif()
568 p_rpt->client_cfg_value == GATT_CLT_CONFIG_NOTIFICATION) { in bta_hh_le_register_input_notif()
570 p_rpt->rpt_id); in bta_hh_le_register_input_notif()
572 bta_hh_cb.gatt_if, p_dev_cb->addr, p_rpt->char_inst_id); in bta_hh_le_register_input_notif()
573 } else if (p_rpt->uuid == GATT_UUID_HID_REPORT && in bta_hh_le_register_input_notif()
574 p_rpt->client_cfg_value == GATT_CLT_CONFIG_NOTIFICATION) { in bta_hh_le_register_input_notif()
576 p_rpt->rpt_id); in bta_hh_le_register_input_notif()
578 p_rpt->char_inst_id); in bta_hh_le_register_input_notif()
595 tBTA_HH_LE_RPT* p_rpt = &p_dev_cb->hid_srvc.report[0]; in bta_hh_le_deregister_input_notif() local
597 for (uint8_t i = 0; i < BTA_HH_LE_RPT_MAX; i++, p_rpt++) { in bta_hh_le_deregister_input_notif()
598 if (p_rpt->rpt_type == BTA_HH_RPTT_INPUT) { in bta_hh_le_deregister_input_notif()
599 if (p_rpt->uuid == GATT_UUID_HID_REPORT && in bta_hh_le_deregister_input_notif()
600 p_rpt->client_cfg_value == GATT_CLT_CONFIG_NOTIFICATION) { in bta_hh_le_deregister_input_notif()
602 p_rpt->rpt_id); in bta_hh_le_deregister_input_notif()
604 p_rpt->char_inst_id); in bta_hh_le_deregister_input_notif()
605 } else if ((p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT || in bta_hh_le_deregister_input_notif()
606 p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT) && in bta_hh_le_deregister_input_notif()
607 p_rpt->client_cfg_value == GATT_CLT_CONFIG_NOTIFICATION) { in bta_hh_le_deregister_input_notif()
609 p_rpt->rpt_id); in bta_hh_le_deregister_input_notif()
611 p_rpt->char_inst_id); in bta_hh_le_deregister_input_notif()
702 tBTA_HH_LE_RPT* p_rpt = &p_cb->hid_srvc.report[p_cb->clt_cfg_idx]; in bta_hh_le_write_rpt_clt_cfg() local
704 for (i = p_cb->clt_cfg_idx; i < BTA_HH_LE_RPT_MAX && p_rpt->in_use; in bta_hh_le_write_rpt_clt_cfg()
705 i++, p_rpt++) { in bta_hh_le_write_rpt_clt_cfg()
707 if (p_rpt->rpt_type == BTA_HH_RPTT_INPUT) { in bta_hh_le_write_rpt_clt_cfg()
708 if (bta_hh_le_write_ccc(p_cb, p_rpt->char_inst_id, in bta_hh_le_write_rpt_clt_cfg()
1284 tBTA_HH_LE_RPT* p_rpt; in read_report_ref_desc_cb() local
1285 p_rpt = bta_hh_le_find_report_entry(p_dev_cb, service->handle, in read_report_ref_desc_cb()
1288 if (p_rpt) bta_hh_le_save_report_ref(p_dev_cb, p_rpt, status, value, len); in read_report_ref_desc_cb()
1360 tBTA_HH_LE_RPT* p_rpt; in bta_hh_le_search_hid_chars() local
1389 p_rpt = bta_hh_le_find_alloc_report_entry( in bta_hh_le_search_hid_chars()
1392 if (p_rpt == NULL) { in bta_hh_le_search_hid_chars()
1397 if (p_rpt->rpt_type != BTA_HH_RPTT_INPUT) break; in bta_hh_le_search_hid_chars()
1515 tBTA_HH_LE_RPT* p_rpt; in bta_hh_le_input_rpt_notify() local
1539 p_rpt = bta_hh_le_find_report_entry( in bta_hh_le_input_rpt_notify()
1541 if (p_rpt == NULL) { in bta_hh_le_input_rpt_notify()
1554 APPL_TRACE_DEBUG("Notification received on report ID: %d", p_rpt->rpt_id); in bta_hh_le_input_rpt_notify()
1557 if (p_rpt->rpt_id != 0) { in bta_hh_le_input_rpt_notify()
1560 p_buf[0] = p_rpt->rpt_id; in bta_hh_le_input_rpt_notify()
1699 tBTA_HH_LE_RPT* p_rpt; in read_report_cb() local
1711 p_rpt = bta_hh_le_find_report_entry(p_dev_cb, p_svc->handle, char_uuid, in read_report_cb()
1714 if (p_rpt != NULL && len) { in read_report_cb()
1725 UINT8_TO_STREAM(pp, p_rpt->rpt_id); in read_report_cb()
1749 tBTA_HH_LE_RPT* p_rpt = bta_hh_le_find_rpt_by_idtype( in bta_hh_le_get_rpt() local
1752 if (p_rpt == NULL) { in bta_hh_le_get_rpt()
1758 BtaGattQueue::ReadCharacteristic(p_cb->conn_id, p_rpt->char_inst_id, in bta_hh_le_get_rpt()
1801 tBTA_HH_LE_RPT* p_rpt; in bta_hh_le_write_rpt() local
1814 p_rpt = bta_hh_le_find_rpt_by_idtype(p_cb->hid_srvc.report, p_cb->mode, in bta_hh_le_write_rpt()
1816 if (p_rpt == NULL) { in bta_hh_le_write_rpt()
1825 BTA_GATTC_GetCharacteristic(p_cb->conn_id, p_rpt->char_inst_id); in bta_hh_le_write_rpt()
1831 BtaGattQueue::WriteCharacteristic(p_cb->conn_id, p_rpt->char_inst_id, in bta_hh_le_write_rpt()
2074 tBTA_HH_LE_RPT* p_rpt; in bta_hh_process_cache_rpt() local
2085 if ((p_rpt = bta_hh_le_find_alloc_report_entry( in bta_hh_process_cache_rpt()
2092 p_rpt->rpt_type = p_rpt_cache->rpt_type; in bta_hh_process_cache_rpt()
2093 p_rpt->rpt_id = p_rpt_cache->rpt_id; in bta_hh_process_cache_rpt()
2095 if (p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT || in bta_hh_process_cache_rpt()
2096 p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT || in bta_hh_process_cache_rpt()
2097 (p_rpt->uuid == GATT_UUID_HID_REPORT && in bta_hh_process_cache_rpt()
2098 p_rpt->rpt_type == BTA_HH_RPTT_INPUT)) { in bta_hh_process_cache_rpt()
2099 p_rpt->client_cfg_value = GATT_CLT_CONFIG_NOTIFICATION; in bta_hh_process_cache_rpt()