]>
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 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 | ||
44 | static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx) | |
45 | { | |
46 | return std_init(sr_ctx, di, LOG_PREFIX); | |
47 | } | |
48 | ||
49 | static GSList *scan(struct sr_dev_driver *di, GSList *options) | |
50 | { | |
51 | struct dmm_info *dmm; | |
52 | struct sr_config *src; | |
53 | GSList *l, *devices; | |
54 | const char *conn, *serialcomm; | |
55 | struct sr_dev_inst *sdi; | |
56 | struct drv_context *drvc; | |
57 | struct dev_context *devc; | |
58 | struct sr_serial_dev_inst *serial; | |
59 | int dropped, ret; | |
60 | size_t len; | |
61 | uint8_t buf[128]; | |
62 | ||
63 | dmm = (struct dmm_info *)di; | |
64 | ||
65 | conn = serialcomm = NULL; | |
66 | for (l = options; l; l = l->next) { | |
67 | src = l->data; | |
68 | switch (src->key) { | |
69 | case SR_CONF_CONN: | |
70 | conn = g_variant_get_string(src->data, NULL); | |
71 | break; | |
72 | case SR_CONF_SERIALCOMM: | |
73 | serialcomm = g_variant_get_string(src->data, NULL); | |
74 | break; | |
75 | } | |
76 | } | |
77 | if (!conn) | |
78 | return NULL; | |
79 | ||
80 | if (!serialcomm) | |
81 | serialcomm = dmm->conn; | |
82 | ||
83 | serial = sr_serial_dev_inst_new(conn, serialcomm); | |
84 | ||
85 | if (serial_open(serial, SERIAL_RDWR) != SR_OK) | |
86 | return NULL; | |
87 | ||
88 | sr_info("Probing serial port %s.", conn); | |
89 | ||
90 | drvc = di->context; | |
91 | devices = NULL; | |
92 | serial_flush(serial); | |
93 | ||
94 | /* Request a packet if the DMM requires this. */ | |
95 | if (dmm->packet_request) { | |
96 | if ((ret = dmm->packet_request(serial)) < 0) { | |
97 | sr_err("Failed to request packet: %d.", ret); | |
98 | return FALSE; | |
99 | } | |
100 | } | |
101 | ||
102 | /* | |
103 | * There's no way to get an ID from the multimeter. It just sends data | |
104 | * periodically (or upon request), so the best we can do is check if | |
105 | * the packets match the expected format. | |
106 | */ | |
107 | ||
108 | /* Let's get a bit of data and see if we can find a packet. */ | |
109 | len = sizeof(buf); | |
110 | ret = serial_stream_detect(serial, buf, &len, dmm->packet_size, | |
111 | dmm->packet_valid, 3000, | |
112 | dmm->baudrate); | |
113 | if (ret != SR_OK) | |
114 | goto scan_cleanup; | |
115 | ||
116 | /* | |
117 | * If we dropped more than two packets worth of data, something is | |
118 | * wrong. We shouldn't quit however, since the dropped bytes might be | |
119 | * just zeroes at the beginning of the stream. Those can occur as a | |
120 | * combination of the nonstandard cable that ships with some devices | |
121 | * and the serial port or USB to serial adapter. | |
122 | */ | |
123 | dropped = len - dmm->packet_size; | |
124 | if (dropped > 2 * dmm->packet_size) | |
125 | sr_warn("Had to drop too much data."); | |
126 | ||
127 | sr_info("Found device on port %s.", conn); | |
128 | ||
129 | sdi = g_malloc0(sizeof(struct sr_dev_inst)); | |
130 | sdi->status = SR_ST_INACTIVE; | |
131 | sdi->vendor = g_strdup(dmm->vendor); | |
132 | sdi->model = g_strdup(dmm->device); | |
133 | devc = g_malloc0(sizeof(struct dev_context)); | |
134 | sdi->inst_type = SR_INST_SERIAL; | |
135 | sdi->conn = serial; | |
136 | sdi->priv = devc; | |
137 | sdi->driver = di; | |
138 | sr_channel_new(sdi, 0, SR_CHANNEL_ANALOG, TRUE, "P1"); | |
139 | drvc->instances = g_slist_append(drvc->instances, sdi); | |
140 | devices = g_slist_append(devices, sdi); | |
141 | ||
142 | scan_cleanup: | |
143 | serial_close(serial); | |
144 | ||
145 | return devices; | |
146 | } | |
147 | ||
148 | static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi, | |
149 | const struct sr_channel_group *cg) | |
150 | { | |
151 | struct dev_context *devc; | |
152 | ||
153 | (void)cg; | |
154 | ||
155 | if (sdi->status != SR_ST_ACTIVE) | |
156 | return SR_ERR_DEV_CLOSED; | |
157 | ||
158 | if (!(devc = sdi->priv)) { | |
159 | sr_err("sdi->priv was NULL."); | |
160 | return SR_ERR_BUG; | |
161 | } | |
162 | ||
163 | switch (key) { | |
164 | case SR_CONF_LIMIT_SAMPLES: | |
165 | devc->limit_samples = g_variant_get_uint64(data); | |
166 | break; | |
167 | case SR_CONF_LIMIT_MSEC: | |
168 | devc->limit_msec = g_variant_get_uint64(data); | |
169 | break; | |
170 | default: | |
171 | return SR_ERR_NA; | |
172 | } | |
173 | ||
174 | return SR_OK; | |
175 | } | |
176 | ||
177 | static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, | |
178 | const struct sr_channel_group *cg) | |
179 | { | |
180 | (void)sdi; | |
181 | (void)cg; | |
182 | ||
183 | switch (key) { | |
184 | case SR_CONF_SCAN_OPTIONS: | |
185 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, | |
186 | scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t)); | |
187 | break; | |
188 | case SR_CONF_DEVICE_OPTIONS: | |
189 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, | |
190 | devopts, ARRAY_SIZE(devopts), sizeof(uint32_t)); | |
191 | break; | |
192 | default: | |
193 | return SR_ERR_NA; | |
194 | } | |
195 | ||
196 | return SR_OK; | |
197 | } | |
198 | ||
199 | static int dev_acquisition_start(const struct sr_dev_inst *sdi) | |
200 | { | |
201 | struct dev_context *devc; | |
202 | struct sr_serial_dev_inst *serial; | |
203 | ||
204 | if (sdi->status != SR_ST_ACTIVE) | |
205 | return SR_ERR_DEV_CLOSED; | |
206 | ||
207 | devc = sdi->priv; | |
208 | ||
209 | /* | |
210 | * Reset the number of samples to take. If we've already collected our | |
211 | * quota, but we start a new session, and don't reset this, we'll just | |
212 | * quit without acquiring any new samples. | |
213 | */ | |
214 | devc->num_samples = 0; | |
215 | devc->starttime = g_get_monotonic_time(); | |
216 | ||
217 | std_session_send_df_header(sdi, LOG_PREFIX); | |
218 | ||
219 | /* Poll every 50ms, or whenever some data comes in. */ | |
220 | serial = sdi->conn; | |
221 | serial_source_add(sdi->session, serial, G_IO_IN, 50, | |
222 | receive_data, (void *)sdi); | |
223 | ||
224 | return SR_OK; | |
225 | } | |
226 | ||
227 | static int dev_acquisition_stop(struct sr_dev_inst *sdi) | |
228 | { | |
229 | return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, | |
230 | sdi->conn, LOG_PREFIX); | |
231 | } | |
232 | ||
233 | #define DMM(ID, CHIPSET, VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, \ | |
234 | DELAY, REQUEST, VALID, PARSE, DETAILS) \ | |
235 | &(struct dmm_info) { \ | |
236 | { \ | |
237 | .name = ID, \ | |
238 | .longname = VENDOR " " MODEL, \ | |
239 | .api_version = 1, \ | |
240 | .init = init, \ | |
241 | .cleanup = std_cleanup, \ | |
242 | .scan = scan, \ | |
243 | .dev_list = std_dev_list, \ | |
244 | .config_get = NULL, \ | |
245 | .config_set = config_set, \ | |
246 | .config_list = config_list, \ | |
247 | .dev_open = std_serial_dev_open, \ | |
248 | .dev_close = std_serial_dev_close, \ | |
249 | .dev_acquisition_start = dev_acquisition_start, \ | |
250 | .dev_acquisition_stop = dev_acquisition_stop, \ | |
251 | .context = NULL, \ | |
252 | }, \ | |
253 | VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, DELAY, \ | |
254 | REQUEST, VALID, PARSE, DETAILS, sizeof(struct CHIPSET##_info) \ | |
255 | } | |
256 | ||
257 | SR_PRIV const struct dmm_info *serial_dmm_drivers[] = { | |
258 | DMM( | |
259 | "bbcgm-2010", metex14, | |
260 | "BBC Goertz Metrawatt", "M2110", "1200/7n2", 1200, | |
261 | BBCGM_M2110_PACKET_SIZE, 0, 0, NULL, | |
262 | sr_m2110_packet_valid, sr_m2110_parse, | |
263 | NULL | |
264 | ), | |
265 | DMM( | |
266 | "digitek-dt4000zc", fs9721, | |
267 | "Digitek", "DT4000ZC", "2400/8n1/dtr=1", 2400, | |
268 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
269 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
270 | sr_fs9721_10_temp_c | |
271 | ), | |
272 | DMM( | |
273 | "tekpower-tp4000ZC", fs9721, | |
274 | "TekPower", "TP4000ZC", "2400/8n1/dtr=1", 2400, | |
275 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
276 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
277 | sr_fs9721_10_temp_c | |
278 | ), | |
279 | DMM( | |
280 | "metex-me31", metex14, | |
281 | "Metex", "ME-31", "600/7n2/rts=0/dtr=1", 600, | |
282 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
283 | sr_metex14_packet_valid, sr_metex14_parse, | |
284 | NULL | |
285 | ), | |
286 | DMM( | |
287 | "peaktech-3410", metex14, | |
288 | "Peaktech", "3410", "600/7n2/rts=0/dtr=1", 600, | |
289 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
290 | sr_metex14_packet_valid, sr_metex14_parse, | |
291 | NULL | |
292 | ), | |
293 | DMM( | |
294 | "mastech-mas345", metex14, | |
295 | "MASTECH", "MAS345", "600/7n2/rts=0/dtr=1", 600, | |
296 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
297 | sr_metex14_packet_valid, sr_metex14_parse, | |
298 | NULL | |
299 | ), | |
300 | DMM( | |
301 | "mastech-ms8250b", fs9721, | |
302 | "MASTECH", "MS8250B", "2400/8n1/rts=0/dtr=1", | |
303 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
304 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
305 | NULL | |
306 | ), | |
307 | DMM( | |
308 | "va-va18b", fs9721, | |
309 | "V&A", "VA18B", "2400/8n1", 2400, | |
310 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
311 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
312 | sr_fs9721_01_temp_c | |
313 | ), | |
314 | DMM( | |
315 | "va-va40b", fs9721, | |
316 | "V&A", "VA40B", "2400/8n1", 2400, | |
317 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
318 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
319 | sr_fs9721_max_c_min | |
320 | ), | |
321 | DMM( | |
322 | "metex-m3640d", metex14, | |
323 | "Metex", "M-3640D", "1200/7n2/rts=0/dtr=1", 1200, | |
324 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
325 | sr_metex14_packet_valid, sr_metex14_parse, | |
326 | NULL | |
327 | ), | |
328 | DMM( | |
329 | "metex-m4650cr", metex14, | |
330 | "Metex", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
331 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
332 | sr_metex14_packet_valid, sr_metex14_parse, | |
333 | NULL | |
334 | ), | |
335 | DMM( | |
336 | "peaktech-4370", metex14, | |
337 | "PeakTech", "4370", "1200/7n2/rts=0/dtr=1", 1200, | |
338 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
339 | sr_metex14_packet_valid, sr_metex14_parse, | |
340 | NULL | |
341 | ), | |
342 | DMM( | |
343 | "pce-pce-dm32", fs9721, | |
344 | "PCE", "PCE-DM32", "2400/8n1", 2400, | |
345 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
346 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
347 | sr_fs9721_01_10_temp_f_c | |
348 | ), | |
349 | DMM( | |
350 | "radioshack-22-168", metex14, | |
351 | "RadioShack", "22-168", "1200/7n2/rts=0/dtr=1", 1200, | |
352 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
353 | sr_metex14_packet_valid, sr_metex14_parse, | |
354 | NULL | |
355 | ), | |
356 | DMM( | |
357 | "radioshack-22-805", metex14, | |
358 | "RadioShack", "22-805", "600/7n2/rts=0/dtr=1", 600, | |
359 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
360 | sr_metex14_packet_valid, sr_metex14_parse, | |
361 | NULL | |
362 | ), | |
363 | DMM( | |
364 | "radioshack-22-812", rs9lcd, | |
365 | "RadioShack", "22-812", "4800/8n1/rts=0/dtr=1", 4800, | |
366 | RS9LCD_PACKET_SIZE, 0, 0, NULL, | |
367 | sr_rs9lcd_packet_valid, sr_rs9lcd_parse, | |
368 | NULL | |
369 | ), | |
370 | DMM( | |
371 | "tecpel-dmm-8061-ser", fs9721, | |
372 | "Tecpel", "DMM-8061 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
373 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
374 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
375 | sr_fs9721_00_temp_c | |
376 | ), | |
377 | DMM( | |
378 | "voltcraft-m3650cr", metex14, | |
379 | "Voltcraft", "M-3650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
380 | METEX14_PACKET_SIZE, 150, 20, sr_metex14_packet_request, | |
381 | sr_metex14_packet_valid, sr_metex14_parse, | |
382 | NULL | |
383 | ), | |
384 | DMM( | |
385 | "voltcraft-m3650d", metex14, | |
386 | "Voltcraft", "M-3650D", "1200/7n2/rts=0/dtr=1", 1200, | |
387 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
388 | sr_metex14_packet_valid, sr_metex14_parse, | |
389 | NULL | |
390 | ), | |
391 | DMM( | |
392 | "voltcraft-m4650cr", metex14, | |
393 | "Voltcraft", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
394 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
395 | sr_metex14_packet_valid, sr_metex14_parse, | |
396 | NULL | |
397 | ), | |
398 | DMM( | |
399 | "voltcraft-me42", metex14, | |
400 | "Voltcraft", "ME-42", "600/7n2/rts=0/dtr=1", 600, | |
401 | METEX14_PACKET_SIZE, 250, 60, sr_metex14_packet_request, | |
402 | sr_metex14_packet_valid, sr_metex14_parse, | |
403 | NULL | |
404 | ), | |
405 | DMM( | |
406 | "voltcraft-vc820-ser", fs9721, | |
407 | "Voltcraft", "VC-820 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
408 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
409 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
410 | NULL | |
411 | ), | |
412 | DMM( | |
413 | /* | |
414 | * Note: The VC830 doesn't set the 'volt' and 'diode' bits of | |
415 | * the FS9922 protocol. Instead, it only sets the user-defined | |
416 | * bit "z1" to indicate "diode mode" and "voltage". | |
417 | */ | |
418 | "voltcraft-vc830-ser", fs9922, | |
419 | "Voltcraft", "VC-830 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
420 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
421 | sr_fs9922_packet_valid, sr_fs9922_parse, | |
422 | &sr_fs9922_z1_diode | |
423 | ), | |
424 | DMM( | |
425 | "voltcraft-vc840-ser", fs9721, | |
426 | "Voltcraft", "VC-840 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
427 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
428 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
429 | sr_fs9721_00_temp_c | |
430 | ), | |
431 | DMM( | |
432 | "voltcraft-vc870-ser", vc870, | |
433 | "Voltcraft", "VC-870 (UT-D02 cable)", "9600/8n1/rts=0/dtr=1", | |
434 | 9600, VC870_PACKET_SIZE, 0, 0, NULL, | |
435 | sr_vc870_packet_valid, sr_vc870_parse, NULL | |
436 | ), | |
437 | DMM( | |
438 | "voltcraft-vc920-ser", ut71x, | |
439 | "Voltcraft", "VC-920 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
440 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
441 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
442 | ), | |
443 | DMM( | |
444 | "voltcraft-vc940-ser", ut71x, | |
445 | "Voltcraft", "VC-940 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
446 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
447 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
448 | ), | |
449 | DMM( | |
450 | "voltcraft-vc960-ser", ut71x, | |
451 | "Voltcraft", "VC-960 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
452 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
453 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
454 | ), | |
455 | DMM( | |
456 | "uni-t-ut60a-ser", fs9721, | |
457 | "UNI-T", "UT60A (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
458 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
459 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
460 | NULL | |
461 | ), | |
462 | DMM( | |
463 | "uni-t-ut60e-ser", fs9721, | |
464 | "UNI-T", "UT60E (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
465 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
466 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
467 | sr_fs9721_00_temp_c | |
468 | ), | |
469 | DMM( | |
470 | /* Note: ES51986 baudrate is actually 19230! */ | |
471 | "uni-t-ut60g-ser", es519xx, | |
472 | "UNI-T", "UT60G (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
473 | 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
474 | sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, | |
475 | NULL | |
476 | ), | |
477 | DMM( | |
478 | "uni-t-ut61b-ser", fs9922, | |
479 | "UNI-T", "UT61B (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
480 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
481 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
482 | ), | |
483 | DMM( | |
484 | "uni-t-ut61c-ser", fs9922, | |
485 | "UNI-T", "UT61C (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
486 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
487 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
488 | ), | |
489 | DMM( | |
490 | "uni-t-ut61d-ser", fs9922, | |
491 | "UNI-T", "UT61D (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
492 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
493 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
494 | ), | |
495 | DMM( | |
496 | "uni-t-ut61e-ser", es519xx, | |
497 | /* Note: ES51922 baudrate is actually 19230! */ | |
498 | "UNI-T", "UT61E (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
499 | 19200, ES519XX_14B_PACKET_SIZE, 0, 0, NULL, | |
500 | sr_es519xx_19200_14b_packet_valid, sr_es519xx_19200_14b_parse, | |
501 | NULL | |
502 | ), | |
503 | DMM( | |
504 | "uni-t-ut71a-ser", ut71x, | |
505 | "UNI-T", "UT71A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
506 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
507 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
508 | ), | |
509 | DMM( | |
510 | "uni-t-ut71b-ser", ut71x, | |
511 | "UNI-T", "UT71B (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
512 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
513 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
514 | ), | |
515 | DMM( | |
516 | "uni-t-ut71c-ser", ut71x, | |
517 | "UNI-T", "UT71C (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
518 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
519 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
520 | ), | |
521 | DMM( | |
522 | "uni-t-ut71d-ser", ut71x, | |
523 | "UNI-T", "UT71D (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
524 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
525 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
526 | ), | |
527 | DMM( | |
528 | "uni-t-ut71e-ser", ut71x, | |
529 | "UNI-T", "UT71E (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
530 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
531 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
532 | ), | |
533 | DMM( | |
534 | "iso-tech-idm103n", es519xx, | |
535 | "ISO-TECH", "IDM103N", "2400/7o1/rts=0/dtr=1", | |
536 | 2400, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
537 | sr_es519xx_2400_11b_packet_valid, sr_es519xx_2400_11b_parse, | |
538 | NULL | |
539 | ), | |
540 | DMM( | |
541 | "tenma-72-7730-ser", ut71x, | |
542 | "Tenma", "72-7730 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
543 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
544 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
545 | ), | |
546 | DMM( | |
547 | "tenma-72-7732-ser", ut71x, | |
548 | "Tenma", "72-7732 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
549 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
550 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
551 | ), | |
552 | DMM( | |
553 | "tenma-72-9380a-ser", ut71x, | |
554 | "Tenma", "72-9380A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
555 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
556 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
557 | ), | |
558 | DMM( | |
559 | "tenma-72-7745-ser", fs9721, | |
560 | "Tenma", "72-7745 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
561 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
562 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
563 | sr_fs9721_00_temp_c | |
564 | ), | |
565 | DMM( | |
566 | "tenma-72-7750-ser", es519xx, | |
567 | /* Note: ES51986 baudrate is actually 19230! */ | |
568 | "Tenma", "72-7750 (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
569 | 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
570 | sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, | |
571 | NULL | |
572 | ), | |
573 | DMM( | |
574 | "brymen-bm25x", bm25x, | |
575 | "Brymen", "BM25x", "9600/8n1/rts=1/dtr=1", | |
576 | 9600, BRYMEN_BM25X_PACKET_SIZE, 0, 0, NULL, | |
577 | sr_brymen_bm25x_packet_valid, sr_brymen_bm25x_parse, | |
578 | NULL | |
579 | ), | |
580 | DMM( | |
581 | "velleman-dvm4100", dtm0660, | |
582 | "Velleman", "DVM4100", "2400/8n1/rts=0/dtr=1", | |
583 | 2400, DTM0660_PACKET_SIZE, 0, 0, NULL, | |
584 | sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL | |
585 | ), | |
586 | DMM( | |
587 | "peaktech-3415", dtm0660, | |
588 | "Peaktech", "3415", "2400/8n1/rts=0/dtr=1", | |
589 | 2400, DTM0660_PACKET_SIZE, 0, 0, NULL, | |
590 | sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL | |
591 | ), | |
592 | NULL | |
593 | }; |