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