]> sigrok.org Git - libsigrok.git/commitdiff
scan(): Consistently start out with SR_ST_INACTIVE.
authorUwe Hermann <redacted>
Sat, 23 Apr 2016 19:27:59 +0000 (21:27 +0200)
committerUwe Hermann <redacted>
Thu, 12 May 2016 12:59:56 +0000 (14:59 +0200)
A later call to open() will set the status to SR_ST_ACTIVE.

Only in the case of firmware/bitstream upload start with
SR_ST_INITIALIZING first.

src/hardware/arachnid-labs-re-load-pro/api.c
src/hardware/chronovu-la/api.c
src/hardware/conrad-digi-35-cpu/api.c
src/hardware/demo/demo.c
src/hardware/ftdi-la/api.c
src/hardware/ikalogic-scanaplus/api.c
src/hardware/maynuo-m97/api.c

index 203515c0fd914fa8bfd0726242b7a36103d6ffda..248d654905d3301df2ab000a71a29b2360dc7d17 100644 (file)
@@ -129,7 +129,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
        }
 
        sdi = g_malloc0(sizeof(struct sr_dev_inst));
-       sdi->status = SR_ST_ACTIVE;
+       sdi->status = SR_ST_INACTIVE;
        sdi->vendor = g_strdup("Arachnid Labs");
        sdi->model = g_strdup("Re:load Pro");
        sdi->version = g_strdup(buf + 8);
index c66783f67ba135153b6bf43b068edc332e76a53f..ae32677229677e3d898ed5e1e4f63f8cf835ec11 100644 (file)
@@ -112,7 +112,7 @@ static int add_device(int model, struct libusb_device_descriptor *des,
 
        /* Register the device with libsigrok. */
        sdi = g_malloc0(sizeof(struct sr_dev_inst));
-       sdi->status = SR_ST_INITIALIZING;
+       sdi->status = SR_ST_INACTIVE;
        sdi->vendor = g_strdup("ChronoVu");
        sdi->model = g_strdup(devc->prof->modelname);
        sdi->serial_num = g_strdup(serial_num);
index 5328ccd16f8545d51c225c43a53000290f8131fa..708afa22cc0c70d368bd9f648dc9631b7b62253b 100644 (file)
@@ -88,7 +88,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
        sr_spew("Conrad DIGI 35 CPU assumed at %s.", conn);
 
        sdi = g_malloc0(sizeof(struct sr_dev_inst));
-       sdi->status = SR_ST_ACTIVE;
+       sdi->status = SR_ST_INACTIVE;
        sdi->vendor = g_strdup("Conrad");
        sdi->model = g_strdup("DIGI 35 CPU");
        sdi->conn = serial;
index a84ee18b65756a24a9f03546491e85552624ebb7..0a220fe759fbe64df9aed7d3656dceac01166a59 100644 (file)
@@ -284,7 +284,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
        devices = NULL;
 
        sdi = g_malloc0(sizeof(struct sr_dev_inst));
-       sdi->status = SR_ST_ACTIVE;
+       sdi->status = SR_ST_INACTIVE;
        sdi->model = g_strdup("Demo device");
        sdi->driver = di;
 
index 4d39cd8fac55e6325860dea201f751602d144534..c49c9c7d6ef8a2b5382699b77579eb923ba6a80e 100644 (file)
@@ -148,7 +148,7 @@ static void scan_device(struct sr_dev_driver *di, struct libusb_device *dev, GSL
 
        /* Register the device with libsigrok. */
        sdi = g_malloc0(sizeof(struct sr_dev_inst));
-       sdi->status = SR_ST_INITIALIZING;
+       sdi->status = SR_ST_INACTIVE;
        sdi->vendor = vendor;
        sdi->model = model;
        sdi->serial_num = serial_num;
index 3111f53eb713ffc04008effa0a73cd01d5dabaab..bb8689bd4ae11adf24d01b7e00c00ee9fe768ecc 100644 (file)
@@ -114,7 +114,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
 
        /* Register the device with libsigrok. */
        sdi = g_malloc0(sizeof(struct sr_dev_inst));
-       sdi->status = SR_ST_INITIALIZING;
+       sdi->status = SR_ST_INACTIVE;
        sdi->vendor = g_strdup(USB_VENDOR_NAME);
        sdi->model = g_strdup(USB_MODEL_NAME);
        sdi->driver = di;
index c2b77b800ec9667ab7ba4633e0139a26a4645308..7bf960d66ac11e244206f68056b4b2c8ed03003f 100644 (file)
@@ -135,7 +135,7 @@ static struct sr_dev_inst *probe_device(struct sr_modbus_dev_inst *modbus)
        }
 
        sdi = g_malloc0(sizeof(struct sr_dev_inst));
-       sdi->status = SR_ST_ACTIVE;
+       sdi->status = SR_ST_INACTIVE;
        sdi->vendor = g_strdup("Maynuo");
        sdi->model = g_strdup(model->name);
        sdi->version = g_strdup_printf("v%d.%d", version/10, version%10);