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