Lines Matching refs:p_rpt

258     tBTA_HH_LE_RPT  *p_rpt = &p_cb->hid_srvc.report[0];  in bta_hh_le_hid_report_dbg()  local
260 for (int j = 0; j < BTA_HH_LE_RPT_MAX; j ++, p_rpt++) in bta_hh_le_hid_report_dbg()
264 if (!p_rpt->in_use) in bta_hh_le_hid_report_dbg()
267 if (p_rpt->uuid == GATT_UUID_HID_REPORT) in bta_hh_le_hid_report_dbg()
269 if (p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT) in bta_hh_le_hid_report_dbg()
271 if (p_rpt->uuid == GATT_UUID_HID_BT_KB_OUTPUT) in bta_hh_le_hid_report_dbg()
273 if (p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT) in bta_hh_le_hid_report_dbg()
278 p_rpt->uuid , in bta_hh_le_hid_report_dbg()
279 ((p_rpt->rpt_type < 4) ? bta_hh_le_rpt_name[p_rpt->rpt_type] : "UNKNOWN"), in bta_hh_le_hid_report_dbg()
280 p_rpt->rpt_id, in bta_hh_le_hid_report_dbg()
281 p_rpt->srvc_inst_id, in bta_hh_le_hid_report_dbg()
282 p_rpt->char_inst_id, in bta_hh_le_hid_report_dbg()
283 p_rpt->client_cfg_value); in bta_hh_le_hid_report_dbg()
523 tBTA_HH_LE_RPT *p_rpt; in bta_hh_le_find_report_entry() local
533 p_rpt = &p_cb->hid_srvc.report[0]; in bta_hh_le_find_report_entry()
535 for (i = 0; i < BTA_HH_LE_RPT_MAX; i ++, p_rpt ++) in bta_hh_le_find_report_entry()
537 if (p_rpt->uuid == rpt_uuid && in bta_hh_le_find_report_entry()
538 p_rpt->srvc_inst_id == srvc_inst_id && in bta_hh_le_find_report_entry()
539 p_rpt->char_inst_id == char_inst_id) in bta_hh_le_find_report_entry()
542 return p_rpt; in bta_hh_le_find_report_entry()
561 tBTA_HH_LE_RPT *p_rpt = p_head; in bta_hh_le_find_rpt_by_idtype() local
568 for (i = 0 ; i < BTA_HH_LE_RPT_MAX; i ++, p_rpt++) in bta_hh_le_find_rpt_by_idtype()
570 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()
573 if (p_rpt->uuid == GATT_UUID_BATTERY_LEVEL) in bta_hh_le_find_rpt_by_idtype()
574 return p_rpt; in bta_hh_le_find_rpt_by_idtype()
576 if (mode == BTA_HH_PROTO_RPT_MODE && p_rpt->uuid == GATT_UUID_HID_REPORT) in bta_hh_le_find_rpt_by_idtype()
577 return p_rpt; in bta_hh_le_find_rpt_by_idtype()
580 … (p_rpt->uuid >= GATT_UUID_HID_BT_KB_INPUT && p_rpt->uuid <= GATT_UUID_HID_BT_MOUSE_INPUT)) in bta_hh_le_find_rpt_by_idtype()
581 return p_rpt; in bta_hh_le_find_rpt_by_idtype()
600 tBTA_HH_LE_RPT *p_rpt; in bta_hh_le_find_alloc_report_entry() local
609 p_rpt = &p_cb->hid_srvc.report[0]; in bta_hh_le_find_alloc_report_entry()
611 for (i = 0; i < BTA_HH_LE_RPT_MAX; i ++, p_rpt ++) in bta_hh_le_find_alloc_report_entry()
613 if (!p_rpt->in_use || in bta_hh_le_find_alloc_report_entry()
614 (p_rpt->uuid == rpt_uuid && in bta_hh_le_find_alloc_report_entry()
615 p_rpt->srvc_inst_id == srvc_inst_id && in bta_hh_le_find_alloc_report_entry()
616 p_rpt->char_inst_id == inst_id)) in bta_hh_le_find_alloc_report_entry()
618 if (!p_rpt->in_use) in bta_hh_le_find_alloc_report_entry()
620 p_rpt->in_use = TRUE; in bta_hh_le_find_alloc_report_entry()
621 p_rpt->index = i; in bta_hh_le_find_alloc_report_entry()
622 p_rpt->srvc_inst_id = srvc_inst_id; in bta_hh_le_find_alloc_report_entry()
623 p_rpt->char_inst_id = inst_id; in bta_hh_le_find_alloc_report_entry()
624 p_rpt->uuid = rpt_uuid; in bta_hh_le_find_alloc_report_entry()
631 p_rpt->rpt_type = (tBTA_HH_RPT_TYPE)bta_hh_uuid_to_rtp_type[i][1]; in bta_hh_le_find_alloc_report_entry()
634 p_rpt->rpt_id = BTA_HH_KEYBD_RPT_ID; in bta_hh_le_find_alloc_report_entry()
637 p_rpt->rpt_id = BTA_HH_MOUSE_RPT_ID; in bta_hh_le_find_alloc_report_entry()
643 return p_rpt; in bta_hh_le_find_alloc_report_entry()
701 void bta_hh_le_save_rpt_ref(tBTA_HH_DEV_CB *p_dev_cb, tBTA_HH_LE_RPT *p_rpt, in bta_hh_le_save_rpt_ref() argument
710 STREAM_TO_UINT8(p_rpt->rpt_id, pp); in bta_hh_le_save_rpt_ref()
711 STREAM_TO_UINT8(p_rpt->rpt_type, pp); in bta_hh_le_save_rpt_ref()
713 if (p_rpt->rpt_type > BTA_HH_RPTT_FEATURE) /* invalid report type */ in bta_hh_le_save_rpt_ref()
714 p_rpt->rpt_type = BTA_HH_RPTT_RESRV; in bta_hh_le_save_rpt_ref()
717 APPL_TRACE_DEBUG("%s: report ID: %d", __func__, p_rpt->rpt_id); in bta_hh_le_save_rpt_ref()
720 rpt_entry.rpt_id = p_rpt->rpt_id; in bta_hh_le_save_rpt_ref()
721 rpt_entry.rpt_type = p_rpt->rpt_type; in bta_hh_le_save_rpt_ref()
722 rpt_entry.rpt_uuid = p_rpt->uuid; in bta_hh_le_save_rpt_ref()
723 rpt_entry.srvc_inst_id = p_rpt->srvc_inst_id; in bta_hh_le_save_rpt_ref()
724 rpt_entry.char_inst_id = p_rpt->char_inst_id; in bta_hh_le_save_rpt_ref()
739 if (p_rpt->index < BTA_HH_LE_RPT_MAX - 1) in bta_hh_le_save_rpt_ref()
740 p_rpt ++; in bta_hh_le_save_rpt_ref()
742 p_rpt = NULL; in bta_hh_le_save_rpt_ref()
783 tBTA_HH_LE_RPT *p_rpt = &p_dev_cb->hid_srvc.report[0]; in bta_hh_le_register_input_notif() local
789 for (int i = 0; i < BTA_HH_LE_RPT_MAX; i ++, p_rpt ++) in bta_hh_le_register_input_notif()
791 if (p_rpt->rpt_type == BTA_HH_RPTT_INPUT) in bta_hh_le_register_input_notif()
794 if (register_ba && p_rpt->uuid == GATT_UUID_BATTERY_LEVEL) in bta_hh_le_register_input_notif()
797 p_rpt->char_inst_id); in bta_hh_le_register_input_notif()
802 if (p_rpt->uuid == GATT_UUID_HID_REPORT && in bta_hh_le_register_input_notif()
803 p_rpt->client_cfg_value == BTA_GATT_CLT_CONFIG_NOTIFICATION) in bta_hh_le_register_input_notif()
805 APPL_TRACE_DEBUG("---> Deregister Report ID: %d", p_rpt->rpt_id); in bta_hh_le_register_input_notif()
807 p_rpt->char_inst_id); in bta_hh_le_register_input_notif()
810 else if (p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT || in bta_hh_le_register_input_notif()
811 p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT) in bta_hh_le_register_input_notif()
813 APPL_TRACE_DEBUG("<--- Register Boot Report ID: %d", p_rpt->rpt_id); in bta_hh_le_register_input_notif()
815 p_rpt->char_inst_id); in bta_hh_le_register_input_notif()
820 if ((p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT || in bta_hh_le_register_input_notif()
821 p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT) && in bta_hh_le_register_input_notif()
822 p_rpt->client_cfg_value == BTA_GATT_CLT_CONFIG_NOTIFICATION) in bta_hh_le_register_input_notif()
825 APPL_TRACE_DEBUG("---> Deregister Boot Report ID: %d", p_rpt->rpt_id); in bta_hh_le_register_input_notif()
827 p_rpt->char_inst_id); in bta_hh_le_register_input_notif()
829 else if (p_rpt->uuid == GATT_UUID_HID_REPORT && in bta_hh_le_register_input_notif()
830 p_rpt->client_cfg_value == BTA_GATT_CLT_CONFIG_NOTIFICATION) in bta_hh_le_register_input_notif()
832 APPL_TRACE_DEBUG("<--- Register Report ID: %d", p_rpt->rpt_id); in bta_hh_le_register_input_notif()
834 p_rpt->char_inst_id); in bta_hh_le_register_input_notif()
905 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
907 for (i = p_cb->clt_cfg_idx; i < BTA_HH_LE_RPT_MAX && p_rpt->in_use; i ++, p_rpt ++) in bta_hh_le_write_rpt_clt_cfg()
910 if (p_rpt->rpt_type == BTA_HH_RPTT_INPUT) in bta_hh_le_write_rpt_clt_cfg()
913 p_rpt->char_inst_id, in bta_hh_le_write_rpt_clt_cfg()
1423 tBTA_HH_LE_RPT *p_rpt; in bta_hh_le_search_hid_chars() local
1450 p_rpt = bta_hh_le_find_alloc_report_entry(p_dev_cb, in bta_hh_le_search_hid_chars()
1454 if (p_rpt == NULL) { in bta_hh_le_search_hid_chars()
1459 if (p_rpt->rpt_type != BTA_HH_RPTT_INPUT) in bta_hh_le_search_hid_chars()
1640 tBTA_HH_LE_RPT *p_rpt; in bta_hh_le_proc_get_rpt_cmpl() local
1659 p_rpt = bta_hh_le_find_report_entry(p_dev_cb, in bta_hh_le_proc_get_rpt_cmpl()
1664 if (p_rpt != NULL && p_data->p_value != NULL) { in bta_hh_le_proc_get_rpt_cmpl()
1674 UINT8_TO_STREAM(pp, p_rpt->rpt_id); in bta_hh_le_proc_get_rpt_cmpl()
1861 tBTA_HH_LE_RPT *p_rpt; in bta_hh_le_read_descr_cmpl() local
1870 if ((p_rpt = bta_hh_le_find_report_entry(p_dev_cb, in bta_hh_le_read_descr_cmpl()
1876 STREAM_TO_UINT16(p_rpt->client_cfg_value, pp); in bta_hh_le_read_descr_cmpl()
1878 APPL_TRACE_DEBUG("Read Client Configuration: 0x%04x", p_rpt->client_cfg_value); in bta_hh_le_read_descr_cmpl()
1894 tBTA_HH_LE_RPT *p_rpt; in bta_hh_w4_le_read_descr_cmpl() local
1918 if ((p_rpt = bta_hh_le_find_report_entry(p_dev_cb, in bta_hh_w4_le_read_descr_cmpl()
1922 bta_hh_le_save_rpt_ref(p_dev_cb, p_rpt, p_data); in bta_hh_w4_le_read_descr_cmpl()
1930 if ((p_rpt = bta_hh_le_find_report_entry(p_dev_cb, in bta_hh_w4_le_read_descr_cmpl()
1934 bta_hh_le_save_rpt_ref(p_dev_cb, p_rpt, p_data); in bta_hh_w4_le_read_descr_cmpl()
2107 tBTA_HH_LE_RPT *p_rpt; in bta_hh_le_input_rpt_notify() local
2120 p_rpt = bta_hh_le_find_report_entry(p_dev_cb, in bta_hh_le_input_rpt_notify()
2124 if (p_rpt == NULL) in bta_hh_le_input_rpt_notify()
2135 APPL_TRACE_DEBUG("Notification received on report ID: %d", p_rpt->rpt_id); in bta_hh_le_input_rpt_notify()
2138 if (p_rpt->rpt_id != 0) in bta_hh_le_input_rpt_notify()
2142 p_buf[0] = p_rpt->rpt_id; in bta_hh_le_input_rpt_notify()
2272 …tBTA_HH_LE_RPT *p_rpt = bta_hh_le_find_rpt_by_idtype(p_cb->hid_srvc.report, p_cb->mode, r_type, r… in bta_hh_le_get_rpt() local
2274 if (p_rpt == NULL) { in bta_hh_le_get_rpt()
2280 gatt_queue_read_op(GATT_READ_CHAR, p_cb->conn_id, p_rpt->char_inst_id); in bta_hh_le_get_rpt()
2296 tBTA_HH_LE_RPT *p_rpt; in bta_hh_le_write_rpt() local
2310 p_rpt = bta_hh_le_find_rpt_by_idtype(p_cb->hid_srvc.report, p_cb->mode, r_type, rpt_id); in bta_hh_le_write_rpt()
2312 if (p_rpt == NULL) { in bta_hh_le_write_rpt()
2321 p_rpt->char_inst_id); in bta_hh_le_write_rpt()
2327 gatt_queue_write_op(GATT_WRITE_CHAR, p_cb->conn_id, p_rpt->char_inst_id, in bta_hh_le_write_rpt()
2654 tBTA_HH_LE_RPT *p_rpt ; in bta_hh_le_hid_read_rpt_clt_cfg() local
2666p_rpt = bta_hh_le_find_rpt_by_idtype(p_cb->hid_srvc.report, p_cb->mode, BTA_HH_RPTT_INPUT, rpt_id); in bta_hh_le_hid_read_rpt_clt_cfg()
2668 if (p_rpt == NULL) in bta_hh_le_hid_read_rpt_clt_cfg()
2674 bta_hh_le_read_char_dscrpt(p_cb, p_rpt->char_inst_id, GATT_UUID_CHAR_CLIENT_CONFIG); in bta_hh_le_hid_read_rpt_clt_cfg()