]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/serial-dmm/api.c
serial-dmm: Use a custom dummy struct for m2110.
[libsigrok.git] / src / hardware / serial-dmm / api.c
index 4451b8ecb126287cf4b0842575c2909ab92976ff..e39480e95eba1420c908ac12a665618776ca0ebe 100644 (file)
@@ -232,6 +232,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,
@@ -244,7 +251,7 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
        /* dtm0660 based meters {{{ */
        DMM(
                "peaktech-3415", dtm0660,
-               "Peaktech", "3415", "2400/8n1/rts=0/dtr=1",
+               "PeakTech", "3415", "2400/8n1/rts=0/dtr=1",
                2400, DTM0660_PACKET_SIZE, 0, 0, NULL,
                sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL
        ),
@@ -263,16 +270,23 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
                sr_es519xx_2400_11b_packet_valid, sr_es519xx_2400_11b_parse,
                NULL
        ),
+       /*
+        * Note: ES51922 and ES51986 baudrate is actually 19230. This is
+        * "out" by .15%, and so is well within the typical 1% margin
+        * that is considered acceptable in UART communication, and thus
+        * should not cause an issue.
+        *
+        * However, using 19230 as baudrate here will not work, as most DMM
+        * cables do not support that baudrate!
+        */
        DMM(
                "tenma-72-7750-ser", es519xx,
-               /* Note: ES51986 baudrate is actually 19230! */
                "Tenma", "72-7750 (UT-D02 cable)", "19200/7o1/rts=0/dtr=1",
                19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL,
                sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse,
                NULL
        ),
        DMM(
-               /* Note: ES51986 baudrate is actually 19230! */
                "uni-t-ut60g-ser", es519xx,
                "UNI-T", "UT60G (UT-D02 cable)", "19200/7o1/rts=0/dtr=1",
                19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL,
@@ -281,7 +295,6 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
        ),
        DMM(
                "uni-t-ut61e-ser", es519xx,
-               /* Note: ES51922 baudrate is actually 19230! */
                "UNI-T", "UT61E (UT-D02 cable)", "19200/7o1/rts=0/dtr=1",
                19200, ES519XX_14B_PACKET_SIZE, 0, 0, NULL,
                sr_es519xx_19200_14b_packet_valid, sr_es519xx_19200_14b_parse,
@@ -312,7 +325,7 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
        ),
        DMM(
                "peaktech-3330", fs9721,
-               "Peaktech", "3330", "2400/8n1/dtr=1", 2400,
+               "PeakTech", "3330", "2400/8n1/dtr=1", 2400,
                FS9721_PACKET_SIZE, 0, 0, NULL,
                sr_fs9721_packet_valid, sr_fs9721_parse,
                sr_fs9721_01_10_temp_f_c
@@ -413,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,
@@ -451,7 +466,7 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
        ),
        DMM(
                "peaktech-3410", metex14,
-               "Peaktech", "3410", "600/7n2/rts=0/dtr=1", 600,
+               "PeakTech", "3410", "600/7n2/rts=0/dtr=1", 600,
                METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
                sr_metex14_packet_valid, sr_metex14_parse,
                NULL
@@ -506,7 +521,7 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
                NULL
        ),
        /* }}} */
-       /* meters based on other chips (to get sorted) */
+       /* rs9lcd based meters {{{ */
        DMM(
                "radioshack-22-812", rs9lcd,
                "RadioShack", "22-812", "4800/8n1/rts=0/dtr=1", 4800,
@@ -514,27 +529,23 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
                sr_rs9lcd_packet_valid, sr_rs9lcd_parse,
                NULL
        ),
+       /* }}} */
+       /* ut71x based meters {{{ */
        DMM(
-               "voltcraft-vc870-ser", vc870,
-               "Voltcraft", "VC-870 (UT-D02 cable)", "9600/8n1/rts=0/dtr=1",
-               9600, VC870_PACKET_SIZE, 0, 0, NULL,
-               sr_vc870_packet_valid, sr_vc870_parse, NULL
-       ),
-       DMM(
-               "voltcraft-vc920-ser", ut71x,
-               "Voltcraft", "VC-920 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
+               "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(
-               "voltcraft-vc940-ser", ut71x,
-               "Voltcraft", "VC-940 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
+               "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(
-               "voltcraft-vc960-ser", ut71x, 
-               "Voltcraft", "VC-960 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
+               "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
        ),
@@ -569,21 +580,33 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
                sr_ut71x_packet_valid, sr_ut71x_parse, NULL
        ),
        DMM(
-               "tenma-72-7730-ser", ut71x,
-               "Tenma", "72-7730 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
+               "voltcraft-vc920-ser", ut71x,
+               "Voltcraft", "VC-920 (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",
+               "voltcraft-vc940-ser", ut71x,
+               "Voltcraft", "VC-940 (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",
+               "voltcraft-vc960-ser", ut71x,
+               "Voltcraft", "VC-960 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
                2400, UT71X_PACKET_SIZE, 0, 0, NULL,
                sr_ut71x_packet_valid, sr_ut71x_parse, NULL
        ),
+       /* }}} */
+       /* vc870 based meters {{{ */
+       DMM(
+               "voltcraft-vc870-ser", vc870,
+               "Voltcraft", "VC-870 (UT-D02 cable)", "9600/8n1/rts=0/dtr=1",
+               9600, VC870_PACKET_SIZE, 0, 0, NULL,
+               sr_vc870_packet_valid, sr_vc870_parse, NULL
+       ),
+       /* }}} */
+       /*
+        * The list is sorted. Add new items in the respective chip's group.
+        */
 );