Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd327a61 authored by Zhihai Xu's avatar Zhihai Xu
Browse files

Can only support two HID report instance for BLE HID.

The follwoing code cause this problem:
BTA_HH_LE_RPT_INST_ID_MAP(s,c)=(UINT8)(((s)<<4)||(c))
The code use || instead of |, this cause we can only generate
two instance HID report 0 and 1(false and true).

bug:12213520
Change-Id: If6b7cfd9633255401aef12aafd918ee147f256b6
parent e9967ae9
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@

#define BTA_HH_LE_RPT_TYPE_VALID(x)     ((x) <= BTA_LE_HID_RPT_FEATURE && (x)>=BTA_LE_HID_RPT_INPUT)

#define BTA_HH_LE_RPT_INST_ID_MAP(s,c)  (UINT8)(((s)<<4)||(c))
#define BTA_HH_LE_RPT_INST_ID_MAP(s,c)  (UINT8)(((s)<<4)|(c))
#define BTA_HH_LE_RPT_GET_SRVC_INST_ID(x)  (UINT8)(x  >> 4)
#define BTA_HH_LE_RPT_GET_RPT_INST_ID(x)  (UINT8)(x & 0x0f)

@@ -1085,7 +1085,7 @@ void bta_hh_le_expl_rpt(tBTA_HH_DEV_CB *p_dev_cb,
                                          p_char_id->char_id.inst_id,
                                          prop) == NULL)
        {
            APPL_TRACE_ERROR0("Add report entry failed !!!")
            APPL_TRACE_ERROR0("Add report entry failed !!!");
            break;
        }

@@ -1126,7 +1126,7 @@ void bta_hh_le_expl_boot_rpt(tBTA_HH_DEV_CB *p_dev_cb, UINT16 char_uuid,
                                      prop) == NULL)

    {
        APPL_TRACE_ERROR0("Add report entry failed !!!")
        APPL_TRACE_ERROR0("Add report entry failed !!!");
    }

    return;