]> sigrok.org Git - libsigrok.git/blobdiff - hardware/ikalogic-scanalogic2/api.c
probe_groups: API changes required to implement probe groups.
[libsigrok.git] / hardware / ikalogic-scanalogic2 / api.c
index 501a58fed47ad8199864df81fb649c15020e8e1a..1fe869c38d4c7b4ce8db9300e0a0cc9ddf2e8b53 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,
@@ -234,7 +234,7 @@ static int dev_open(struct sr_dev_inst *sdi)
        if (libusb_kernel_driver_active(usb->devhdl, USB_INTERFACE) == 1) {
                ret = libusb_detach_kernel_driver(usb->devhdl, USB_INTERFACE);
                if (ret < 0) {
-                       sr_err("Failed to detach kernel driver: %i.",
+                       sr_err("Failed to detach kernel driver: %s.",
                                libusb_error_name(ret));
                        return SR_ERR;
                }
@@ -307,11 +307,14 @@ static int cleanup(void)
        return dev_clear();
 }
 
-static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi)
+static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
+               const struct sr_probe_group *probe_group)
 {
        struct dev_context *devc;
        int ret;
 
+       (void)probe_group;
+
        ret = SR_OK;
        devc = sdi->priv;
 
@@ -329,11 +332,14 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi)
        return ret;
 }
 
-static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi)
+static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
+               const struct sr_probe_group *probe_group)
 {
        uint64_t samplerate, limit_samples, capture_ratio;
        int ret;
 
+       (void)probe_group;
+
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
 
@@ -359,13 +365,15 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi)
        return ret;
 }
 
-static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi)
+static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
+               const struct sr_probe_group *probe_group)
 {
        GVariant *gvar;
        GVariantBuilder gvb;
        int ret;
 
        (void)sdi;
+       (void)probe_group;
 
        ret = SR_OK;