]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/brymen-bm86x/api.c
std_gvar_tuple_array(): Change to allow for more ARRAY_AND_SIZE usage.
[libsigrok.git] / src / hardware / brymen-bm86x / api.c
index 7316e362dd8e4ea12ad2ab09bb94e396dbcc1b31..3b4da51611a489f6a8d1668e66fe842276dfef5e 100644 (file)
@@ -26,8 +26,11 @@ static const uint32_t scanopts[] = {
        SR_CONF_CONN,
 };
 
-static const uint32_t devopts[] = {
+static const uint32_t drvopts[] = {
        SR_CONF_MULTIMETER,
+};
+
+static const uint32_t devopts[] = {
        SR_CONF_CONTINUOUS,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
@@ -98,7 +101,6 @@ static int dev_open(struct sr_dev_inst *sdi)
        if ((ret = sr_usb_open(drvc->sr_ctx->libusb_ctx, usb)) < 0)
                return SR_ERR;
 
-       /* Detach kernel drivers which grabbed this device (if any). */
        if (libusb_kernel_driver_active(usb->devhdl, 0) == 1) {
                ret = libusb_detach_kernel_driver(usb->devhdl, 0);
                if (ret < 0) {
@@ -109,7 +111,6 @@ static int dev_open(struct sr_dev_inst *sdi)
                devc->detached_kernel_driver = 1;
        }
 
-       /* Claim interface 0. */
        if ((ret = libusb_claim_interface(usb->devhdl, 0)) < 0) {
                sr_err("Failed to claim interface 0: %s.",
                       libusb_error_name(ret));
@@ -169,7 +170,7 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
 static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
                const struct sr_channel_group *cg)
 {
-       return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, NULL, devopts);
+       return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
 }
 
 static int dev_acquisition_start(const struct sr_dev_inst *sdi)