]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/link-mso19/api.c
sr_dev_open(): Set status to SR_ST_ACTIVE upon success.
[libsigrok.git] / src / hardware / link-mso19 / api.c
index a3b00869b76ad34c488fdc2d015314fa0ffece96..5924aeb956edbe228c8b640355a967f536112c90 100644 (file)
@@ -180,8 +180,6 @@ static int dev_open(struct sr_dev_inst *sdi)
        if (serial_open(devc->serial, SERIAL_RDWR) != SR_OK)
                return SR_ERR;
 
-       sdi->status = SR_ST_ACTIVE;
-
        /* FIXME: discard serial buffer */
        mso_check_trigger(devc->serial, &devc->trigger_state);
        sr_dbg("Trigger state: 0x%x.", devc->trigger_state);
@@ -238,9 +236,6 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
 
        devc = sdi->priv;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        switch (key) {
        case SR_CONF_SAMPLERATE:
                // FIXME
@@ -330,9 +325,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        struct dev_context *devc;
        int ret = SR_ERR;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        devc = sdi->priv;
 
        if (mso_configure_channels(sdi) != SR_OK) {
@@ -380,7 +372,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        /* Reset trigger state. */
        devc->trigger_state = 0x00;
 
-       std_session_send_df_header(sdi, LOG_PREFIX);
+       std_session_send_df_header(sdi);
 
        /* Our first channel is analog, the other 8 are of type 'logic'. */
        /* TODO. */