]>
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 GSList *scan(struct sr_dev_driver *di, GSList *options) |
7dc55d93 | 45 | { |
1a863916 | 46 | struct dmm_info *dmm; |
bcbef5ed ML |
47 | struct sr_config *src; |
48 | GSList *l, *devices; | |
49 | const char *conn, *serialcomm; | |
7dc55d93 | 50 | struct sr_dev_inst *sdi; |
7dc55d93 | 51 | struct dev_context *devc; |
d35afa87 | 52 | struct sr_serial_dev_inst *serial; |
2546b05c AG |
53 | int dropped, ret; |
54 | size_t len; | |
55 | uint8_t buf[128]; | |
7dc55d93 | 56 | |
1a863916 UH |
57 | dmm = (struct dmm_info *)di; |
58 | ||
bcbef5ed ML |
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 | ||
91219afc | 77 | serial = sr_serial_dev_inst_new(conn, serialcomm); |
d35afa87 | 78 | |
2e360339 | 79 | if (serial_open(serial, SERIAL_RDWR) != SR_OK) |
7dc55d93 | 80 | return NULL; |
7dc55d93 | 81 | |
22f54192 | 82 | sr_info("Probing serial port %s.", conn); |
7dc55d93 | 83 | |
7dc55d93 | 84 | devices = NULL; |
d35afa87 | 85 | serial_flush(serial); |
bbabddbd | 86 | |
ce3777ad | 87 | /* Request a packet if the DMM requires this. */ |
bcbef5ed ML |
88 | if (dmm->packet_request) { |
89 | if ((ret = dmm->packet_request(serial)) < 0) { | |
ce3777ad UH |
90 | sr_err("Failed to request packet: %d.", ret); |
91 | return FALSE; | |
92 | } | |
93 | } | |
94 | ||
22f54192 UH |
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); | |
bcbef5ed ML |
103 | ret = serial_stream_detect(serial, buf, &len, dmm->packet_size, |
104 | dmm->packet_valid, 3000, | |
105 | dmm->baudrate); | |
2546b05c AG |
106 | if (ret != SR_OK) |
107 | goto scan_cleanup; | |
7dc55d93 | 108 | |
2546b05c AG |
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 | |
22f54192 UH |
113 | * combination of the nonstandard cable that ships with some devices |
114 | * and the serial port or USB to serial adapter. | |
2546b05c | 115 | */ |
bcbef5ed ML |
116 | dropped = len - dmm->packet_size; |
117 | if (dropped > 2 * dmm->packet_size) | |
6bef68a7 | 118 | sr_warn("Had to drop too much data."); |
7dc55d93 | 119 | |
2546b05c | 120 | sr_info("Found device on port %s.", conn); |
7dc55d93 | 121 | |
aac29cc1 | 122 | sdi = g_malloc0(sizeof(struct sr_dev_inst)); |
0af636be | 123 | sdi->status = SR_ST_INACTIVE; |
bcbef5ed ML |
124 | sdi->vendor = g_strdup(dmm->vendor); |
125 | sdi->model = g_strdup(dmm->device); | |
f57d8ffe | 126 | devc = g_malloc0(sizeof(struct dev_context)); |
9f51c463 | 127 | sr_sw_limits_init(&devc->limits); |
1e1bfcd0 UH |
128 | sdi->inst_type = SR_INST_SERIAL; |
129 | sdi->conn = serial; | |
2546b05c | 130 | sdi->priv = devc; |
5e23fcab | 131 | sr_channel_new(sdi, 0, SR_CHANNEL_ANALOG, TRUE, "P1"); |
2546b05c AG |
132 | devices = g_slist_append(devices, sdi); |
133 | ||
134 | scan_cleanup: | |
d35afa87 | 135 | serial_close(serial); |
2546b05c | 136 | |
15a5bfe4 | 137 | return std_scan_complete(di, devices); |
7dc55d93 AG |
138 | } |
139 | ||
584560f1 | 140 | static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi, |
53b4680f | 141 | const struct sr_channel_group *cg) |
7dc55d93 AG |
142 | { |
143 | struct dev_context *devc; | |
144 | ||
53b4680f | 145 | (void)cg; |
8f996b89 | 146 | |
7dc55d93 | 147 | if (sdi->status != SR_ST_ACTIVE) |
e73ffd42 | 148 | return SR_ERR_DEV_CLOSED; |
7dc55d93 | 149 | |
b0baddef | 150 | devc = sdi->priv; |
7dc55d93 | 151 | |
9f51c463 | 152 | return sr_sw_limits_config_set(&devc->limits, key, data); |
7dc55d93 AG |
153 | } |
154 | ||
584560f1 | 155 | static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, |
53b4680f | 156 | const struct sr_channel_group *cg) |
a1c743fc | 157 | { |
a1c743fc | 158 | (void)sdi; |
53b4680f | 159 | (void)cg; |
a1c743fc BV |
160 | |
161 | switch (key) { | |
0d485e30 | 162 | case SR_CONF_SCAN_OPTIONS: |
584560f1 | 163 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, |
a0e0bb41 | 164 | scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t)); |
0d485e30 | 165 | break; |
9a6517d1 | 166 | case SR_CONF_DEVICE_OPTIONS: |
584560f1 | 167 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, |
f254bc4b | 168 | devopts, ARRAY_SIZE(devopts), sizeof(uint32_t)); |
9a6517d1 | 169 | break; |
a1c743fc | 170 | default: |
bd6fbf62 | 171 | return SR_ERR_NA; |
a1c743fc BV |
172 | } |
173 | ||
174 | return SR_OK; | |
175 | } | |
176 | ||
695dc859 | 177 | static int dev_acquisition_start(const struct sr_dev_inst *sdi) |
7dc55d93 | 178 | { |
7dc55d93 | 179 | struct dev_context *devc; |
1e1bfcd0 | 180 | struct sr_serial_dev_inst *serial; |
7dc55d93 | 181 | |
e73ffd42 BV |
182 | if (sdi->status != SR_ST_ACTIVE) |
183 | return SR_ERR_DEV_CLOSED; | |
184 | ||
208c1d35 | 185 | devc = sdi->priv; |
7dc55d93 | 186 | |
9f51c463 | 187 | sr_sw_limits_acquisition_start(&devc->limits); |
bee2b016 | 188 | std_session_send_df_header(sdi); |
7dc55d93 | 189 | |
bbabddbd | 190 | /* Poll every 50ms, or whenever some data comes in. */ |
1e1bfcd0 | 191 | serial = sdi->conn; |
102f1239 | 192 | serial_source_add(sdi->session, serial, G_IO_IN, 50, |
bcbef5ed | 193 | receive_data, (void *)sdi); |
7dc55d93 AG |
194 | |
195 | return SR_OK; | |
196 | } | |
197 | ||
bcbef5ed ML |
198 | #define DMM(ID, CHIPSET, VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, \ |
199 | DELAY, REQUEST, VALID, PARSE, DETAILS) \ | |
dd5c48a6 | 200 | &((struct dmm_info) { \ |
bcbef5ed ML |
201 | { \ |
202 | .name = ID, \ | |
203 | .longname = VENDOR " " MODEL, \ | |
204 | .api_version = 1, \ | |
c2fdcc25 | 205 | .init = std_init, \ |
700d6b64 | 206 | .cleanup = std_cleanup, \ |
bcbef5ed | 207 | .scan = scan, \ |
c01bf34c | 208 | .dev_list = std_dev_list, \ |
bcbef5ed ML |
209 | .config_get = NULL, \ |
210 | .config_set = config_set, \ | |
211 | .config_list = config_list, \ | |
212 | .dev_open = std_serial_dev_open, \ | |
213 | .dev_close = std_serial_dev_close, \ | |
214 | .dev_acquisition_start = dev_acquisition_start, \ | |
4b1a9d5d | 215 | .dev_acquisition_stop = std_serial_dev_acquisition_stop, \ |
41812aca | 216 | .context = NULL, \ |
bcbef5ed ML |
217 | }, \ |
218 | VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, DELAY, \ | |
219 | REQUEST, VALID, PARSE, DETAILS, sizeof(struct CHIPSET##_info) \ | |
dd5c48a6 | 220 | }).di |
3098b390 | 221 | |
dd5c48a6 | 222 | SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers, |
bcbef5ed ML |
223 | DMM( |
224 | "bbcgm-2010", metex14, | |
225 | "BBC Goertz Metrawatt", "M2110", "1200/7n2", 1200, | |
226 | BBCGM_M2110_PACKET_SIZE, 0, 0, NULL, | |
227 | sr_m2110_packet_valid, sr_m2110_parse, | |
228 | NULL | |
229 | ), | |
230 | DMM( | |
231 | "digitek-dt4000zc", fs9721, | |
232 | "Digitek", "DT4000ZC", "2400/8n1/dtr=1", 2400, | |
233 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
234 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
235 | sr_fs9721_10_temp_c | |
236 | ), | |
237 | DMM( | |
238 | "tekpower-tp4000ZC", fs9721, | |
239 | "TekPower", "TP4000ZC", "2400/8n1/dtr=1", 2400, | |
240 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
241 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
242 | sr_fs9721_10_temp_c | |
243 | ), | |
244 | DMM( | |
245 | "metex-me31", metex14, | |
246 | "Metex", "ME-31", "600/7n2/rts=0/dtr=1", 600, | |
247 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
248 | sr_metex14_packet_valid, sr_metex14_parse, | |
249 | NULL | |
250 | ), | |
251 | DMM( | |
252 | "peaktech-3410", metex14, | |
253 | "Peaktech", "3410", "600/7n2/rts=0/dtr=1", 600, | |
254 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
255 | sr_metex14_packet_valid, sr_metex14_parse, | |
256 | NULL | |
257 | ), | |
258 | DMM( | |
259 | "mastech-mas345", metex14, | |
260 | "MASTECH", "MAS345", "600/7n2/rts=0/dtr=1", 600, | |
261 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
262 | sr_metex14_packet_valid, sr_metex14_parse, | |
263 | NULL | |
264 | ), | |
265 | DMM( | |
266 | "mastech-ms8250b", fs9721, | |
267 | "MASTECH", "MS8250B", "2400/8n1/rts=0/dtr=1", | |
268 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
269 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
270 | NULL | |
271 | ), | |
272 | DMM( | |
273 | "va-va18b", fs9721, | |
274 | "V&A", "VA18B", "2400/8n1", 2400, | |
275 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
276 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
277 | sr_fs9721_01_temp_c | |
278 | ), | |
279 | DMM( | |
280 | "va-va40b", fs9721, | |
281 | "V&A", "VA40B", "2400/8n1", 2400, | |
282 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
283 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
284 | sr_fs9721_max_c_min | |
285 | ), | |
286 | DMM( | |
287 | "metex-m3640d", metex14, | |
288 | "Metex", "M-3640D", "1200/7n2/rts=0/dtr=1", 1200, | |
289 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
290 | sr_metex14_packet_valid, sr_metex14_parse, | |
291 | NULL | |
292 | ), | |
293 | DMM( | |
294 | "metex-m4650cr", metex14, | |
295 | "Metex", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
296 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
297 | sr_metex14_packet_valid, sr_metex14_parse, | |
298 | NULL | |
299 | ), | |
300 | DMM( | |
301 | "peaktech-4370", metex14, | |
302 | "PeakTech", "4370", "1200/7n2/rts=0/dtr=1", 1200, | |
303 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
304 | sr_metex14_packet_valid, sr_metex14_parse, | |
305 | NULL | |
306 | ), | |
307 | DMM( | |
308 | "pce-pce-dm32", fs9721, | |
309 | "PCE", "PCE-DM32", "2400/8n1", 2400, | |
310 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
311 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
312 | sr_fs9721_01_10_temp_f_c | |
313 | ), | |
314 | DMM( | |
315 | "radioshack-22-168", metex14, | |
316 | "RadioShack", "22-168", "1200/7n2/rts=0/dtr=1", 1200, | |
317 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
318 | sr_metex14_packet_valid, sr_metex14_parse, | |
319 | NULL | |
320 | ), | |
321 | DMM( | |
322 | "radioshack-22-805", metex14, | |
323 | "RadioShack", "22-805", "600/7n2/rts=0/dtr=1", 600, | |
324 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
325 | sr_metex14_packet_valid, sr_metex14_parse, | |
326 | NULL | |
327 | ), | |
328 | DMM( | |
329 | "radioshack-22-812", rs9lcd, | |
330 | "RadioShack", "22-812", "4800/8n1/rts=0/dtr=1", 4800, | |
331 | RS9LCD_PACKET_SIZE, 0, 0, NULL, | |
332 | sr_rs9lcd_packet_valid, sr_rs9lcd_parse, | |
333 | NULL | |
334 | ), | |
335 | DMM( | |
336 | "tecpel-dmm-8061-ser", fs9721, | |
337 | "Tecpel", "DMM-8061 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
338 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
339 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
340 | sr_fs9721_00_temp_c | |
341 | ), | |
342 | DMM( | |
343 | "voltcraft-m3650cr", metex14, | |
344 | "Voltcraft", "M-3650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
345 | METEX14_PACKET_SIZE, 150, 20, sr_metex14_packet_request, | |
346 | sr_metex14_packet_valid, sr_metex14_parse, | |
347 | NULL | |
348 | ), | |
349 | DMM( | |
350 | "voltcraft-m3650d", metex14, | |
351 | "Voltcraft", "M-3650D", "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 | "voltcraft-m4650cr", metex14, | |
358 | "Voltcraft", "M-4650CR", "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 | "voltcraft-me42", metex14, | |
365 | "Voltcraft", "ME-42", "600/7n2/rts=0/dtr=1", 600, | |
366 | METEX14_PACKET_SIZE, 250, 60, sr_metex14_packet_request, | |
367 | sr_metex14_packet_valid, sr_metex14_parse, | |
368 | NULL | |
369 | ), | |
370 | DMM( | |
371 | "voltcraft-vc820-ser", fs9721, | |
372 | "Voltcraft", "VC-820 (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 | NULL | |
376 | ), | |
377 | DMM( | |
378 | /* | |
379 | * Note: The VC830 doesn't set the 'volt' and 'diode' bits of | |
380 | * the FS9922 protocol. Instead, it only sets the user-defined | |
381 | * bit "z1" to indicate "diode mode" and "voltage". | |
382 | */ | |
383 | "voltcraft-vc830-ser", fs9922, | |
384 | "Voltcraft", "VC-830 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
385 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
386 | sr_fs9922_packet_valid, sr_fs9922_parse, | |
387 | &sr_fs9922_z1_diode | |
388 | ), | |
389 | DMM( | |
390 | "voltcraft-vc840-ser", fs9721, | |
391 | "Voltcraft", "VC-840 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
392 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
393 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
394 | sr_fs9721_00_temp_c | |
395 | ), | |
396 | DMM( | |
397 | "voltcraft-vc870-ser", vc870, | |
398 | "Voltcraft", "VC-870 (UT-D02 cable)", "9600/8n1/rts=0/dtr=1", | |
399 | 9600, VC870_PACKET_SIZE, 0, 0, NULL, | |
400 | sr_vc870_packet_valid, sr_vc870_parse, NULL | |
401 | ), | |
402 | DMM( | |
403 | "voltcraft-vc920-ser", ut71x, | |
404 | "Voltcraft", "VC-920 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
405 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
406 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
407 | ), | |
408 | DMM( | |
409 | "voltcraft-vc940-ser", ut71x, | |
410 | "Voltcraft", "VC-940 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
411 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
412 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
413 | ), | |
414 | DMM( | |
415 | "voltcraft-vc960-ser", ut71x, | |
416 | "Voltcraft", "VC-960 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
417 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
418 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
419 | ), | |
420 | DMM( | |
421 | "uni-t-ut60a-ser", fs9721, | |
422 | "UNI-T", "UT60A (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
423 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
424 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
425 | NULL | |
426 | ), | |
427 | DMM( | |
428 | "uni-t-ut60e-ser", fs9721, | |
429 | "UNI-T", "UT60E (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 | sr_fs9721_00_temp_c | |
433 | ), | |
434 | DMM( | |
435 | /* Note: ES51986 baudrate is actually 19230! */ | |
436 | "uni-t-ut60g-ser", es519xx, | |
437 | "UNI-T", "UT60G (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
438 | 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
439 | sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, | |
440 | NULL | |
441 | ), | |
442 | DMM( | |
443 | "uni-t-ut61b-ser", fs9922, | |
444 | "UNI-T", "UT61B (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
445 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
446 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
447 | ), | |
448 | DMM( | |
449 | "uni-t-ut61c-ser", fs9922, | |
450 | "UNI-T", "UT61C (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
451 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
452 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
453 | ), | |
454 | DMM( | |
455 | "uni-t-ut61d-ser", fs9922, | |
456 | "UNI-T", "UT61D (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
457 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
458 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
459 | ), | |
460 | DMM( | |
461 | "uni-t-ut61e-ser", es519xx, | |
462 | /* Note: ES51922 baudrate is actually 19230! */ | |
463 | "UNI-T", "UT61E (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
464 | 19200, ES519XX_14B_PACKET_SIZE, 0, 0, NULL, | |
465 | sr_es519xx_19200_14b_packet_valid, sr_es519xx_19200_14b_parse, | |
466 | NULL | |
467 | ), | |
468 | DMM( | |
469 | "uni-t-ut71a-ser", ut71x, | |
470 | "UNI-T", "UT71A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
471 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
472 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
473 | ), | |
474 | DMM( | |
475 | "uni-t-ut71b-ser", ut71x, | |
476 | "UNI-T", "UT71B (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
477 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
478 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
479 | ), | |
480 | DMM( | |
481 | "uni-t-ut71c-ser", ut71x, | |
482 | "UNI-T", "UT71C (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
483 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
484 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
485 | ), | |
486 | DMM( | |
487 | "uni-t-ut71d-ser", ut71x, | |
488 | "UNI-T", "UT71D (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
489 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
490 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
491 | ), | |
492 | DMM( | |
493 | "uni-t-ut71e-ser", ut71x, | |
494 | "UNI-T", "UT71E (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
495 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
496 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
497 | ), | |
498 | DMM( | |
499 | "iso-tech-idm103n", es519xx, | |
500 | "ISO-TECH", "IDM103N", "2400/7o1/rts=0/dtr=1", | |
501 | 2400, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
502 | sr_es519xx_2400_11b_packet_valid, sr_es519xx_2400_11b_parse, | |
503 | NULL | |
504 | ), | |
b1cadcfb KP |
505 | DMM( |
506 | "tenma-72-7730-ser", ut71x, | |
507 | "Tenma", "72-7730 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
508 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
509 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
510 | ), | |
0a4549ff UH |
511 | DMM( |
512 | "tenma-72-7732-ser", ut71x, | |
513 | "Tenma", "72-7732 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
514 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
515 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
516 | ), | |
20f9f1fb UH |
517 | DMM( |
518 | "tenma-72-9380a-ser", ut71x, | |
519 | "Tenma", "72-9380A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
520 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
521 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
522 | ), | |
bcbef5ed ML |
523 | DMM( |
524 | "tenma-72-7745-ser", fs9721, | |
525 | "Tenma", "72-7745 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
526 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
527 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
528 | sr_fs9721_00_temp_c | |
529 | ), | |
530 | DMM( | |
531 | "tenma-72-7750-ser", es519xx, | |
532 | /* Note: ES51986 baudrate is actually 19230! */ | |
533 | "Tenma", "72-7750 (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
534 | 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
535 | sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, | |
536 | NULL | |
537 | ), | |
538 | DMM( | |
539 | "brymen-bm25x", bm25x, | |
540 | "Brymen", "BM25x", "9600/8n1/rts=1/dtr=1", | |
541 | 9600, BRYMEN_BM25X_PACKET_SIZE, 0, 0, NULL, | |
542 | sr_brymen_bm25x_packet_valid, sr_brymen_bm25x_parse, | |
543 | NULL | |
544 | ), | |
d79244dc MG |
545 | DMM( |
546 | "velleman-dvm4100", dtm0660, | |
547 | "Velleman", "DVM4100", "2400/8n1/rts=0/dtr=1", | |
548 | 2400, DTM0660_PACKET_SIZE, 0, 0, NULL, | |
549 | sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL | |
550 | ), | |
551 | DMM( | |
552 | "peaktech-3415", dtm0660, | |
553 | "Peaktech", "3415", "2400/8n1/rts=0/dtr=1", | |
554 | 2400, DTM0660_PACKET_SIZE, 0, 0, NULL, | |
555 | sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL | |
556 | ), | |
dd5c48a6 | 557 | ); |