Lines Matching refs:p_rpt
115 tBTA_HH_LE_RPT *p_rpt; in bta_hh_le_hid_report_dbg() local
123 p_rpt = &p_cb->hid_srvc[i].report[0]; in bta_hh_le_hid_report_dbg()
127 for (j = 0; j < BTA_HH_LE_RPT_MAX; j ++, p_rpt++) in bta_hh_le_hid_report_dbg()
130 if (p_rpt->in_use) in bta_hh_le_hid_report_dbg()
132 if (p_rpt->uuid == GATT_UUID_HID_REPORT) in bta_hh_le_hid_report_dbg()
134 if (p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT) in bta_hh_le_hid_report_dbg()
136 if (p_rpt->uuid == GATT_UUID_HID_BT_KB_OUTPUT) in bta_hh_le_hid_report_dbg()
138 if (p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT) in bta_hh_le_hid_report_dbg()
144 p_rpt->uuid , in bta_hh_le_hid_report_dbg()
145 ((p_rpt->rpt_type < 4) ? bta_hh_le_rpt_name[p_rpt->rpt_type] : "UNKNOWN"), in bta_hh_le_hid_report_dbg()
146 p_rpt->rpt_id, in bta_hh_le_hid_report_dbg()
147 p_rpt->inst_id, in bta_hh_le_hid_report_dbg()
148 p_rpt->client_cfg_value); in bta_hh_le_hid_report_dbg()
471 tBTA_HH_LE_RPT *p_rpt; in bta_hh_le_find_report_entry() local
481 p_rpt = &p_cb->hid_srvc[hid_inst_id].report[0]; in bta_hh_le_find_report_entry()
483 for (i = 0; i < BTA_HH_LE_RPT_MAX; i ++, p_rpt ++) in bta_hh_le_find_report_entry()
485 if (p_rpt->uuid == rpt_uuid && in bta_hh_le_find_report_entry()
486 p_rpt->inst_id == BTA_HH_LE_RPT_INST_ID_MAP(srvc_inst_id, char_inst_id)) in bta_hh_le_find_report_entry()
489 return p_rpt; in bta_hh_le_find_report_entry()
508 tBTA_HH_LE_RPT *p_rpt = p_head; in bta_hh_le_find_rpt_by_idtype() local
515 for (i = 0 ; i < BTA_HH_LE_RPT_MAX; i ++, p_rpt++) in bta_hh_le_find_rpt_by_idtype()
517 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()
520 if (p_rpt->uuid == GATT_UUID_BATTERY_LEVEL) in bta_hh_le_find_rpt_by_idtype()
521 return p_rpt; in bta_hh_le_find_rpt_by_idtype()
523 if (mode == BTA_HH_PROTO_RPT_MODE && p_rpt->uuid == GATT_UUID_HID_REPORT) in bta_hh_le_find_rpt_by_idtype()
524 return p_rpt; in bta_hh_le_find_rpt_by_idtype()
527 … (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()
528 return p_rpt; in bta_hh_le_find_rpt_by_idtype()
548 tBTA_HH_LE_RPT *p_rpt; in bta_hh_le_find_alloc_report_entry() local
557 p_rpt = &p_cb->hid_srvc[hid_inst_id].report[0]; in bta_hh_le_find_alloc_report_entry()
559 for (i = 0; i < BTA_HH_LE_RPT_MAX; i ++, p_rpt ++) in bta_hh_le_find_alloc_report_entry()
561 if (!p_rpt->in_use || in bta_hh_le_find_alloc_report_entry()
562 (p_rpt->uuid == rpt_uuid && in bta_hh_le_find_alloc_report_entry()
563 p_rpt->inst_id == BTA_HH_LE_RPT_INST_ID_MAP(srvc_inst_id, inst_id))) in bta_hh_le_find_alloc_report_entry()
565 if (!p_rpt->in_use) in bta_hh_le_find_alloc_report_entry()
567 p_rpt->in_use = TRUE; in bta_hh_le_find_alloc_report_entry()
568 p_rpt->index = i; in bta_hh_le_find_alloc_report_entry()
569 p_rpt->inst_id = BTA_HH_LE_RPT_INST_ID_MAP(srvc_inst_id, inst_id); in bta_hh_le_find_alloc_report_entry()
570 p_rpt->prop = prop; in bta_hh_le_find_alloc_report_entry()
571 p_rpt->uuid = rpt_uuid; in bta_hh_le_find_alloc_report_entry()
578 p_rpt->rpt_type = (tBTA_HH_RPT_TYPE)bta_hh_uuid_to_rtp_type[i][1]; in bta_hh_le_find_alloc_report_entry()
581 p_rpt->rpt_id = BTA_HH_KEYBD_RPT_ID; in bta_hh_le_find_alloc_report_entry()
584 p_rpt->rpt_id = BTA_HH_MOUSE_RPT_ID; in bta_hh_le_find_alloc_report_entry()
590 return p_rpt; in bta_hh_le_find_alloc_report_entry()
646 void bta_hh_le_read_rpt_ref_descr(tBTA_HH_DEV_CB *p_dev_cb, tBTA_HH_LE_RPT *p_rpt) in bta_hh_le_read_rpt_ref_descr() argument
651 while (p_rpt != NULL) in bta_hh_le_read_rpt_ref_descr()
653 if(!p_rpt->in_use) in bta_hh_le_read_rpt_ref_descr()
656 if (p_rpt->rpt_type == BTA_HH_RPTT_INPUT) in bta_hh_le_read_rpt_ref_descr()
659 if (p_rpt->uuid == GATT_UUID_BATTERY_LEVEL) in bta_hh_le_read_rpt_ref_descr()
678 BTA_HH_LE_RPT_GET_SRVC_INST_ID(p_rpt->inst_id), in bta_hh_le_read_rpt_ref_descr()
680 BTA_HH_LE_RPT_GET_RPT_INST_ID(p_rpt->inst_id), in bta_hh_le_read_rpt_ref_descr()
689 if (p_rpt->index == BTA_HH_LE_RPT_MAX - 1) in bta_hh_le_read_rpt_ref_descr()
692 p_rpt ++; in bta_hh_le_read_rpt_ref_descr()
713 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
725 STREAM_TO_UINT8(p_rpt->rpt_id, pp); in bta_hh_le_save_rpt_ref()
726 STREAM_TO_UINT8(p_rpt->rpt_type, pp); in bta_hh_le_save_rpt_ref()
728 if (p_rpt->rpt_type > BTA_HH_RPTT_FEATURE) /* invalid report type */ in bta_hh_le_save_rpt_ref()
729 p_rpt->rpt_type = BTA_HH_RPTT_RESRV; in bta_hh_le_save_rpt_ref()
732 APPL_TRACE_DEBUG("report ID: %d", p_rpt->rpt_id); in bta_hh_le_save_rpt_ref()
734 rpt_entry.rpt_id = p_rpt->rpt_id; in bta_hh_le_save_rpt_ref()
735 rpt_entry.rpt_type = p_rpt->rpt_type; in bta_hh_le_save_rpt_ref()
736 rpt_entry.rpt_uuid = p_rpt->uuid; in bta_hh_le_save_rpt_ref()
737 rpt_entry.prop = p_rpt->prop; in bta_hh_le_save_rpt_ref()
738 rpt_entry.inst_id = p_rpt->inst_id; in bta_hh_le_save_rpt_ref()
753 if (p_rpt->index < BTA_HH_LE_RPT_MAX - 1) in bta_hh_le_save_rpt_ref()
754 p_rpt ++; in bta_hh_le_save_rpt_ref()
756 p_rpt = NULL; in bta_hh_le_save_rpt_ref()
759 bta_hh_le_read_rpt_ref_descr(p_dev_cb, p_rpt); in bta_hh_le_save_rpt_ref()
807 tBTA_HH_LE_RPT *p_rpt = &p_dev_cb->hid_srvc[srvc_inst].report[0]; in bta_hh_le_register_input_notif() local
816 for (i = 0; i < BTA_HH_LE_RPT_MAX; i ++, p_rpt ++) in bta_hh_le_register_input_notif()
818 if (p_rpt->rpt_type == BTA_HH_RPTT_INPUT) in bta_hh_le_register_input_notif()
820 if (p_rpt->uuid == GATT_UUID_BATTERY_LEVEL) in bta_hh_le_register_input_notif()
825 …bta_hh_le_fill_16bits_srvc_id(TRUE, BTA_HH_LE_RPT_GET_SRVC_INST_ID(p_rpt->inst_id), srvc_uuid, &ch… in bta_hh_le_register_input_notif()
826 …bta_hh_le_fill_16bits_char_id(BTA_HH_LE_RPT_GET_RPT_INST_ID(p_rpt->inst_id), p_rpt->uuid, &char_id… in bta_hh_le_register_input_notif()
828 if (register_ba && p_rpt->uuid == GATT_UUID_BATTERY_LEVEL) in bta_hh_le_register_input_notif()
837 if (p_rpt->uuid == GATT_UUID_HID_REPORT && in bta_hh_le_register_input_notif()
838 p_rpt->client_cfg_value == BTA_GATT_CLT_CONFIG_NOTIFICATION) in bta_hh_le_register_input_notif()
840 APPL_TRACE_DEBUG("---> Deregister Report ID: %d", p_rpt->rpt_id); in bta_hh_le_register_input_notif()
846 else if (p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT || in bta_hh_le_register_input_notif()
847 p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT) in bta_hh_le_register_input_notif()
849 APPL_TRACE_DEBUG("<--- Register Boot Report ID: %d", p_rpt->rpt_id); in bta_hh_le_register_input_notif()
857 if ((p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT || in bta_hh_le_register_input_notif()
858 p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT) && in bta_hh_le_register_input_notif()
859 p_rpt->client_cfg_value == BTA_GATT_CLT_CONFIG_NOTIFICATION) in bta_hh_le_register_input_notif()
862 APPL_TRACE_DEBUG("---> Deregister Boot Report ID: %d", p_rpt->rpt_id); in bta_hh_le_register_input_notif()
867 else if (p_rpt->uuid == GATT_UUID_HID_REPORT && in bta_hh_le_register_input_notif()
868 p_rpt->client_cfg_value == BTA_GATT_CLT_CONFIG_NOTIFICATION) in bta_hh_le_register_input_notif()
870 APPL_TRACE_DEBUG("<--- Register Report ID: %d", p_rpt->rpt_id); in bta_hh_le_register_input_notif()
965 tBTA_HH_LE_RPT *p_rpt = &p_cb->hid_srvc[srvc_inst_id].report[p_cb->clt_cfg_idx]; in bta_hh_le_write_rpt_clt_cfg() local
968 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()
971 if (p_rpt->rpt_type == BTA_HH_RPTT_INPUT) in bta_hh_le_write_rpt_clt_cfg()
974 if (p_rpt->uuid == GATT_UUID_BATTERY_LEVEL) in bta_hh_le_write_rpt_clt_cfg()
980 BTA_HH_LE_RPT_GET_SRVC_INST_ID(p_rpt->inst_id), in bta_hh_le_write_rpt_clt_cfg()
982 BTA_HH_LE_RPT_GET_RPT_INST_ID(p_rpt->inst_id), in bta_hh_le_write_rpt_clt_cfg()
983 p_rpt->uuid, in bta_hh_le_write_rpt_clt_cfg()
1890 tBTA_HH_LE_RPT *p_rpt; in bta_hh_le_proc_get_rpt_cmpl() local
1906 p_rpt = bta_hh_le_find_report_entry(p_dev_cb, in bta_hh_le_proc_get_rpt_cmpl()
1911 if (p_rpt != NULL && in bta_hh_le_proc_get_rpt_cmpl()
1923 UINT8_TO_STREAM(pp, p_rpt->rpt_id); in bta_hh_le_proc_get_rpt_cmpl()
2083 tBTA_HH_LE_RPT *p_rpt; in bta_hh_le_read_descr_cmpl() local
2090 if ((p_rpt = bta_hh_le_find_report_entry(p_dev_cb, in bta_hh_le_read_descr_cmpl()
2096 STREAM_TO_UINT16(p_rpt->client_cfg_value, pp); in bta_hh_le_read_descr_cmpl()
2098 APPL_TRACE_DEBUG("Read Client Configuration: 0x%04x", p_rpt->client_cfg_value); in bta_hh_le_read_descr_cmpl()
2114 tBTA_HH_LE_RPT *p_rpt; in bta_hh_le_read_battery_level_descr_cmpl() local
2120 if ((p_rpt = bta_hh_le_find_report_entry(p_dev_cb, in bta_hh_le_read_battery_level_descr_cmpl()
2128 bta_hh_le_save_rpt_ref(p_dev_cb, p_rpt, p_data); in bta_hh_le_read_battery_level_descr_cmpl()
2143 tBTA_HH_LE_RPT *p_rpt; in bta_hh_w4_le_read_descr_cmpl() local
2160 if ((p_rpt = bta_hh_le_find_report_entry(p_dev_cb, in bta_hh_w4_le_read_descr_cmpl()
2168 bta_hh_le_save_rpt_ref(p_dev_cb, p_rpt, p_data); in bta_hh_w4_le_read_descr_cmpl()
2346 tBTA_HH_LE_RPT *p_rpt; in bta_hh_le_input_rpt_notify() local
2355 p_rpt = bta_hh_le_find_report_entry(p_dev_cb, in bta_hh_le_input_rpt_notify()
2359 if (p_rpt == NULL) in bta_hh_le_input_rpt_notify()
2370 APPL_TRACE_DEBUG("Notification received on report ID: %d", p_rpt->rpt_id); in bta_hh_le_input_rpt_notify()
2373 if (p_rpt->rpt_id != 0) in bta_hh_le_input_rpt_notify()
2381 p_buf[0] = p_rpt->rpt_id; in bta_hh_le_input_rpt_notify()
2510 …tBTA_HH_LE_RPT *p_rpt = bta_hh_le_find_rpt_by_idtype(p_cb->hid_srvc[srvc_inst].report, p_cb->mode… in bta_hh_le_get_rpt() local
2514 if (p_rpt == NULL) in bta_hh_le_get_rpt()
2519 if (p_rpt->uuid == GATT_UUID_BATTERY_LEVEL) in bta_hh_le_get_rpt()
2525 bta_hh_le_fill_16bits_char_id(p_rpt->inst_id, p_rpt->uuid, &char_id.char_id); in bta_hh_le_get_rpt()
2546 tBTA_HH_LE_RPT *p_rpt; in bta_hh_le_write_rpt() local
2561 …p_rpt = bta_hh_le_find_rpt_by_idtype(p_cb->hid_srvc[srvc_inst].report, p_cb->mode, r_type, rpt_id); in bta_hh_le_write_rpt()
2563 if (p_rpt == NULL) in bta_hh_le_write_rpt()
2575 bta_hh_le_fill_16bits_char_id(p_rpt->inst_id, p_rpt->uuid, &char_id.char_id); in bta_hh_le_write_rpt()
2946 tBTA_HH_LE_RPT *p_rpt ; in bta_hh_le_hid_read_rpt_clt_cfg() local
2958 …p_rpt = bta_hh_le_find_rpt_by_idtype(p_cb->hid_srvc[BTA_HH_LE_SRVC_DEF].report, p_cb->mode, BTA_HH… in bta_hh_le_hid_read_rpt_clt_cfg()
2960 if (p_rpt == NULL) in bta_hh_le_hid_read_rpt_clt_cfg()
2969 p_rpt->uuid, in bta_hh_le_hid_read_rpt_clt_cfg()
2970 p_rpt->inst_id, in bta_hh_le_hid_read_rpt_clt_cfg()
3125 tBTA_HH_LE_RPT *p_rpt; in bta_hh_process_cache_rpt() local
3139 if ((p_rpt = bta_hh_le_find_alloc_report_entry (p_cb, in bta_hh_process_cache_rpt()
3150 p_rpt->rpt_type = p_rpt_cache->rpt_type; in bta_hh_process_cache_rpt()
3151 p_rpt->rpt_id = p_rpt_cache->rpt_id; in bta_hh_process_cache_rpt()
3153 if(p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT || in bta_hh_process_cache_rpt()
3154 p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT || in bta_hh_process_cache_rpt()
3155 (p_rpt->uuid == GATT_UUID_HID_REPORT && p_rpt->rpt_type == BTA_HH_RPTT_INPUT)) in bta_hh_process_cache_rpt()
3157 p_rpt->client_cfg_value = BTA_GATT_CLT_CONFIG_NOTIFICATION; in bta_hh_process_cache_rpt()