def send_feature_report(data)
      raise ArgumentError, 'data must not be blank' if data.nil? || data.length < 1
      raise HIDAPI::DeviceNotOpen unless open?

      data, report_number, skipped_report_id = clean_output_data(data)

      mutex.synchronize do
        handle.control_transfer(
            bmRequestType: LIBUSB::REQUEST_TYPE_CLASS | LIBUSB::RECIPIENT_INTERFACE | LIBUSB::ENDPOINT_OUT,
            bRequest: 0x09,   # HID Set_Report
            wValue: (3 << 8) | report_number,   # HID feature = 3
            wIndex: interface,
            dataOut: data
        )
      end

      data.length + (skipped_report_id ? 1 : 0)
    end
def send_feature_report(data)
      raise ArgumentError, 'data must not be blank' if data.nil? || data.length < 1
      raise HIDAPI::DeviceNotOpen unless open?

      data, report_number, skipped_report_id = clean_output_data(data)

      mutex.synchronize do
        handle.control_transfer(
            bmRequestType: LIBUSB::REQUEST_TYPE_CLASS | LIBUSB::RECIPIENT_INTERFACE | LIBUSB::ENDPOINT_OUT,
            bRequest: 0x09,   
            wValue: (3 << 8) | report_number,   
            wIndex: interface,
            dataOut: data
        )
      end

      data.length + (skipped_report_id ? 1 : 0)
    end
def send_feature_report ( data ) raise ArgumentError , 'data must not be blank' if data . nil? || data . length < 1 raise HIDAPI :: DeviceNotOpen unless open? data , report_number , skipped_report_id = clean_output_data ( data ) mutex . synchronize do handle . control_transfer ( bmRequestType : LIBUSB :: REQUEST_TYPE_CLASS | LIBUSB :: RECIPIENT_INTERFACE | LIBUSB :: ENDPOINT_OUT , bRequest : 0x09 , # HID Set_Report wValue : ( 3 << 8 ) | report_number , # HID feature = 3 wIndex : interface , dataOut : data ) end data . length + ( skipped_report_id ? 1 : 0 ) end
Sends a feature report to the device.
Sends a feature report to the device .