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

Commit 37f02365 authored by Kim Low's avatar Kim Low Committed by Siarhei Vishniakou
Browse files

Option to send data report through BTA_HhSetReport

Drivers may send SET_FEATURE_REPORT by using type UHID_OUTPUT
and output.rtype UHID_FEATURE_REPORT, or send OUTPUT_DATA_REPORT
by using type UHID_OUTPUT and output.rtype UHID_OUTPUT_REPORT.

For type UHID_OUTPUT, the Fluoride stack calls btif_hh_setreport()
which then calls BTA_HhSetReport() correspondingly. Hence it is
necessary for BTA_HhSetReport() to handle both the output.type
UHID_FEATURE_REPORT (BTA_HH_RPTT_FEATURE) and UHID_DATA_REPORT
(BTA_HH_RPTT_OUTPUT).

Test: No stand-alone test.
Bug: 38511270
Change-Id: I210f6338d3152dad100920dc8a1eb69b563b70ae
parent 432ef506
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -172,7 +172,13 @@ static void bta_hh_snd_write_dev(uint8_t dev_handle, uint8_t t_type,
 ******************************************************************************/
void BTA_HhSetReport(uint8_t dev_handle, tBTA_HH_RPT_TYPE r_type,
                     BT_HDR* p_data) {
  bta_hh_snd_write_dev(dev_handle, HID_TRANS_SET_REPORT, r_type, 0, 0, p_data);
  /* send feature report on control channel */
  if (r_type == BTA_HH_RPTT_FEATURE)
    bta_hh_snd_write_dev(dev_handle, HID_TRANS_SET_REPORT, r_type, 0, 0,
                         p_data);
  /* send output data report on interrupt channel */
  else
    bta_hh_snd_write_dev(dev_handle, HID_TRANS_DATA, r_type, 0, 0, p_data);
}
/*******************************************************************************
 *