]> sigrok.org Git - libsigrok.git/commitdiff
serial-dmm: Use a custom dummy struct for m2110.
authorUwe Hermann <redacted>
Wed, 24 May 2017 17:04:17 +0000 (19:04 +0200)
committerUwe Hermann <redacted>
Wed, 24 May 2017 17:04:17 +0000 (19:04 +0200)
This DMM/parser is not related to metex14, don't use that struct.

src/hardware/serial-dmm/api.c
src/libsigrok-internal.h

index a54fe03f7508b1d305b31769b34cfa5d1debc155..e39480e95eba1420c908ac12a665618776ca0ebe 100644 (file)
@@ -426,14 +426,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,
index fa4432fb8946b3e7957a4de26fc39b778563b295..2e041a26aef37edac32f4823ae3e864685085bc4 100644 (file)
@@ -1210,6 +1210,9 @@ SR_PRIV int sr_dtm0660_parse(const uint8_t *buf, float *floatval,
 
 #define BBCGM_M2110_PACKET_SIZE 9
 
+/* Dummy info struct. The parser does not use it. */
+struct m2110_info { int dummy; };
+
 SR_PRIV gboolean sr_m2110_packet_valid(const uint8_t *buf);
 SR_PRIV int sr_m2110_parse(const uint8_t *buf, float *floatval,
                             struct sr_datafeed_analog *analog, void *info);