]> sigrok.org Git - libsigrok.git/blame_incremental - src/hardware/serial-dmm/api.c
drivers: Always use same scanopts/drvopts/devopts/devopts_cg* order.
[libsigrok.git] / src / hardware / serial-dmm / api.c
... / ...
CommitLineData
1/*
2 * This file is part of the libsigrok project.
3 *
4 * Copyright (C) 2012 Bert Vermeulen <bert@biot.com>
5 * Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com>
6 * Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#include <config.h>
23#include <sys/types.h>
24#include <sys/stat.h>
25#include <fcntl.h>
26#include <string.h>
27#include <glib.h>
28#include <libsigrok/libsigrok.h>
29#include "libsigrok-internal.h"
30#include "protocol.h"
31
32static const uint32_t scanopts[] = {
33 SR_CONF_CONN,
34 SR_CONF_SERIALCOMM,
35};
36
37static const uint32_t devopts[] = {
38 SR_CONF_MULTIMETER,
39 SR_CONF_CONTINUOUS,
40 SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
41 SR_CONF_LIMIT_MSEC | SR_CONF_SET,
42};
43
44static GSList *scan(struct sr_dev_driver *di, GSList *options)
45{
46 struct dmm_info *dmm;
47 struct sr_config *src;
48 GSList *l, *devices;
49 const char *conn, *serialcomm;
50 struct sr_dev_inst *sdi;
51 struct dev_context *devc;
52 struct sr_serial_dev_inst *serial;
53 int dropped, ret;
54 size_t len;
55 uint8_t buf[128];
56
57 dmm = (struct dmm_info *)di;
58
59 conn = serialcomm = NULL;
60 for (l = options; l; l = l->next) {
61 src = l->data;
62 switch (src->key) {
63 case SR_CONF_CONN:
64 conn = g_variant_get_string(src->data, NULL);
65 break;
66 case SR_CONF_SERIALCOMM:
67 serialcomm = g_variant_get_string(src->data, NULL);
68 break;
69 }
70 }
71 if (!conn)
72 return NULL;
73
74 if (!serialcomm)
75 serialcomm = dmm->conn;
76
77 serial = sr_serial_dev_inst_new(conn, serialcomm);
78
79 if (serial_open(serial, SERIAL_RDWR) != SR_OK)
80 return NULL;
81
82 sr_info("Probing serial port %s.", conn);
83
84 devices = NULL;
85 serial_flush(serial);
86
87 /* Request a packet if the DMM requires this. */
88 if (dmm->packet_request) {
89 if ((ret = dmm->packet_request(serial)) < 0) {
90 sr_err("Failed to request packet: %d.", ret);
91 return FALSE;
92 }
93 }
94
95 /*
96 * There's no way to get an ID from the multimeter. It just sends data
97 * periodically (or upon request), so the best we can do is check if
98 * the packets match the expected format.
99 */
100
101 /* Let's get a bit of data and see if we can find a packet. */
102 len = sizeof(buf);
103 ret = serial_stream_detect(serial, buf, &len, dmm->packet_size,
104 dmm->packet_valid, 3000,
105 dmm->baudrate);
106 if (ret != SR_OK)
107 goto scan_cleanup;
108
109 /*
110 * If we dropped more than two packets worth of data, something is
111 * wrong. We shouldn't quit however, since the dropped bytes might be
112 * just zeroes at the beginning of the stream. Those can occur as a
113 * combination of the nonstandard cable that ships with some devices
114 * and the serial port or USB to serial adapter.
115 */
116 dropped = len - dmm->packet_size;
117 if (dropped > 2 * dmm->packet_size)
118 sr_warn("Had to drop too much data.");
119
120 sr_info("Found device on port %s.", conn);
121
122 sdi = g_malloc0(sizeof(struct sr_dev_inst));
123 sdi->status = SR_ST_INACTIVE;
124 sdi->vendor = g_strdup(dmm->vendor);
125 sdi->model = g_strdup(dmm->device);
126 devc = g_malloc0(sizeof(struct dev_context));
127 sr_sw_limits_init(&devc->limits);
128 sdi->inst_type = SR_INST_SERIAL;
129 sdi->conn = serial;
130 sdi->priv = devc;
131 sr_channel_new(sdi, 0, SR_CHANNEL_ANALOG, TRUE, "P1");
132 devices = g_slist_append(devices, sdi);
133
134scan_cleanup:
135 serial_close(serial);
136
137 return std_scan_complete(di, devices);
138}
139
140static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
141 const struct sr_channel_group *cg)
142{
143 struct dev_context *devc;
144
145 (void)cg;
146
147 devc = sdi->priv;
148
149 return sr_sw_limits_config_set(&devc->limits, key, data);
150}
151
152static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
153 const struct sr_channel_group *cg)
154{
155 return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, NULL, devopts);
156}
157
158static int dev_acquisition_start(const struct sr_dev_inst *sdi)
159{
160 struct dev_context *devc;
161 struct sr_serial_dev_inst *serial;
162
163 devc = sdi->priv;
164
165 sr_sw_limits_acquisition_start(&devc->limits);
166 std_session_send_df_header(sdi);
167
168 /* Poll every 50ms, or whenever some data comes in. */
169 serial = sdi->conn;
170 serial_source_add(sdi->session, serial, G_IO_IN, 50,
171 receive_data, (void *)sdi);
172
173 return SR_OK;
174}
175
176#define DMM(ID, CHIPSET, VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, \
177 DELAY, REQUEST, VALID, PARSE, DETAILS) \
178 &((struct dmm_info) { \
179 { \
180 .name = ID, \
181 .longname = VENDOR " " MODEL, \
182 .api_version = 1, \
183 .init = std_init, \
184 .cleanup = std_cleanup, \
185 .scan = scan, \
186 .dev_list = std_dev_list, \
187 .dev_clear = std_dev_clear, \
188 .config_get = NULL, \
189 .config_set = config_set, \
190 .config_list = config_list, \
191 .dev_open = std_serial_dev_open, \
192 .dev_close = std_serial_dev_close, \
193 .dev_acquisition_start = dev_acquisition_start, \
194 .dev_acquisition_stop = std_serial_dev_acquisition_stop, \
195 .context = NULL, \
196 }, \
197 VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, DELAY, \
198 REQUEST, VALID, PARSE, DETAILS, sizeof(struct CHIPSET##_info) \
199 }).di
200
201SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
202 /*
203 * The items are sorted by chipset first and then model name.
204 *
205 * This reflects the developer's perspective and is preferrable
206 * during maintenance, as a vendor/product based sort order does
207 * not work well for rebranded models, and from a support point
208 * of view it's more important to identify similarities between
209 * models and compatible devices.
210 *
211 * Fold marks {{{ }}} with matching braces were added, to further
212 * speed up navigation in the long list.
213 */
214 /* asycii based meters {{{ */
215 DMM(
216 "metrix-mx56c", asycii, "Metrix", "MX56C",
217 "2400/8n1", 2400, ASYCII_PACKET_SIZE, 0, 0, NULL,
218 sr_asycii_packet_valid, sr_asycii_parse, NULL
219 ),
220 /* }}} */
221 /* bm25x based meters {{{ */
222 DMM(
223 "brymen-bm25x", bm25x,
224 "Brymen", "BM25x", "9600/8n1/rts=1/dtr=1",
225 9600, BRYMEN_BM25X_PACKET_SIZE, 0, 0, NULL,
226 sr_brymen_bm25x_packet_valid, sr_brymen_bm25x_parse,
227 NULL
228 ),
229 /* }}} */
230 /* dtm0660 based meters {{{ */
231 DMM(
232 "peaktech-3415", dtm0660,
233 "PeakTech", "3415", "2400/8n1/rts=0/dtr=1",
234 2400, DTM0660_PACKET_SIZE, 0, 0, NULL,
235 sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL
236 ),
237 DMM(
238 "velleman-dvm4100", dtm0660,
239 "Velleman", "DVM4100", "2400/8n1/rts=0/dtr=1",
240 2400, DTM0660_PACKET_SIZE, 0, 0, NULL,
241 sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL
242 ),
243 /* }}} */
244 /* es519xx based meters {{{ */
245 DMM(
246 "iso-tech-idm103n", es519xx,
247 "ISO-TECH", "IDM103N", "2400/7o1/rts=0/dtr=1",
248 2400, ES519XX_11B_PACKET_SIZE, 0, 0, NULL,
249 sr_es519xx_2400_11b_packet_valid, sr_es519xx_2400_11b_parse,
250 NULL
251 ),
252 /*
253 * Note: ES51922 and ES51986 baudrate is actually 19230. This is
254 * "out" by .15%, and so is well within the typical 1% margin
255 * that is considered acceptable in UART communication, and thus
256 * should not cause an issue.
257 *
258 * However, using 19230 as baudrate here will not work, as most DMM
259 * cables do not support that baudrate!
260 */
261 DMM(
262 "tenma-72-7750-ser", es519xx,
263 "Tenma", "72-7750 (UT-D02 cable)", "19200/7o1/rts=0/dtr=1",
264 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL,
265 sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse,
266 NULL
267 ),
268 DMM(
269 "uni-t-ut60g-ser", es519xx,
270 "UNI-T", "UT60G (UT-D02 cable)", "19200/7o1/rts=0/dtr=1",
271 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL,
272 sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse,
273 NULL
274 ),
275 DMM(
276 "uni-t-ut61e-ser", es519xx,
277 "UNI-T", "UT61E (UT-D02 cable)", "19200/7o1/rts=0/dtr=1",
278 19200, ES519XX_14B_PACKET_SIZE, 0, 0, NULL,
279 sr_es519xx_19200_14b_packet_valid, sr_es519xx_19200_14b_parse,
280 NULL
281 ),
282 /* }}} */
283 /* fs9721 based meters {{{ */
284 DMM(
285 "digitek-dt4000zc", fs9721,
286 "Digitek", "DT4000ZC", "2400/8n1/dtr=1", 2400,
287 FS9721_PACKET_SIZE, 0, 0, NULL,
288 sr_fs9721_packet_valid, sr_fs9721_parse,
289 sr_fs9721_10_temp_c
290 ),
291 DMM(
292 "mastech-ms8250b", fs9721,
293 "MASTECH", "MS8250B", "2400/8n1/rts=0/dtr=1",
294 2400, FS9721_PACKET_SIZE, 0, 0, NULL,
295 sr_fs9721_packet_valid, sr_fs9721_parse,
296 NULL
297 ),
298 DMM(
299 "pce-pce-dm32", fs9721,
300 "PCE", "PCE-DM32", "2400/8n1", 2400,
301 FS9721_PACKET_SIZE, 0, 0, NULL,
302 sr_fs9721_packet_valid, sr_fs9721_parse,
303 sr_fs9721_01_10_temp_f_c
304 ),
305 DMM(
306 "peaktech-3330", fs9721,
307 "PeakTech", "3330", "2400/8n1/dtr=1", 2400,
308 FS9721_PACKET_SIZE, 0, 0, NULL,
309 sr_fs9721_packet_valid, sr_fs9721_parse,
310 sr_fs9721_01_10_temp_f_c
311 ),
312 DMM(
313 "tecpel-dmm-8061-ser", fs9721,
314 "Tecpel", "DMM-8061 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
315 2400, FS9721_PACKET_SIZE, 0, 0, NULL,
316 sr_fs9721_packet_valid, sr_fs9721_parse,
317 sr_fs9721_00_temp_c
318 ),
319 DMM(
320 "tekpower-tp4000ZC", fs9721,
321 "TekPower", "TP4000ZC", "2400/8n1/dtr=1", 2400,
322 FS9721_PACKET_SIZE, 0, 0, NULL,
323 sr_fs9721_packet_valid, sr_fs9721_parse,
324 sr_fs9721_10_temp_c
325 ),
326 DMM(
327 "tenma-72-7745-ser", fs9721,
328 "Tenma", "72-7745 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
329 2400, FS9721_PACKET_SIZE, 0, 0, NULL,
330 sr_fs9721_packet_valid, sr_fs9721_parse,
331 sr_fs9721_00_temp_c
332 ),
333 DMM(
334 "uni-t-ut60a-ser", fs9721,
335 "UNI-T", "UT60A (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
336 2400, FS9721_PACKET_SIZE, 0, 0, NULL,
337 sr_fs9721_packet_valid, sr_fs9721_parse,
338 NULL
339 ),
340 DMM(
341 "uni-t-ut60e-ser", fs9721,
342 "UNI-T", "UT60E (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
343 2400, FS9721_PACKET_SIZE, 0, 0, NULL,
344 sr_fs9721_packet_valid, sr_fs9721_parse,
345 sr_fs9721_00_temp_c
346 ),
347 DMM(
348 "va-va18b", fs9721,
349 "V&A", "VA18B", "2400/8n1", 2400,
350 FS9721_PACKET_SIZE, 0, 0, NULL,
351 sr_fs9721_packet_valid, sr_fs9721_parse,
352 sr_fs9721_01_temp_c
353 ),
354 DMM(
355 "va-va40b", fs9721,
356 "V&A", "VA40B", "2400/8n1", 2400,
357 FS9721_PACKET_SIZE, 0, 0, NULL,
358 sr_fs9721_packet_valid, sr_fs9721_parse,
359 sr_fs9721_max_c_min
360 ),
361 DMM(
362 "voltcraft-vc820-ser", fs9721,
363 "Voltcraft", "VC-820 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
364 2400, FS9721_PACKET_SIZE, 0, 0, NULL,
365 sr_fs9721_packet_valid, sr_fs9721_parse,
366 NULL
367 ),
368 DMM(
369 "voltcraft-vc840-ser", fs9721,
370 "Voltcraft", "VC-840 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
371 2400, FS9721_PACKET_SIZE, 0, 0, NULL,
372 sr_fs9721_packet_valid, sr_fs9721_parse,
373 sr_fs9721_00_temp_c
374 ),
375 /* }}} */
376 /* fs9922 based meters {{{ */
377 DMM(
378 "sparkfun-70c", fs9922,
379 "SparkFun", "70C", "2400/8n1/rts=0/dtr=1",
380 2400, FS9922_PACKET_SIZE, 0, 0, NULL,
381 sr_fs9922_packet_valid, sr_fs9922_parse, NULL
382 ),
383 DMM(
384 "uni-t-ut61b-ser", fs9922,
385 "UNI-T", "UT61B (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
386 2400, FS9922_PACKET_SIZE, 0, 0, NULL,
387 sr_fs9922_packet_valid, sr_fs9922_parse, NULL
388 ),
389 DMM(
390 "uni-t-ut61c-ser", fs9922,
391 "UNI-T", "UT61C (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
392 2400, FS9922_PACKET_SIZE, 0, 0, NULL,
393 sr_fs9922_packet_valid, sr_fs9922_parse, NULL
394 ),
395 DMM(
396 "uni-t-ut61d-ser", fs9922,
397 "UNI-T", "UT61D (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
398 2400, FS9922_PACKET_SIZE, 0, 0, NULL,
399 sr_fs9922_packet_valid, sr_fs9922_parse, NULL
400 ),
401 DMM(
402 /*
403 * Note: The VC830 doesn't set the 'volt' and 'diode' bits of
404 * the FS9922 protocol. Instead, it only sets the user-defined
405 * bit "z1" to indicate "diode mode" and "voltage".
406 */
407 "voltcraft-vc830-ser", fs9922,
408 "Voltcraft", "VC-830 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
409 2400, FS9922_PACKET_SIZE, 0, 0, NULL,
410 sr_fs9922_packet_valid, sr_fs9922_parse,
411 &sr_fs9922_z1_diode
412 ),
413 /* }}} */
414 /* m2110 based meters {{{ */
415 DMM(
416 "bbcgm-2010", m2110,
417 "BBC Goertz Metrawatt", "M2110", "1200/7n2", 1200,
418 BBCGM_M2110_PACKET_SIZE, 0, 0, NULL,
419 sr_m2110_packet_valid, sr_m2110_parse,
420 NULL
421 ),
422 /* }}} */
423 /* metex14 based meters {{{ */
424 DMM(
425 "mastech-mas345", metex14,
426 "MASTECH", "MAS345", "600/7n2/rts=0/dtr=1", 600,
427 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
428 sr_metex14_packet_valid, sr_metex14_parse,
429 NULL
430 ),
431 DMM(
432 "metex-m3640d", metex14,
433 "Metex", "M-3640D", "1200/7n2/rts=0/dtr=1", 1200,
434 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
435 sr_metex14_packet_valid, sr_metex14_parse,
436 NULL
437 ),
438 DMM(
439 "metex-m4650cr", metex14,
440 "Metex", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200,
441 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
442 sr_metex14_packet_valid, sr_metex14_parse,
443 NULL
444 ),
445 DMM(
446 "metex-me31", metex14,
447 "Metex", "ME-31", "600/7n2/rts=0/dtr=1", 600,
448 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
449 sr_metex14_packet_valid, sr_metex14_parse,
450 NULL
451 ),
452 DMM(
453 "peaktech-3410", metex14,
454 "PeakTech", "3410", "600/7n2/rts=0/dtr=1", 600,
455 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
456 sr_metex14_packet_valid, sr_metex14_parse,
457 NULL
458 ),
459 DMM(
460 "peaktech-4370", metex14,
461 "PeakTech", "4370", "1200/7n2/rts=0/dtr=1", 1200,
462 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
463 sr_metex14_packet_valid, sr_metex14_parse,
464 NULL
465 ),
466 DMM(
467 "radioshack-22-168", metex14,
468 "RadioShack", "22-168", "1200/7n2/rts=0/dtr=1", 1200,
469 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
470 sr_metex14_packet_valid, sr_metex14_parse,
471 NULL
472 ),
473 DMM(
474 "radioshack-22-805", metex14,
475 "RadioShack", "22-805", "600/7n2/rts=0/dtr=1", 600,
476 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
477 sr_metex14_packet_valid, sr_metex14_parse,
478 NULL
479 ),
480 DMM(
481 "voltcraft-m3650cr", metex14,
482 "Voltcraft", "M-3650CR", "1200/7n2/rts=0/dtr=1", 1200,
483 METEX14_PACKET_SIZE, 150, 20, sr_metex14_packet_request,
484 sr_metex14_packet_valid, sr_metex14_parse,
485 NULL
486 ),
487 DMM(
488 "voltcraft-m3650d", metex14,
489 "Voltcraft", "M-3650D", "1200/7n2/rts=0/dtr=1", 1200,
490 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
491 sr_metex14_packet_valid, sr_metex14_parse,
492 NULL
493 ),
494 DMM(
495 "voltcraft-m4650cr", metex14,
496 "Voltcraft", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200,
497 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
498 sr_metex14_packet_valid, sr_metex14_parse,
499 NULL
500 ),
501 DMM(
502 "voltcraft-me42", metex14,
503 "Voltcraft", "ME-42", "600/7n2/rts=0/dtr=1", 600,
504 METEX14_PACKET_SIZE, 250, 60, sr_metex14_packet_request,
505 sr_metex14_packet_valid, sr_metex14_parse,
506 NULL
507 ),
508 /* }}} */
509 /* rs9lcd based meters {{{ */
510 DMM(
511 "radioshack-22-812", rs9lcd,
512 "RadioShack", "22-812", "4800/8n1/rts=0/dtr=1", 4800,
513 RS9LCD_PACKET_SIZE, 0, 0, NULL,
514 sr_rs9lcd_packet_valid, sr_rs9lcd_parse,
515 NULL
516 ),
517 /* }}} */
518 /* ut71x based meters {{{ */
519 DMM(
520 "tenma-72-7730-ser", ut71x,
521 "Tenma", "72-7730 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
522 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
523 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
524 ),
525 DMM(
526 "tenma-72-7732-ser", ut71x,
527 "Tenma", "72-7732 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
528 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
529 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
530 ),
531 DMM(
532 "tenma-72-9380a-ser", ut71x,
533 "Tenma", "72-9380A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
534 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
535 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
536 ),
537 DMM(
538 "uni-t-ut71a-ser", ut71x,
539 "UNI-T", "UT71A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
540 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
541 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
542 ),
543 DMM(
544 "uni-t-ut71b-ser", ut71x,
545 "UNI-T", "UT71B (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
546 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
547 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
548 ),
549 DMM(
550 "uni-t-ut71c-ser", ut71x,
551 "UNI-T", "UT71C (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
552 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
553 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
554 ),
555 DMM(
556 "uni-t-ut71d-ser", ut71x,
557 "UNI-T", "UT71D (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
558 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
559 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
560 ),
561 DMM(
562 "uni-t-ut71e-ser", ut71x,
563 "UNI-T", "UT71E (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
564 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
565 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
566 ),
567 DMM(
568 "voltcraft-vc920-ser", ut71x,
569 "Voltcraft", "VC-920 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
570 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
571 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
572 ),
573 DMM(
574 "voltcraft-vc940-ser", ut71x,
575 "Voltcraft", "VC-940 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
576 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
577 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
578 ),
579 DMM(
580 "voltcraft-vc960-ser", ut71x,
581 "Voltcraft", "VC-960 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
582 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
583 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
584 ),
585 /* }}} */
586 /* vc870 based meters {{{ */
587 DMM(
588 "voltcraft-vc870-ser", vc870,
589 "Voltcraft", "VC-870 (UT-D02 cable)", "9600/8n1/rts=0/dtr=1",
590 9600, VC870_PACKET_SIZE, 0, 0, NULL,
591 sr_vc870_packet_valid, sr_vc870_parse, NULL
592 ),
593 /* }}} */
594 /*
595 * The list is sorted. Add new items in the respective chip's group.
596 */
597);