]> sigrok.org Git - libsigrok.git/commitdiff
Use GET_REPORT request for device to host transfer.
authorMarc Schink <redacted>
Tue, 2 Jul 2013 19:52:23 +0000 (21:52 +0200)
committerUwe Hermann <redacted>
Fri, 5 Jul 2013 12:01:06 +0000 (14:01 +0200)
hardware/ikalogic-scanalogic2/api.c
hardware/ikalogic-scanalogic2/protocol.c
hardware/ikalogic-scanalogic2/protocol.h

index 915120825a885f04c8f434216b09397cd0ec8e73..4f1d09fbe50e0a47d38dc48122b2fa5bb13d6eab 100644 (file)
@@ -161,7 +161,7 @@ static GSList *scan(GSList *options)
                        PACKET_LENGTH);
 
                libusb_fill_control_setup(devc->xfer_buf_in,
-                       USB_REQUEST_TYPE_IN, USB_HID_SET_REPORT,
+                       USB_REQUEST_TYPE_IN, USB_HID_GET_REPORT,
                        USB_HID_REPORT_TYPE_FEATURE, USB_INTERFACE,
                        PACKET_LENGTH);
                libusb_fill_control_setup(devc->xfer_buf_out,
index 4ed690b6969a219ba89b3698e8e6ce39f563f194..29e374bc05479febd4ed001a98b1571451456258 100644 (file)
@@ -752,7 +752,7 @@ SR_PRIV int sl2_get_device_info(struct sr_usb_dev_inst usb,
 SR_PRIV int sl2_transfer_in(libusb_device_handle *dev_handle, uint8_t *data)
 {
        return libusb_control_transfer(dev_handle, USB_REQUEST_TYPE_IN,
-               USB_HID_SET_REPORT, USB_HID_REPORT_TYPE_FEATURE, USB_INTERFACE,
+               USB_HID_GET_REPORT, USB_HID_REPORT_TYPE_FEATURE, USB_INTERFACE,
                (unsigned char *)data, PACKET_LENGTH, USB_TIMEOUT);
 }
 
index 1756ed966e56d30af8e642f363f16ba041591dc2..adc3859237ae5283a55c07a7fa8b53131c8e8fc9 100644 (file)
@@ -49,6 +49,7 @@
 #define USB_REQUEST_TYPE_OUT           (LIBUSB_REQUEST_TYPE_CLASS | \
        LIBUSB_RECIPIENT_INTERFACE | LIBUSB_ENDPOINT_OUT)
 
+#define USB_HID_GET_REPORT             0x01
 #define USB_HID_SET_REPORT             0x09
 #define USB_HID_REPORT_TYPE_FEATURE    0x300