]>
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 | ||
695dc859 | 198 | static int dev_acquisition_stop(struct sr_dev_inst *sdi) |
7dc55d93 | 199 | { |
15f96409 | 200 | return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close); |
7dc55d93 AG |
201 | } |
202 | ||
bcbef5ed ML |
203 | #define DMM(ID, CHIPSET, VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, \ |
204 | DELAY, REQUEST, VALID, PARSE, DETAILS) \ | |
dd5c48a6 | 205 | &((struct dmm_info) { \ |
bcbef5ed ML |
206 | { \ |
207 | .name = ID, \ | |
208 | .longname = VENDOR " " MODEL, \ | |
209 | .api_version = 1, \ | |
c2fdcc25 | 210 | .init = std_init, \ |
700d6b64 | 211 | .cleanup = std_cleanup, \ |
bcbef5ed | 212 | .scan = scan, \ |
c01bf34c | 213 | .dev_list = std_dev_list, \ |
bcbef5ed ML |
214 | .config_get = NULL, \ |
215 | .config_set = config_set, \ | |
216 | .config_list = config_list, \ | |
217 | .dev_open = std_serial_dev_open, \ | |
218 | .dev_close = std_serial_dev_close, \ | |
219 | .dev_acquisition_start = dev_acquisition_start, \ | |
220 | .dev_acquisition_stop = dev_acquisition_stop, \ | |
41812aca | 221 | .context = NULL, \ |
bcbef5ed ML |
222 | }, \ |
223 | VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, DELAY, \ | |
224 | REQUEST, VALID, PARSE, DETAILS, sizeof(struct CHIPSET##_info) \ | |
dd5c48a6 | 225 | }).di |
3098b390 | 226 | |
dd5c48a6 | 227 | SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers, |
bcbef5ed ML |
228 | DMM( |
229 | "bbcgm-2010", metex14, | |
230 | "BBC Goertz Metrawatt", "M2110", "1200/7n2", 1200, | |
231 | BBCGM_M2110_PACKET_SIZE, 0, 0, NULL, | |
232 | sr_m2110_packet_valid, sr_m2110_parse, | |
233 | NULL | |
234 | ), | |
235 | DMM( | |
236 | "digitek-dt4000zc", fs9721, | |
237 | "Digitek", "DT4000ZC", "2400/8n1/dtr=1", 2400, | |
238 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
239 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
240 | sr_fs9721_10_temp_c | |
241 | ), | |
242 | DMM( | |
243 | "tekpower-tp4000ZC", fs9721, | |
244 | "TekPower", "TP4000ZC", "2400/8n1/dtr=1", 2400, | |
245 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
246 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
247 | sr_fs9721_10_temp_c | |
248 | ), | |
249 | DMM( | |
250 | "metex-me31", metex14, | |
251 | "Metex", "ME-31", "600/7n2/rts=0/dtr=1", 600, | |
252 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
253 | sr_metex14_packet_valid, sr_metex14_parse, | |
254 | NULL | |
255 | ), | |
256 | DMM( | |
257 | "peaktech-3410", metex14, | |
258 | "Peaktech", "3410", "600/7n2/rts=0/dtr=1", 600, | |
259 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
260 | sr_metex14_packet_valid, sr_metex14_parse, | |
261 | NULL | |
262 | ), | |
263 | DMM( | |
264 | "mastech-mas345", metex14, | |
265 | "MASTECH", "MAS345", "600/7n2/rts=0/dtr=1", 600, | |
266 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
267 | sr_metex14_packet_valid, sr_metex14_parse, | |
268 | NULL | |
269 | ), | |
270 | DMM( | |
271 | "mastech-ms8250b", fs9721, | |
272 | "MASTECH", "MS8250B", "2400/8n1/rts=0/dtr=1", | |
273 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
274 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
275 | NULL | |
276 | ), | |
277 | DMM( | |
278 | "va-va18b", fs9721, | |
279 | "V&A", "VA18B", "2400/8n1", 2400, | |
280 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
281 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
282 | sr_fs9721_01_temp_c | |
283 | ), | |
284 | DMM( | |
285 | "va-va40b", fs9721, | |
286 | "V&A", "VA40B", "2400/8n1", 2400, | |
287 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
288 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
289 | sr_fs9721_max_c_min | |
290 | ), | |
291 | DMM( | |
292 | "metex-m3640d", metex14, | |
293 | "Metex", "M-3640D", "1200/7n2/rts=0/dtr=1", 1200, | |
294 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
295 | sr_metex14_packet_valid, sr_metex14_parse, | |
296 | NULL | |
297 | ), | |
298 | DMM( | |
299 | "metex-m4650cr", metex14, | |
300 | "Metex", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
301 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
302 | sr_metex14_packet_valid, sr_metex14_parse, | |
303 | NULL | |
304 | ), | |
305 | DMM( | |
306 | "peaktech-4370", metex14, | |
307 | "PeakTech", "4370", "1200/7n2/rts=0/dtr=1", 1200, | |
308 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
309 | sr_metex14_packet_valid, sr_metex14_parse, | |
310 | NULL | |
311 | ), | |
312 | DMM( | |
313 | "pce-pce-dm32", fs9721, | |
314 | "PCE", "PCE-DM32", "2400/8n1", 2400, | |
315 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
316 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
317 | sr_fs9721_01_10_temp_f_c | |
318 | ), | |
319 | DMM( | |
320 | "radioshack-22-168", metex14, | |
321 | "RadioShack", "22-168", "1200/7n2/rts=0/dtr=1", 1200, | |
322 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
323 | sr_metex14_packet_valid, sr_metex14_parse, | |
324 | NULL | |
325 | ), | |
326 | DMM( | |
327 | "radioshack-22-805", metex14, | |
328 | "RadioShack", "22-805", "600/7n2/rts=0/dtr=1", 600, | |
329 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
330 | sr_metex14_packet_valid, sr_metex14_parse, | |
331 | NULL | |
332 | ), | |
333 | DMM( | |
334 | "radioshack-22-812", rs9lcd, | |
335 | "RadioShack", "22-812", "4800/8n1/rts=0/dtr=1", 4800, | |
336 | RS9LCD_PACKET_SIZE, 0, 0, NULL, | |
337 | sr_rs9lcd_packet_valid, sr_rs9lcd_parse, | |
338 | NULL | |
339 | ), | |
340 | DMM( | |
341 | "tecpel-dmm-8061-ser", fs9721, | |
342 | "Tecpel", "DMM-8061 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
343 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
344 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
345 | sr_fs9721_00_temp_c | |
346 | ), | |
347 | DMM( | |
348 | "voltcraft-m3650cr", metex14, | |
349 | "Voltcraft", "M-3650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
350 | METEX14_PACKET_SIZE, 150, 20, sr_metex14_packet_request, | |
351 | sr_metex14_packet_valid, sr_metex14_parse, | |
352 | NULL | |
353 | ), | |
354 | DMM( | |
355 | "voltcraft-m3650d", metex14, | |
356 | "Voltcraft", "M-3650D", "1200/7n2/rts=0/dtr=1", 1200, | |
357 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
358 | sr_metex14_packet_valid, sr_metex14_parse, | |
359 | NULL | |
360 | ), | |
361 | DMM( | |
362 | "voltcraft-m4650cr", metex14, | |
363 | "Voltcraft", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
364 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
365 | sr_metex14_packet_valid, sr_metex14_parse, | |
366 | NULL | |
367 | ), | |
368 | DMM( | |
369 | "voltcraft-me42", metex14, | |
370 | "Voltcraft", "ME-42", "600/7n2/rts=0/dtr=1", 600, | |
371 | METEX14_PACKET_SIZE, 250, 60, sr_metex14_packet_request, | |
372 | sr_metex14_packet_valid, sr_metex14_parse, | |
373 | NULL | |
374 | ), | |
375 | DMM( | |
376 | "voltcraft-vc820-ser", fs9721, | |
377 | "Voltcraft", "VC-820 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
378 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
379 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
380 | NULL | |
381 | ), | |
382 | DMM( | |
383 | /* | |
384 | * Note: The VC830 doesn't set the 'volt' and 'diode' bits of | |
385 | * the FS9922 protocol. Instead, it only sets the user-defined | |
386 | * bit "z1" to indicate "diode mode" and "voltage". | |
387 | */ | |
388 | "voltcraft-vc830-ser", fs9922, | |
389 | "Voltcraft", "VC-830 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
390 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
391 | sr_fs9922_packet_valid, sr_fs9922_parse, | |
392 | &sr_fs9922_z1_diode | |
393 | ), | |
394 | DMM( | |
395 | "voltcraft-vc840-ser", fs9721, | |
396 | "Voltcraft", "VC-840 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
397 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
398 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
399 | sr_fs9721_00_temp_c | |
400 | ), | |
401 | DMM( | |
402 | "voltcraft-vc870-ser", vc870, | |
403 | "Voltcraft", "VC-870 (UT-D02 cable)", "9600/8n1/rts=0/dtr=1", | |
404 | 9600, VC870_PACKET_SIZE, 0, 0, NULL, | |
405 | sr_vc870_packet_valid, sr_vc870_parse, NULL | |
406 | ), | |
407 | DMM( | |
408 | "voltcraft-vc920-ser", ut71x, | |
409 | "Voltcraft", "VC-920 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
410 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
411 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
412 | ), | |
413 | DMM( | |
414 | "voltcraft-vc940-ser", ut71x, | |
415 | "Voltcraft", "VC-940 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
416 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
417 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
418 | ), | |
419 | DMM( | |
420 | "voltcraft-vc960-ser", ut71x, | |
421 | "Voltcraft", "VC-960 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
422 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
423 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
424 | ), | |
425 | DMM( | |
426 | "uni-t-ut60a-ser", fs9721, | |
427 | "UNI-T", "UT60A (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
428 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
429 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
430 | NULL | |
431 | ), | |
432 | DMM( | |
433 | "uni-t-ut60e-ser", fs9721, | |
434 | "UNI-T", "UT60E (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
435 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
436 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
437 | sr_fs9721_00_temp_c | |
438 | ), | |
439 | DMM( | |
440 | /* Note: ES51986 baudrate is actually 19230! */ | |
441 | "uni-t-ut60g-ser", es519xx, | |
442 | "UNI-T", "UT60G (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
443 | 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
444 | sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, | |
445 | NULL | |
446 | ), | |
447 | DMM( | |
448 | "uni-t-ut61b-ser", fs9922, | |
449 | "UNI-T", "UT61B (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
450 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
451 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
452 | ), | |
453 | DMM( | |
454 | "uni-t-ut61c-ser", fs9922, | |
455 | "UNI-T", "UT61C (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
456 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
457 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
458 | ), | |
459 | DMM( | |
460 | "uni-t-ut61d-ser", fs9922, | |
461 | "UNI-T", "UT61D (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
462 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
463 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
464 | ), | |
465 | DMM( | |
466 | "uni-t-ut61e-ser", es519xx, | |
467 | /* Note: ES51922 baudrate is actually 19230! */ | |
468 | "UNI-T", "UT61E (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
469 | 19200, ES519XX_14B_PACKET_SIZE, 0, 0, NULL, | |
470 | sr_es519xx_19200_14b_packet_valid, sr_es519xx_19200_14b_parse, | |
471 | NULL | |
472 | ), | |
473 | DMM( | |
474 | "uni-t-ut71a-ser", ut71x, | |
475 | "UNI-T", "UT71A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
476 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
477 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
478 | ), | |
479 | DMM( | |
480 | "uni-t-ut71b-ser", ut71x, | |
481 | "UNI-T", "UT71B (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
482 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
483 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
484 | ), | |
485 | DMM( | |
486 | "uni-t-ut71c-ser", ut71x, | |
487 | "UNI-T", "UT71C (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
488 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
489 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
490 | ), | |
491 | DMM( | |
492 | "uni-t-ut71d-ser", ut71x, | |
493 | "UNI-T", "UT71D (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
494 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
495 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
496 | ), | |
497 | DMM( | |
498 | "uni-t-ut71e-ser", ut71x, | |
499 | "UNI-T", "UT71E (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
500 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
501 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
502 | ), | |
503 | DMM( | |
504 | "iso-tech-idm103n", es519xx, | |
505 | "ISO-TECH", "IDM103N", "2400/7o1/rts=0/dtr=1", | |
506 | 2400, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
507 | sr_es519xx_2400_11b_packet_valid, sr_es519xx_2400_11b_parse, | |
508 | NULL | |
509 | ), | |
b1cadcfb KP |
510 | DMM( |
511 | "tenma-72-7730-ser", ut71x, | |
512 | "Tenma", "72-7730 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
513 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
514 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
515 | ), | |
0a4549ff UH |
516 | DMM( |
517 | "tenma-72-7732-ser", ut71x, | |
518 | "Tenma", "72-7732 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
519 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
520 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
521 | ), | |
20f9f1fb UH |
522 | DMM( |
523 | "tenma-72-9380a-ser", ut71x, | |
524 | "Tenma", "72-9380A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
525 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
526 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
527 | ), | |
bcbef5ed ML |
528 | DMM( |
529 | "tenma-72-7745-ser", fs9721, | |
530 | "Tenma", "72-7745 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
531 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
532 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
533 | sr_fs9721_00_temp_c | |
534 | ), | |
535 | DMM( | |
536 | "tenma-72-7750-ser", es519xx, | |
537 | /* Note: ES51986 baudrate is actually 19230! */ | |
538 | "Tenma", "72-7750 (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
539 | 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
540 | sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, | |
541 | NULL | |
542 | ), | |
543 | DMM( | |
544 | "brymen-bm25x", bm25x, | |
545 | "Brymen", "BM25x", "9600/8n1/rts=1/dtr=1", | |
546 | 9600, BRYMEN_BM25X_PACKET_SIZE, 0, 0, NULL, | |
547 | sr_brymen_bm25x_packet_valid, sr_brymen_bm25x_parse, | |
548 | NULL | |
549 | ), | |
d79244dc MG |
550 | DMM( |
551 | "velleman-dvm4100", dtm0660, | |
552 | "Velleman", "DVM4100", "2400/8n1/rts=0/dtr=1", | |
553 | 2400, DTM0660_PACKET_SIZE, 0, 0, NULL, | |
554 | sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL | |
555 | ), | |
556 | DMM( | |
557 | "peaktech-3415", dtm0660, | |
558 | "Peaktech", "3415", "2400/8n1/rts=0/dtr=1", | |
559 | 2400, DTM0660_PACKET_SIZE, 0, 0, NULL, | |
560 | sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL | |
561 | ), | |
dd5c48a6 | 562 | ); |