Lines Matching refs:p_rpt
250 tBTA_HH_LE_RPT* p_rpt = &p_cb->hid_srvc.report[0];
252 for (int j = 0; j < BTA_HH_LE_RPT_MAX; j++, p_rpt++) {
255 if (!p_rpt->in_use) break;
257 if (p_rpt->uuid == GATT_UUID_HID_REPORT) rpt_name = "Report";
258 if (p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT) rpt_name = "Boot KB Input";
259 if (p_rpt->uuid == GATT_UUID_HID_BT_KB_OUTPUT) rpt_name = "Boot KB Output";
260 if (p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT) rpt_name = "Boot MI Input";
265 rpt_name, p_rpt->uuid,
266 ((p_rpt->rpt_type < 4) ? bta_hh_le_rpt_name[p_rpt->rpt_type]
268 p_rpt->rpt_id, p_rpt->srvc_inst_id, p_rpt->char_inst_id,
269 p_rpt->client_cfg_value);
471 tBTA_HH_LE_RPT* p_rpt;
480 p_rpt = &p_cb->hid_srvc.report[0];
482 for (i = 0; i < BTA_HH_LE_RPT_MAX; i++, p_rpt++) {
483 if (p_rpt->uuid == rpt_uuid && p_rpt->srvc_inst_id == srvc_inst_id &&
484 p_rpt->char_inst_id == char_inst_id) {
485 return p_rpt;
504 tBTA_HH_LE_RPT* p_rpt = p_head;
512 for (i = 0; i < BTA_HH_LE_RPT_MAX; i++, p_rpt++) {
513 if (p_rpt->in_use && p_rpt->rpt_id == rpt_id && r_type == p_rpt->rpt_type) {
515 if (p_rpt->uuid == GATT_UUID_BATTERY_LEVEL) return p_rpt;
517 if (mode == BTA_HH_PROTO_RPT_MODE && p_rpt->uuid == GATT_UUID_HID_REPORT)
518 return p_rpt;
521 (p_rpt->uuid >= GATT_UUID_HID_BT_KB_INPUT &&
522 p_rpt->uuid <= GATT_UUID_HID_BT_MOUSE_INPUT))
523 return p_rpt;
542 tBTA_HH_LE_RPT* p_rpt;
550 p_rpt = &p_cb->hid_srvc.report[0];
552 for (i = 0; i < BTA_HH_LE_RPT_MAX; i++, p_rpt++) {
553 if (!p_rpt->in_use ||
554 (p_rpt->uuid == rpt_uuid && p_rpt->srvc_inst_id == srvc_inst_id &&
555 p_rpt->char_inst_id == inst_id)) {
556 if (!p_rpt->in_use) {
557 p_rpt->in_use = true;
558 p_rpt->index = i;
559 p_rpt->srvc_inst_id = srvc_inst_id;
560 p_rpt->char_inst_id = inst_id;
561 p_rpt->uuid = rpt_uuid;
566 p_rpt->rpt_type = (tBTA_HH_RPT_TYPE)bta_hh_uuid_to_rtp_type[i][1];
570 p_rpt->rpt_id = BTA_HH_KEYBD_RPT_ID;
573 p_rpt->rpt_id = BTA_HH_MOUSE_RPT_ID;
579 return p_rpt;
638 void bta_hh_le_save_report_ref(tBTA_HH_DEV_CB* p_dev_cb, tBTA_HH_LE_RPT* p_rpt,
653 STREAM_TO_UINT8(p_rpt->rpt_id, pp);
654 STREAM_TO_UINT8(p_rpt->rpt_type, pp);
656 if (p_rpt->rpt_type > BTA_HH_RPTT_FEATURE) /* invalid report type */
657 p_rpt->rpt_type = BTA_HH_RPTT_RESRV;
660 APPL_TRACE_DEBUG("%s: report ID: %d", __func__, p_rpt->rpt_id);
663 rpt_entry.rpt_id = p_rpt->rpt_id;
664 rpt_entry.rpt_type = p_rpt->rpt_type;
665 rpt_entry.rpt_uuid = p_rpt->uuid;
666 rpt_entry.srvc_inst_id = p_rpt->srvc_inst_id;
667 rpt_entry.char_inst_id = p_rpt->char_inst_id;
672 if (p_rpt->index < BTA_HH_LE_RPT_MAX - 1)
673 p_rpt++;
675 p_rpt = NULL;
690 tBTA_HH_LE_RPT* p_rpt = &p_dev_cb->hid_srvc.report[0];
697 for (int i = 0; i < BTA_HH_LE_RPT_MAX; i++, p_rpt++) {
698 if (p_rpt->rpt_type == BTA_HH_RPTT_INPUT) {
699 if (register_ba && p_rpt->uuid == GATT_UUID_BATTERY_LEVEL) {
701 p_rpt->char_inst_id);
705 if (p_rpt->uuid == GATT_UUID_HID_REPORT &&
706 p_rpt->client_cfg_value == BTA_GATT_CLT_CONFIG_NOTIFICATION) {
708 p_rpt->rpt_id);
710 bta_hh_cb.gatt_if, p_dev_cb->addr, p_rpt->char_inst_id);
713 else if (p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT ||
714 p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT) {
716 p_rpt->rpt_id);
718 p_rpt->char_inst_id);
721 if ((p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT ||
722 p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT) &&
723 p_rpt->client_cfg_value == BTA_GATT_CLT_CONFIG_NOTIFICATION) {
725 p_rpt->rpt_id);
727 bta_hh_cb.gatt_if, p_dev_cb->addr, p_rpt->char_inst_id);
728 } else if (p_rpt->uuid == GATT_UUID_HID_REPORT &&
729 p_rpt->client_cfg_value ==
732 p_rpt->rpt_id);
734 p_rpt->char_inst_id);
751 tBTA_HH_LE_RPT* p_rpt = &p_dev_cb->hid_srvc.report[0];
753 for (uint8_t i = 0; i < BTA_HH_LE_RPT_MAX; i++, p_rpt++) {
754 if (p_rpt->rpt_type == BTA_HH_RPTT_INPUT) {
755 if (p_rpt->uuid == GATT_UUID_HID_REPORT &&
756 p_rpt->client_cfg_value == BTA_GATT_CLT_CONFIG_NOTIFICATION) {
758 p_rpt->rpt_id);
760 p_rpt->char_inst_id);
761 } else if ((p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT ||
762 p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT) &&
763 p_rpt->client_cfg_value == BTA_GATT_CLT_CONFIG_NOTIFICATION) {
765 p_rpt->rpt_id);
767 p_rpt->char_inst_id);
863 tBTA_HH_LE_RPT* p_rpt = &p_cb->hid_srvc.report[p_cb->clt_cfg_idx];
865 for (i = p_cb->clt_cfg_idx; i < BTA_HH_LE_RPT_MAX && p_rpt->in_use;
866 i++, p_rpt++) {
868 if (p_rpt->rpt_type == BTA_HH_RPTT_INPUT) {
869 if (bta_hh_le_write_ccc(p_cb, p_rpt->char_inst_id,
1451 tBTA_HH_LE_RPT* p_rpt;
1452 p_rpt = bta_hh_le_find_report_entry(
1455 if (p_rpt) bta_hh_le_save_report_ref(p_dev_cb, p_rpt, status, value, len);
1512 tBTA_HH_LE_RPT* p_rpt;
1545 p_rpt = bta_hh_le_find_alloc_report_entry(
1548 if (p_rpt == NULL) {
1553 if (p_rpt->rpt_type != BTA_HH_RPTT_INPUT) break;
1690 tBTA_HH_LE_RPT* p_rpt;
1711 p_rpt = bta_hh_le_find_report_entry(p_dev_cb, p_dev_cb->hid_srvc.srvc_inst_id,
1713 if (p_rpt == NULL) {
1726 APPL_TRACE_DEBUG("Notification received on report ID: %d", p_rpt->rpt_id);
1729 if (p_rpt->rpt_id != 0) {
1732 p_buf[0] = p_rpt->rpt_id;
1876 tBTA_HH_LE_RPT* p_rpt;
1885 p_rpt = bta_hh_le_find_report_entry(p_dev_cb, p_char->service->handle,
1888 if (p_rpt != NULL && len) {
1899 UINT8_TO_STREAM(pp, p_rpt->rpt_id);
1923 tBTA_HH_LE_RPT* p_rpt = bta_hh_le_find_rpt_by_idtype(
1926 if (p_rpt == NULL) {
1932 gatt_queue_read_op(GATT_READ_CHAR, p_cb->conn_id, p_rpt->char_inst_id,
1974 tBTA_HH_LE_RPT* p_rpt;
1987 p_rpt = bta_hh_le_find_rpt_by_idtype(p_cb->hid_srvc.report, p_cb->mode,
1989 if (p_rpt == NULL) {
1998 BTA_GATTC_GetCharacteristic(p_cb->conn_id, p_rpt->char_inst_id);
2004 gatt_queue_write_op(GATT_WRITE_CHAR, p_cb->conn_id, p_rpt->char_inst_id,
2242 tBTA_HH_LE_RPT* p_rpt = (tBTA_HH_LE_RPT*)data;
2244 STREAM_TO_UINT16(p_rpt->client_cfg_value, pp);
2247 p_rpt->client_cfg_value);
2262 tBTA_HH_LE_RPT* p_rpt;
2273 p_rpt = bta_hh_le_find_rpt_by_idtype(p_cb->hid_srvc.report, p_cb->mode,
2276 if (p_rpt == NULL) {
2281 bta_hh_le_read_char_descriptor(p_cb, p_rpt->char_inst_id,
2283 read_report_descriptor_ccc_cb, p_rpt);
2302 // tBTA_HH_LE_RPT *p_rpt;
2316 // if ((p_rpt = bta_hh_le_find_alloc_report_entry (p_cb,
2328 // p_rpt->rpt_type = p_rpt_cache->rpt_type;
2329 // p_rpt->rpt_id = p_rpt_cache->rpt_id;
2331 // if (p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT ||
2332 // p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT ||
2333 // (p_rpt->uuid == GATT_UUID_HID_REPORT && p_rpt->rpt_type
2336 // p_rpt->client_cfg_value =