]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/serial-dmm/api.c
Consistently don't check sdi->priv in dev_acquisition_start().
[libsigrok.git] / src / hardware / serial-dmm / api.c
index 25e7bb61a997c8809753adbe95d8204c484927d5..f53381bf93856f3b2d1ae935ec8d8a5deca49f4a 100644 (file)
@@ -19,6 +19,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -218,11 +219,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
 
-       if (!(devc = sdi->priv)) {
-               sr_err("sdi->priv was NULL.");
-               return SR_ERR_BUG;
-       }
-
+       devc = sdi->priv;
        devc->cb_data = cb_data;
 
        /*
@@ -233,7 +230,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
        devc->num_samples = 0;
        devc->starttime = g_get_monotonic_time();
 
-       /* Send header packet to the session bus. */
        std_session_send_df_header(cb_data, LOG_PREFIX);
 
        /* Poll every 50ms, or whenever some data comes in. */
@@ -558,6 +554,24 @@ SR_PRIV const struct dmm_info *serial_dmm_drivers[] = {
                sr_es519xx_2400_11b_packet_valid, sr_es519xx_2400_11b_parse,
                NULL
        ),
+       DMM(
+               "tenma-72-7730-ser", ut71x,
+               "Tenma", "72-7730 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
+               2400, UT71X_PACKET_SIZE, 0, 0, NULL,
+               sr_ut71x_packet_valid, sr_ut71x_parse, NULL
+       ),
+       DMM(
+               "tenma-72-7732-ser", ut71x,
+               "Tenma", "72-7732 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
+               2400, UT71X_PACKET_SIZE, 0, 0, NULL,
+               sr_ut71x_packet_valid, sr_ut71x_parse, NULL
+       ),
+       DMM(
+               "tenma-72-9380a-ser", ut71x,
+               "Tenma", "72-9380A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
+               2400, UT71X_PACKET_SIZE, 0, 0, NULL,
+               sr_ut71x_packet_valid, sr_ut71x_parse, NULL
+       ),
        DMM(
                "tenma-72-7745-ser", fs9721,
                "Tenma", "72-7745 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
@@ -580,5 +594,17 @@ SR_PRIV const struct dmm_info *serial_dmm_drivers[] = {
                sr_brymen_bm25x_packet_valid, sr_brymen_bm25x_parse,
                NULL
        ),
+       DMM(
+               "velleman-dvm4100", dtm0660,
+               "Velleman", "DVM4100", "2400/8n1/rts=0/dtr=1",
+               2400, DTM0660_PACKET_SIZE, 0, 0, NULL,
+               sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL
+       ),
+       DMM(
+               "peaktech-3415", dtm0660,
+               "Peaktech", "3415", "2400/8n1/rts=0/dtr=1",
+               2400, DTM0660_PACKET_SIZE, 0, 0, NULL,
+               sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL
+       ),
        NULL
 };