serial-dmm: sort the list of device drivers (part 1, bm25x)

The previous implementation seems to have added drivers in their "order
of appearance". Start sorting the rather long list, to simplify several
tasks: Add new entries as more drivers get written, find existing items
during research, identify and compare similar models during maintenance.
As a byproduct, there will be no doubt about where to put things during
future work :) and duplicates will be spotted immediately.

This commit puts 'bm25x' meters into one group. And comments on the sort
order and motivation for sorting the table.
This commit is contained in:
Gerhard Sittig 2016-11-05 16:19:58 +01:00 committed by Uwe Hermann
parent 6b7e644e5c
commit c06785841c
1 changed files with 22 additions and 7 deletions

View 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",