]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/serial-dmm/api.c
serial-dmm: sort the list of device drivers (part 1, bm25x)
[libsigrok.git] / src / hardware / serial-dmm / api.c
index b3408bae9c9b5890586fd053c3884e533fca5207..019bf2096695bda5c8f94021d4dabb5ef434775d 100644 (file)
@@ -220,6 +220,28 @@ 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
+       ),
+       /* }}} */
+       /* meters based on other chips (to get sorted) */
        DMM(
                "bbcgm-2010", metex14,
                "BBC Goertz Metrawatt", "M2110", "1200/7n2", 1200,
@@ -535,13 +557,6 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
                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",