]> sigrok.org Git - libsigrok.git/blame_incremental - src/hardware/serial-dmm/api.c
dev_clear(): Consistently name callback 'clear_helper()'.
[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 (void)sdi;
156 (void)cg;
157
158 switch (key) {
159 case SR_CONF_SCAN_OPTIONS:
160 *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
161 scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t));
162 break;
163 case SR_CONF_DEVICE_OPTIONS:
164 *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
165 devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
166 break;
167 default:
168 return SR_ERR_NA;
169 }
170
171 return SR_OK;
172}
173
174static int dev_acquisition_start(const struct sr_dev_inst *sdi)
175{
176 struct dev_context *devc;
177 struct sr_serial_dev_inst *serial;
178
179 devc = sdi->priv;
180
181 sr_sw_limits_acquisition_start(&devc->limits);
182 std_session_send_df_header(sdi);
183
184 /* Poll every 50ms, or whenever some data comes in. */
185 serial = sdi->conn;
186 serial_source_add(sdi->session, serial, G_IO_IN, 50,
187 receive_data, (void *)sdi);
188
189 return SR_OK;
190}
191
192#define DMM(ID, CHIPSET, VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, \
193 DELAY, REQUEST, VALID, PARSE, DETAILS) \
194 &((struct dmm_info) { \
195 { \
196 .name = ID, \
197 .longname = VENDOR " " MODEL, \
198 .api_version = 1, \
199 .init = std_init, \
200 .cleanup = std_cleanup, \
201 .scan = scan, \
202 .dev_list = std_dev_list, \
203 .dev_clear = std_dev_clear, \
204 .config_get = NULL, \
205 .config_set = config_set, \
206 .config_list = config_list, \
207 .dev_open = std_serial_dev_open, \
208 .dev_close = std_serial_dev_close, \
209 .dev_acquisition_start = dev_acquisition_start, \
210 .dev_acquisition_stop = std_serial_dev_acquisition_stop, \
211 .context = NULL, \
212 }, \
213 VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, DELAY, \
214 REQUEST, VALID, PARSE, DETAILS, sizeof(struct CHIPSET##_info) \
215 }).di
216
217SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
218 /*
219 * The items are sorted by chipset first and then model name.
220 *
221 * This reflects the developer's perspective and is preferrable
222 * during maintenance, as a vendor/product based sort order does
223 * not work well for rebranded models, and from a support point
224 * of view it's more important to identify similarities between
225 * models and compatible devices.
226 *
227 * Fold marks {{{ }}} with matching braces were added, to further
228 * speed up navigation in the long list.
229 */
230 /* asycii based meters {{{ */
231 DMM(
232 "metrix-mx56c", asycii, "Metrix", "MX56C",
233 "2400/8n1", 2400, ASYCII_PACKET_SIZE, 0, 0, NULL,
234 sr_asycii_packet_valid, sr_asycii_parse, NULL
235 ),
236 /* }}} */
237 /* bm25x based meters {{{ */
238 DMM(
239 "brymen-bm25x", bm25x,
240 "Brymen", "BM25x", "9600/8n1/rts=1/dtr=1",
241 9600, BRYMEN_BM25X_PACKET_SIZE, 0, 0, NULL,
242 sr_brymen_bm25x_packet_valid, sr_brymen_bm25x_parse,
243 NULL
244 ),
245 /* }}} */
246 /* dtm0660 based meters {{{ */
247 DMM(
248 "peaktech-3415", dtm0660,
249 "PeakTech", "3415", "2400/8n1/rts=0/dtr=1",
250 2400, DTM0660_PACKET_SIZE, 0, 0, NULL,
251 sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL
252 ),
253 DMM(
254 "velleman-dvm4100", dtm0660,
255 "Velleman", "DVM4100", "2400/8n1/rts=0/dtr=1",
256 2400, DTM0660_PACKET_SIZE, 0, 0, NULL,
257 sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL
258 ),
259 /* }}} */
260 /* es519xx based meters {{{ */
261 DMM(
262 "iso-tech-idm103n", es519xx,
263 "ISO-TECH", "IDM103N", "2400/7o1/rts=0/dtr=1",
264 2400, ES519XX_11B_PACKET_SIZE, 0, 0, NULL,
265 sr_es519xx_2400_11b_packet_valid, sr_es519xx_2400_11b_parse,
266 NULL
267 ),
268 /*
269 * Note: ES51922 and ES51986 baudrate is actually 19230. This is
270 * "out" by .15%, and so is well within the typical 1% margin
271 * that is considered acceptable in UART communication, and thus
272 * should not cause an issue.
273 *
274 * However, using 19230 as baudrate here will not work, as most DMM
275 * cables do not support that baudrate!
276 */
277 DMM(
278 "tenma-72-7750-ser", es519xx,
279 "Tenma", "72-7750 (UT-D02 cable)", "19200/7o1/rts=0/dtr=1",
280 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL,
281 sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse,
282 NULL
283 ),
284 DMM(
285 "uni-t-ut60g-ser", es519xx,
286 "UNI-T", "UT60G (UT-D02 cable)", "19200/7o1/rts=0/dtr=1",
287 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL,
288 sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse,
289 NULL
290 ),
291 DMM(
292 "uni-t-ut61e-ser", es519xx,
293 "UNI-T", "UT61E (UT-D02 cable)", "19200/7o1/rts=0/dtr=1",
294 19200, ES519XX_14B_PACKET_SIZE, 0, 0, NULL,
295 sr_es519xx_19200_14b_packet_valid, sr_es519xx_19200_14b_parse,
296 NULL
297 ),
298 /* }}} */
299 /* fs9721 based meters {{{ */
300 DMM(
301 "digitek-dt4000zc", fs9721,
302 "Digitek", "DT4000ZC", "2400/8n1/dtr=1", 2400,
303 FS9721_PACKET_SIZE, 0, 0, NULL,
304 sr_fs9721_packet_valid, sr_fs9721_parse,
305 sr_fs9721_10_temp_c
306 ),
307 DMM(
308 "mastech-ms8250b", fs9721,
309 "MASTECH", "MS8250B", "2400/8n1/rts=0/dtr=1",
310 2400, FS9721_PACKET_SIZE, 0, 0, NULL,
311 sr_fs9721_packet_valid, sr_fs9721_parse,
312 NULL
313 ),
314 DMM(
315 "pce-pce-dm32", fs9721,
316 "PCE", "PCE-DM32", "2400/8n1", 2400,
317 FS9721_PACKET_SIZE, 0, 0, NULL,
318 sr_fs9721_packet_valid, sr_fs9721_parse,
319 sr_fs9721_01_10_temp_f_c
320 ),
321 DMM(
322 "peaktech-3330", fs9721,
323 "PeakTech", "3330", "2400/8n1/dtr=1", 2400,
324 FS9721_PACKET_SIZE, 0, 0, NULL,
325 sr_fs9721_packet_valid, sr_fs9721_parse,
326 sr_fs9721_01_10_temp_f_c
327 ),
328 DMM(
329 "tecpel-dmm-8061-ser", fs9721,
330 "Tecpel", "DMM-8061 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
331 2400, FS9721_PACKET_SIZE, 0, 0, NULL,
332 sr_fs9721_packet_valid, sr_fs9721_parse,
333 sr_fs9721_00_temp_c
334 ),
335 DMM(
336 "tekpower-tp4000ZC", fs9721,
337 "TekPower", "TP4000ZC", "2400/8n1/dtr=1", 2400,
338 FS9721_PACKET_SIZE, 0, 0, NULL,
339 sr_fs9721_packet_valid, sr_fs9721_parse,
340 sr_fs9721_10_temp_c
341 ),
342 DMM(
343 "tenma-72-7745-ser", fs9721,
344 "Tenma", "72-7745 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
345 2400, FS9721_PACKET_SIZE, 0, 0, NULL,
346 sr_fs9721_packet_valid, sr_fs9721_parse,
347 sr_fs9721_00_temp_c
348 ),
349 DMM(
350 "uni-t-ut60a-ser", fs9721,
351 "UNI-T", "UT60A (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
352 2400, FS9721_PACKET_SIZE, 0, 0, NULL,
353 sr_fs9721_packet_valid, sr_fs9721_parse,
354 NULL
355 ),
356 DMM(
357 "uni-t-ut60e-ser", fs9721,
358 "UNI-T", "UT60E (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
359 2400, FS9721_PACKET_SIZE, 0, 0, NULL,
360 sr_fs9721_packet_valid, sr_fs9721_parse,
361 sr_fs9721_00_temp_c
362 ),
363 DMM(
364 "va-va18b", fs9721,
365 "V&A", "VA18B", "2400/8n1", 2400,
366 FS9721_PACKET_SIZE, 0, 0, NULL,
367 sr_fs9721_packet_valid, sr_fs9721_parse,
368 sr_fs9721_01_temp_c
369 ),
370 DMM(
371 "va-va40b", fs9721,
372 "V&A", "VA40B", "2400/8n1", 2400,
373 FS9721_PACKET_SIZE, 0, 0, NULL,
374 sr_fs9721_packet_valid, sr_fs9721_parse,
375 sr_fs9721_max_c_min
376 ),
377 DMM(
378 "voltcraft-vc820-ser", fs9721,
379 "Voltcraft", "VC-820 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
380 2400, FS9721_PACKET_SIZE, 0, 0, NULL,
381 sr_fs9721_packet_valid, sr_fs9721_parse,
382 NULL
383 ),
384 DMM(
385 "voltcraft-vc840-ser", fs9721,
386 "Voltcraft", "VC-840 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
387 2400, FS9721_PACKET_SIZE, 0, 0, NULL,
388 sr_fs9721_packet_valid, sr_fs9721_parse,
389 sr_fs9721_00_temp_c
390 ),
391 /* }}} */
392 /* fs9922 based meters {{{ */
393 DMM(
394 "sparkfun-70c", fs9922,
395 "SparkFun", "70C", "2400/8n1/rts=0/dtr=1",
396 2400, FS9922_PACKET_SIZE, 0, 0, NULL,
397 sr_fs9922_packet_valid, sr_fs9922_parse, NULL
398 ),
399 DMM(
400 "uni-t-ut61b-ser", fs9922,
401 "UNI-T", "UT61B (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
402 2400, FS9922_PACKET_SIZE, 0, 0, NULL,
403 sr_fs9922_packet_valid, sr_fs9922_parse, NULL
404 ),
405 DMM(
406 "uni-t-ut61c-ser", fs9922,
407 "UNI-T", "UT61C (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
408 2400, FS9922_PACKET_SIZE, 0, 0, NULL,
409 sr_fs9922_packet_valid, sr_fs9922_parse, NULL
410 ),
411 DMM(
412 "uni-t-ut61d-ser", fs9922,
413 "UNI-T", "UT61D (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
414 2400, FS9922_PACKET_SIZE, 0, 0, NULL,
415 sr_fs9922_packet_valid, sr_fs9922_parse, NULL
416 ),
417 DMM(
418 /*
419 * Note: The VC830 doesn't set the 'volt' and 'diode' bits of
420 * the FS9922 protocol. Instead, it only sets the user-defined
421 * bit "z1" to indicate "diode mode" and "voltage".
422 */
423 "voltcraft-vc830-ser", fs9922,
424 "Voltcraft", "VC-830 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1",
425 2400, FS9922_PACKET_SIZE, 0, 0, NULL,
426 sr_fs9922_packet_valid, sr_fs9922_parse,
427 &sr_fs9922_z1_diode
428 ),
429 /* }}} */
430 /* m2110 based meters {{{ */
431 DMM(
432 "bbcgm-2010", m2110,
433 "BBC Goertz Metrawatt", "M2110", "1200/7n2", 1200,
434 BBCGM_M2110_PACKET_SIZE, 0, 0, NULL,
435 sr_m2110_packet_valid, sr_m2110_parse,
436 NULL
437 ),
438 /* }}} */
439 /* metex14 based meters {{{ */
440 DMM(
441 "mastech-mas345", metex14,
442 "MASTECH", "MAS345", "600/7n2/rts=0/dtr=1", 600,
443 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
444 sr_metex14_packet_valid, sr_metex14_parse,
445 NULL
446 ),
447 DMM(
448 "metex-m3640d", metex14,
449 "Metex", "M-3640D", "1200/7n2/rts=0/dtr=1", 1200,
450 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
451 sr_metex14_packet_valid, sr_metex14_parse,
452 NULL
453 ),
454 DMM(
455 "metex-m4650cr", metex14,
456 "Metex", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200,
457 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
458 sr_metex14_packet_valid, sr_metex14_parse,
459 NULL
460 ),
461 DMM(
462 "metex-me31", metex14,
463 "Metex", "ME-31", "600/7n2/rts=0/dtr=1", 600,
464 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
465 sr_metex14_packet_valid, sr_metex14_parse,
466 NULL
467 ),
468 DMM(
469 "peaktech-3410", metex14,
470 "PeakTech", "3410", "600/7n2/rts=0/dtr=1", 600,
471 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
472 sr_metex14_packet_valid, sr_metex14_parse,
473 NULL
474 ),
475 DMM(
476 "peaktech-4370", metex14,
477 "PeakTech", "4370", "1200/7n2/rts=0/dtr=1", 1200,
478 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
479 sr_metex14_packet_valid, sr_metex14_parse,
480 NULL
481 ),
482 DMM(
483 "radioshack-22-168", metex14,
484 "RadioShack", "22-168", "1200/7n2/rts=0/dtr=1", 1200,
485 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
486 sr_metex14_packet_valid, sr_metex14_parse,
487 NULL
488 ),
489 DMM(
490 "radioshack-22-805", metex14,
491 "RadioShack", "22-805", "600/7n2/rts=0/dtr=1", 600,
492 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
493 sr_metex14_packet_valid, sr_metex14_parse,
494 NULL
495 ),
496 DMM(
497 "voltcraft-m3650cr", metex14,
498 "Voltcraft", "M-3650CR", "1200/7n2/rts=0/dtr=1", 1200,
499 METEX14_PACKET_SIZE, 150, 20, sr_metex14_packet_request,
500 sr_metex14_packet_valid, sr_metex14_parse,
501 NULL
502 ),
503 DMM(
504 "voltcraft-m3650d", metex14,
505 "Voltcraft", "M-3650D", "1200/7n2/rts=0/dtr=1", 1200,
506 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
507 sr_metex14_packet_valid, sr_metex14_parse,
508 NULL
509 ),
510 DMM(
511 "voltcraft-m4650cr", metex14,
512 "Voltcraft", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200,
513 METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request,
514 sr_metex14_packet_valid, sr_metex14_parse,
515 NULL
516 ),
517 DMM(
518 "voltcraft-me42", metex14,
519 "Voltcraft", "ME-42", "600/7n2/rts=0/dtr=1", 600,
520 METEX14_PACKET_SIZE, 250, 60, sr_metex14_packet_request,
521 sr_metex14_packet_valid, sr_metex14_parse,
522 NULL
523 ),
524 /* }}} */
525 /* rs9lcd based meters {{{ */
526 DMM(
527 "radioshack-22-812", rs9lcd,
528 "RadioShack", "22-812", "4800/8n1/rts=0/dtr=1", 4800,
529 RS9LCD_PACKET_SIZE, 0, 0, NULL,
530 sr_rs9lcd_packet_valid, sr_rs9lcd_parse,
531 NULL
532 ),
533 /* }}} */
534 /* ut71x based meters {{{ */
535 DMM(
536 "tenma-72-7730-ser", ut71x,
537 "Tenma", "72-7730 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
538 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
539 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
540 ),
541 DMM(
542 "tenma-72-7732-ser", ut71x,
543 "Tenma", "72-7732 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
544 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
545 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
546 ),
547 DMM(
548 "tenma-72-9380a-ser", ut71x,
549 "Tenma", "72-9380A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
550 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
551 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
552 ),
553 DMM(
554 "uni-t-ut71a-ser", ut71x,
555 "UNI-T", "UT71A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
556 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
557 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
558 ),
559 DMM(
560 "uni-t-ut71b-ser", ut71x,
561 "UNI-T", "UT71B (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
562 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
563 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
564 ),
565 DMM(
566 "uni-t-ut71c-ser", ut71x,
567 "UNI-T", "UT71C (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
568 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
569 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
570 ),
571 DMM(
572 "uni-t-ut71d-ser", ut71x,
573 "UNI-T", "UT71D (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
574 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
575 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
576 ),
577 DMM(
578 "uni-t-ut71e-ser", ut71x,
579 "UNI-T", "UT71E (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
580 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
581 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
582 ),
583 DMM(
584 "voltcraft-vc920-ser", ut71x,
585 "Voltcraft", "VC-920 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
586 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
587 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
588 ),
589 DMM(
590 "voltcraft-vc940-ser", ut71x,
591 "Voltcraft", "VC-940 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
592 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
593 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
594 ),
595 DMM(
596 "voltcraft-vc960-ser", ut71x,
597 "Voltcraft", "VC-960 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1",
598 2400, UT71X_PACKET_SIZE, 0, 0, NULL,
599 sr_ut71x_packet_valid, sr_ut71x_parse, NULL
600 ),
601 /* }}} */
602 /* vc870 based meters {{{ */
603 DMM(
604 "voltcraft-vc870-ser", vc870,
605 "Voltcraft", "VC-870 (UT-D02 cable)", "9600/8n1/rts=0/dtr=1",
606 9600, VC870_PACKET_SIZE, 0, 0, NULL,
607 sr_vc870_packet_valid, sr_vc870_parse, NULL
608 ),
609 /* }}} */
610 /*
611 * The list is sorted. Add new items in the respective chip's group.
612 */
613);