]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/serial-dmm/api.c
serial-dmm: sort the list of device drivers (part 3, es519xx)
[libsigrok.git] / src / hardware / serial-dmm / api.c
index 2c436f080e313c8866d2388e5612b6b63028c0bb..521616f96240bcfd58d77156d37a34b1dae540f9 100644 (file)
@@ -220,6 +220,75 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        }).di
 
 SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
+       /*
+        * The items are sorted by chipset first and then model name.
+        *
+        * This reflects the developer's perspective and is preferrable
+        * during maintenance, as a vendor/product based sort order does
+        * not work well for rebranded models, and from a support point
+        * of view it's more important to identify similarities between
+        * models and compatible devices.
+        *
+        * Fold marks {{{ }}} with matching braces were added, to further
+        * speed up navigation in the long list.
+        */
+       /* bm25x based meters {{{ */
+       DMM(
+               "brymen-bm25x", bm25x,
+               "Brymen", "BM25x", "9600/8n1/rts=1/dtr=1",
+               9600, BRYMEN_BM25X_PACKET_SIZE, 0, 0, NULL,
+               sr_brymen_bm25x_packet_valid, sr_brymen_bm25x_parse,
+               NULL
+       ),
+       /* }}} */
+       /* dtm0660 based meters {{{ */
+       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
+       ),
+       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
+       ),
+       /* }}} */
+       /* es519xx based meters {{{ */
+       DMM(
+               "iso-tech-idm103n", es519xx,
+               "ISO-TECH", "IDM103N", "2400/7o1/rts=0/dtr=1",
+               2400, ES519XX_11B_PACKET_SIZE, 0, 0, NULL,
+               sr_es519xx_2400_11b_packet_valid, sr_es519xx_2400_11b_parse,
+               NULL
+       ),
+       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,
+               sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse,
+               NULL
+       ),
+       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,
+               NULL
+       ),
+       /* }}} */
+       /* meters based on other chips (to get sorted) */
        DMM(
                "bbcgm-2010", metex14,
                "BBC Goertz Metrawatt", "M2110", "1200/7n2", 1200,
@@ -431,14 +500,6 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
                sr_fs9721_packet_valid, sr_fs9721_parse,
                sr_fs9721_00_temp_c
        ),
-       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,
-               sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse,
-               NULL
-       ),
        DMM(
                "uni-t-ut61b-ser", fs9922,
                "UNI-T", "UT61B (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
@@ -457,14 +518,6 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
                2400, FS9922_PACKET_SIZE, 0, 0, NULL,
                sr_fs9922_packet_valid, sr_fs9922_parse, NULL
        ),
-       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,
-               NULL
-       ),
        DMM(
                "uni-t-ut71a-ser", ut71x,
                "UNI-T", "UT71A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
@@ -495,13 +548,6 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
                2400, UT71X_PACKET_SIZE, 0, 0, NULL,
                sr_ut71x_packet_valid, sr_ut71x_parse, NULL
        ),
-       DMM(
-               "iso-tech-idm103n", es519xx,
-               "ISO-TECH", "IDM103N", "2400/7o1/rts=0/dtr=1",
-               2400, ES519XX_11B_PACKET_SIZE, 0, 0, NULL,
-               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",
@@ -528,30 +574,10 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
                sr_fs9721_00_temp_c
        ),
        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(
-               "brymen-bm25x", bm25x,
-               "Brymen", "BM25x", "9600/8n1/rts=1/dtr=1",
-               9600, BRYMEN_BM25X_PACKET_SIZE, 0, 0, NULL,
-               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
+               "peaktech-3330", fs9721,
+               "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
        ),
 );