]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/serial-dmm/api.c
std: Add and use std_dev_clear() where possible.
[libsigrok.git] / src / hardware / serial-dmm / api.c
index fe3b000c73ae58b8077e0daa055ecef53bddb9b9..99b2a717672da9e50ebff03fe7d713d95c6dcaf5 100644 (file)
@@ -144,9 +144,6 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
 
        (void)cg;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        devc = sdi->priv;
 
        return sr_sw_limits_config_set(&devc->limits, key, data);
@@ -179,9 +176,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        struct dev_context *devc;
        struct sr_serial_dev_inst *serial;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        devc = sdi->priv;
 
        sr_sw_limits_acquisition_start(&devc->limits);
@@ -206,6 +200,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
                        .cleanup = std_cleanup, \
                        .scan = scan, \
                        .dev_list = std_dev_list, \
+                       .dev_clear = std_dev_clear, \
                        .config_get = NULL, \
                        .config_set = config_set, \
                        .config_list = config_list, \
@@ -232,6 +227,13 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
         * Fold marks {{{ }}} with matching braces were added, to further
         * speed up navigation in the long list.
         */
+       /* asycii based meters {{{ */
+       DMM(
+               "metrix-mx56c", asycii, "Metrix", "MX56C",
+               "2400/8n1", 2400, ASYCII_PACKET_SIZE, 0, 0, NULL,
+               sr_asycii_packet_valid, sr_asycii_parse, NULL
+       ),
+       /* }}} */
        /* bm25x based meters {{{ */
        DMM(
                "brymen-bm25x", bm25x,
@@ -388,6 +390,12 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
        ),
        /* }}} */
        /* fs9922 based meters {{{ */
+       DMM(
+               "sparkfun-70c", fs9922,
+               "SparkFun", "70C", "2400/8n1/rts=0/dtr=1",
+               2400, FS9922_PACKET_SIZE, 0, 0, NULL,
+               sr_fs9922_packet_valid, sr_fs9922_parse, NULL
+       ),
        DMM(
                "uni-t-ut61b-ser", fs9922,
                "UNI-T", "UT61B (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
@@ -419,14 +427,16 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
                &sr_fs9922_z1_diode
        ),
        /* }}} */
-       /* metex14 based meters {{{ */
+       /* m2110 based meters {{{ */
        DMM(
-               "bbcgm-2010", metex14,
+               "bbcgm-2010", m2110,
                "BBC Goertz Metrawatt", "M2110", "1200/7n2", 1200,
                BBCGM_M2110_PACKET_SIZE, 0, 0, NULL,
                sr_m2110_packet_valid, sr_m2110_parse,
                NULL
        ),
+       /* }}} */
+       /* metex14 based meters {{{ */
        DMM(
                "mastech-mas345", metex14,
                "MASTECH", "MAS345", "600/7n2/rts=0/dtr=1", 600,