Loading system/bta/hh/bta_hh_api.cc +1 −7 Original line number Diff line number Diff line Loading @@ -168,13 +168,7 @@ 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) { /* 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); bta_hh_snd_write_dev(dev_handle, HID_TRANS_SET_REPORT, r_type, 0, 0, p_data); } /******************************************************************************* * Loading system/btif/co/bta_hh_co.cc +1 −2 Original line number Diff line number Diff line Loading @@ -126,8 +126,7 @@ static int uhid_read_event(btif_hh_device_t* p_dev) { btif_hh_setreport(p_dev, BTHH_FEATURE_REPORT, ev.u.output.size, ev.u.output.data); else if (ev.u.output.rtype == UHID_OUTPUT_REPORT) btif_hh_setreport(p_dev, BTHH_OUTPUT_REPORT, ev.u.output.size, ev.u.output.data); btif_hh_senddata(p_dev, ev.u.output.size, ev.u.output.data); else APPL_TRACE_ERROR("%s: UHID_OUTPUT: Invalid report type = %d", __func__, ev.u.output.rtype); Loading system/btif/include/btif_hh.h +2 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,8 @@ extern void btif_hh_disconnect(RawAddress* bd_addr); extern void btif_hh_setreport(btif_hh_device_t* p_dev, bthh_report_type_t r_type, uint16_t size, uint8_t* report); extern void btif_hh_senddata(btif_hh_device_t* p_dev, uint16_t size, uint8_t* report); extern void btif_hh_getreport(btif_hh_device_t* p_dev, bthh_report_type_t r_type, uint8_t reportId, uint16_t bufferSize); Loading system/btif/src/btif_hh.cc +20 −0 Original line number Diff line number Diff line Loading @@ -653,6 +653,26 @@ void btif_hh_setreport(btif_hh_device_t* p_dev, bthh_report_type_t r_type, BTA_HhSetReport(p_dev->dev_handle, r_type, p_buf); } /******************************************************************************* * * Function btif_btif_hh_senddata * * Description senddata initiated from the BTIF thread context * * Returns void * ******************************************************************************/ void btif_hh_senddata(btif_hh_device_t* p_dev, uint16_t size, uint8_t* report) { BT_HDR* p_buf = create_pbuf(size, report); if (p_buf == NULL) { APPL_TRACE_ERROR("%s: Error, failed to allocate RPT buffer, size = %d", __func__, size); return; } p_buf->layer_specific = BTA_HH_RPTT_OUTPUT; BTA_HhSendData(p_dev->dev_handle, p_dev->bd_addr, p_buf); } /******************************************************************************* * * Function btif_hh_service_registration Loading Loading
system/bta/hh/bta_hh_api.cc +1 −7 Original line number Diff line number Diff line Loading @@ -168,13 +168,7 @@ 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) { /* 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); bta_hh_snd_write_dev(dev_handle, HID_TRANS_SET_REPORT, r_type, 0, 0, p_data); } /******************************************************************************* * Loading
system/btif/co/bta_hh_co.cc +1 −2 Original line number Diff line number Diff line Loading @@ -126,8 +126,7 @@ static int uhid_read_event(btif_hh_device_t* p_dev) { btif_hh_setreport(p_dev, BTHH_FEATURE_REPORT, ev.u.output.size, ev.u.output.data); else if (ev.u.output.rtype == UHID_OUTPUT_REPORT) btif_hh_setreport(p_dev, BTHH_OUTPUT_REPORT, ev.u.output.size, ev.u.output.data); btif_hh_senddata(p_dev, ev.u.output.size, ev.u.output.data); else APPL_TRACE_ERROR("%s: UHID_OUTPUT: Invalid report type = %d", __func__, ev.u.output.rtype); Loading
system/btif/include/btif_hh.h +2 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,8 @@ extern void btif_hh_disconnect(RawAddress* bd_addr); extern void btif_hh_setreport(btif_hh_device_t* p_dev, bthh_report_type_t r_type, uint16_t size, uint8_t* report); extern void btif_hh_senddata(btif_hh_device_t* p_dev, uint16_t size, uint8_t* report); extern void btif_hh_getreport(btif_hh_device_t* p_dev, bthh_report_type_t r_type, uint8_t reportId, uint16_t bufferSize); Loading
system/btif/src/btif_hh.cc +20 −0 Original line number Diff line number Diff line Loading @@ -653,6 +653,26 @@ void btif_hh_setreport(btif_hh_device_t* p_dev, bthh_report_type_t r_type, BTA_HhSetReport(p_dev->dev_handle, r_type, p_buf); } /******************************************************************************* * * Function btif_btif_hh_senddata * * Description senddata initiated from the BTIF thread context * * Returns void * ******************************************************************************/ void btif_hh_senddata(btif_hh_device_t* p_dev, uint16_t size, uint8_t* report) { BT_HDR* p_buf = create_pbuf(size, report); if (p_buf == NULL) { APPL_TRACE_ERROR("%s: Error, failed to allocate RPT buffer, size = %d", __func__, size); return; } p_buf->layer_specific = BTA_HH_RPTT_OUTPUT; BTA_HhSendData(p_dev->dev_handle, p_dev->bd_addr, p_buf); } /******************************************************************************* * * Function btif_hh_service_registration Loading