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