]>
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 | ||
05199c0a | 37 | static const uint32_t drvopts[] = { |
1953564a | 38 | SR_CONF_MULTIMETER, |
05199c0a UH |
39 | }; |
40 | ||
41 | static const uint32_t devopts[] = { | |
1953564a | 42 | SR_CONF_CONTINUOUS, |
5827f61b BV |
43 | SR_CONF_LIMIT_SAMPLES | SR_CONF_SET, |
44 | SR_CONF_LIMIT_MSEC | SR_CONF_SET, | |
7dc55d93 AG |
45 | }; |
46 | ||
bcbef5ed | 47 | static GSList *scan(struct sr_dev_driver *di, GSList *options) |
7dc55d93 | 48 | { |
1a863916 | 49 | struct dmm_info *dmm; |
bcbef5ed ML |
50 | struct sr_config *src; |
51 | GSList *l, *devices; | |
52 | const char *conn, *serialcomm; | |
7dc55d93 | 53 | struct sr_dev_inst *sdi; |
7dc55d93 | 54 | struct dev_context *devc; |
d35afa87 | 55 | struct sr_serial_dev_inst *serial; |
2546b05c AG |
56 | int dropped, ret; |
57 | size_t len; | |
58 | uint8_t buf[128]; | |
7dc55d93 | 59 | |
1a863916 UH |
60 | dmm = (struct dmm_info *)di; |
61 | ||
bcbef5ed ML |
62 | conn = serialcomm = NULL; |
63 | for (l = options; l; l = l->next) { | |
64 | src = l->data; | |
65 | switch (src->key) { | |
66 | case SR_CONF_CONN: | |
67 | conn = g_variant_get_string(src->data, NULL); | |
68 | break; | |
69 | case SR_CONF_SERIALCOMM: | |
70 | serialcomm = g_variant_get_string(src->data, NULL); | |
71 | break; | |
72 | } | |
73 | } | |
74 | if (!conn) | |
75 | return NULL; | |
76 | ||
77 | if (!serialcomm) | |
78 | serialcomm = dmm->conn; | |
79 | ||
91219afc | 80 | serial = sr_serial_dev_inst_new(conn, serialcomm); |
d35afa87 | 81 | |
2e360339 | 82 | if (serial_open(serial, SERIAL_RDWR) != SR_OK) |
7dc55d93 | 83 | return NULL; |
7dc55d93 | 84 | |
22f54192 | 85 | sr_info("Probing serial port %s.", conn); |
7dc55d93 | 86 | |
7dc55d93 | 87 | devices = NULL; |
d35afa87 | 88 | serial_flush(serial); |
bbabddbd | 89 | |
ce3777ad | 90 | /* Request a packet if the DMM requires this. */ |
bcbef5ed ML |
91 | if (dmm->packet_request) { |
92 | if ((ret = dmm->packet_request(serial)) < 0) { | |
ce3777ad UH |
93 | sr_err("Failed to request packet: %d.", ret); |
94 | return FALSE; | |
95 | } | |
96 | } | |
97 | ||
22f54192 UH |
98 | /* |
99 | * There's no way to get an ID from the multimeter. It just sends data | |
100 | * periodically (or upon request), so the best we can do is check if | |
101 | * the packets match the expected format. | |
102 | */ | |
103 | ||
104 | /* Let's get a bit of data and see if we can find a packet. */ | |
105 | len = sizeof(buf); | |
bcbef5ed ML |
106 | ret = serial_stream_detect(serial, buf, &len, dmm->packet_size, |
107 | dmm->packet_valid, 3000, | |
108 | dmm->baudrate); | |
2546b05c AG |
109 | if (ret != SR_OK) |
110 | goto scan_cleanup; | |
7dc55d93 | 111 | |
2546b05c AG |
112 | /* |
113 | * If we dropped more than two packets worth of data, something is | |
114 | * wrong. We shouldn't quit however, since the dropped bytes might be | |
115 | * just zeroes at the beginning of the stream. Those can occur as a | |
22f54192 UH |
116 | * combination of the nonstandard cable that ships with some devices |
117 | * and the serial port or USB to serial adapter. | |
2546b05c | 118 | */ |
bcbef5ed ML |
119 | dropped = len - dmm->packet_size; |
120 | if (dropped > 2 * dmm->packet_size) | |
6bef68a7 | 121 | sr_warn("Had to drop too much data."); |
7dc55d93 | 122 | |
2546b05c | 123 | sr_info("Found device on port %s.", conn); |
7dc55d93 | 124 | |
aac29cc1 | 125 | sdi = g_malloc0(sizeof(struct sr_dev_inst)); |
0af636be | 126 | sdi->status = SR_ST_INACTIVE; |
bcbef5ed ML |
127 | sdi->vendor = g_strdup(dmm->vendor); |
128 | sdi->model = g_strdup(dmm->device); | |
f57d8ffe | 129 | devc = g_malloc0(sizeof(struct dev_context)); |
9f51c463 | 130 | sr_sw_limits_init(&devc->limits); |
1e1bfcd0 UH |
131 | sdi->inst_type = SR_INST_SERIAL; |
132 | sdi->conn = serial; | |
2546b05c | 133 | sdi->priv = devc; |
5e23fcab | 134 | sr_channel_new(sdi, 0, SR_CHANNEL_ANALOG, TRUE, "P1"); |
2546b05c AG |
135 | devices = g_slist_append(devices, sdi); |
136 | ||
137 | scan_cleanup: | |
d35afa87 | 138 | serial_close(serial); |
2546b05c | 139 | |
15a5bfe4 | 140 | return std_scan_complete(di, devices); |
7dc55d93 AG |
141 | } |
142 | ||
dd7a72ea UH |
143 | static int config_set(uint32_t key, GVariant *data, |
144 | const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) | |
7dc55d93 AG |
145 | { |
146 | struct dev_context *devc; | |
147 | ||
53b4680f | 148 | (void)cg; |
8f996b89 | 149 | |
b0baddef | 150 | devc = sdi->priv; |
7dc55d93 | 151 | |
9f51c463 | 152 | return sr_sw_limits_config_set(&devc->limits, key, data); |
7dc55d93 AG |
153 | } |
154 | ||
dd7a72ea UH |
155 | static int config_list(uint32_t key, GVariant **data, |
156 | const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) | |
a1c743fc | 157 | { |
05199c0a | 158 | return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts); |
a1c743fc BV |
159 | } |
160 | ||
695dc859 | 161 | static int dev_acquisition_start(const struct sr_dev_inst *sdi) |
7dc55d93 | 162 | { |
7dc55d93 | 163 | struct dev_context *devc; |
1e1bfcd0 | 164 | struct sr_serial_dev_inst *serial; |
7dc55d93 | 165 | |
208c1d35 | 166 | devc = sdi->priv; |
7dc55d93 | 167 | |
9f51c463 | 168 | sr_sw_limits_acquisition_start(&devc->limits); |
bee2b016 | 169 | std_session_send_df_header(sdi); |
7dc55d93 | 170 | |
1e1bfcd0 | 171 | serial = sdi->conn; |
102f1239 | 172 | serial_source_add(sdi->session, serial, G_IO_IN, 50, |
bcbef5ed | 173 | receive_data, (void *)sdi); |
7dc55d93 AG |
174 | |
175 | return SR_OK; | |
176 | } | |
177 | ||
bcbef5ed ML |
178 | #define DMM(ID, CHIPSET, VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, \ |
179 | DELAY, REQUEST, VALID, PARSE, DETAILS) \ | |
dd5c48a6 | 180 | &((struct dmm_info) { \ |
bcbef5ed ML |
181 | { \ |
182 | .name = ID, \ | |
183 | .longname = VENDOR " " MODEL, \ | |
184 | .api_version = 1, \ | |
c2fdcc25 | 185 | .init = std_init, \ |
700d6b64 | 186 | .cleanup = std_cleanup, \ |
bcbef5ed | 187 | .scan = scan, \ |
c01bf34c | 188 | .dev_list = std_dev_list, \ |
f778bf02 | 189 | .dev_clear = std_dev_clear, \ |
bcbef5ed ML |
190 | .config_get = NULL, \ |
191 | .config_set = config_set, \ | |
192 | .config_list = config_list, \ | |
193 | .dev_open = std_serial_dev_open, \ | |
194 | .dev_close = std_serial_dev_close, \ | |
195 | .dev_acquisition_start = dev_acquisition_start, \ | |
4b1a9d5d | 196 | .dev_acquisition_stop = std_serial_dev_acquisition_stop, \ |
41812aca | 197 | .context = NULL, \ |
bcbef5ed ML |
198 | }, \ |
199 | VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, DELAY, \ | |
200 | REQUEST, VALID, PARSE, DETAILS, sizeof(struct CHIPSET##_info) \ | |
dd5c48a6 | 201 | }).di |
3098b390 | 202 | |
dd5c48a6 | 203 | SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers, |
c0678584 GS |
204 | /* |
205 | * The items are sorted by chipset first and then model name. | |
206 | * | |
207 | * This reflects the developer's perspective and is preferrable | |
208 | * during maintenance, as a vendor/product based sort order does | |
209 | * not work well for rebranded models, and from a support point | |
210 | * of view it's more important to identify similarities between | |
211 | * models and compatible devices. | |
212 | * | |
213 | * Fold marks {{{ }}} with matching braces were added, to further | |
214 | * speed up navigation in the long list. | |
215 | */ | |
dc5895cb GS |
216 | /* asycii based meters {{{ */ |
217 | DMM( | |
218 | "metrix-mx56c", asycii, "Metrix", "MX56C", | |
219 | "2400/8n1", 2400, ASYCII_PACKET_SIZE, 0, 0, NULL, | |
220 | sr_asycii_packet_valid, sr_asycii_parse, NULL | |
221 | ), | |
222 | /* }}} */ | |
c0678584 GS |
223 | /* bm25x based meters {{{ */ |
224 | DMM( | |
225 | "brymen-bm25x", bm25x, | |
226 | "Brymen", "BM25x", "9600/8n1/rts=1/dtr=1", | |
227 | 9600, BRYMEN_BM25X_PACKET_SIZE, 0, 0, NULL, | |
228 | sr_brymen_bm25x_packet_valid, sr_brymen_bm25x_parse, | |
229 | NULL | |
230 | ), | |
231 | /* }}} */ | |
440a374f GS |
232 | /* dtm0660 based meters {{{ */ |
233 | DMM( | |
234 | "peaktech-3415", dtm0660, | |
6c62c605 | 235 | "PeakTech", "3415", "2400/8n1/rts=0/dtr=1", |
440a374f GS |
236 | 2400, DTM0660_PACKET_SIZE, 0, 0, NULL, |
237 | sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL | |
238 | ), | |
239 | DMM( | |
240 | "velleman-dvm4100", dtm0660, | |
241 | "Velleman", "DVM4100", "2400/8n1/rts=0/dtr=1", | |
242 | 2400, DTM0660_PACKET_SIZE, 0, 0, NULL, | |
243 | sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL | |
244 | ), | |
245 | /* }}} */ | |
7532f61d GS |
246 | /* es519xx based meters {{{ */ |
247 | DMM( | |
248 | "iso-tech-idm103n", es519xx, | |
249 | "ISO-TECH", "IDM103N", "2400/7o1/rts=0/dtr=1", | |
250 | 2400, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
251 | sr_es519xx_2400_11b_packet_valid, sr_es519xx_2400_11b_parse, | |
252 | NULL | |
253 | ), | |
d5b1b76d GS |
254 | /* |
255 | * Note: ES51922 and ES51986 baudrate is actually 19230. This is | |
256 | * "out" by .15%, and so is well within the typical 1% margin | |
257 | * that is considered acceptable in UART communication, and thus | |
258 | * should not cause an issue. | |
82458e50 UH |
259 | * |
260 | * However, using 19230 as baudrate here will not work, as most DMM | |
261 | * cables do not support that baudrate! | |
d5b1b76d | 262 | */ |
7532f61d GS |
263 | DMM( |
264 | "tenma-72-7750-ser", es519xx, | |
7532f61d GS |
265 | "Tenma", "72-7750 (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", |
266 | 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
267 | sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, | |
268 | NULL | |
269 | ), | |
270 | DMM( | |
7532f61d GS |
271 | "uni-t-ut60g-ser", es519xx, |
272 | "UNI-T", "UT60G (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
273 | 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
274 | sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, | |
275 | NULL | |
276 | ), | |
277 | DMM( | |
278 | "uni-t-ut61e-ser", es519xx, | |
7532f61d GS |
279 | "UNI-T", "UT61E (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", |
280 | 19200, ES519XX_14B_PACKET_SIZE, 0, 0, NULL, | |
281 | sr_es519xx_19200_14b_packet_valid, sr_es519xx_19200_14b_parse, | |
282 | NULL | |
283 | ), | |
284 | /* }}} */ | |
289e1f4e | 285 | /* fs9721 based meters {{{ */ |
bcbef5ed ML |
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 | ), | |
bcbef5ed ML |
293 | DMM( |
294 | "mastech-ms8250b", fs9721, | |
295 | "MASTECH", "MS8250B", "2400/8n1/rts=0/dtr=1", | |
296 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
297 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
298 | NULL | |
299 | ), | |
300 | DMM( | |
1cd40b57 GS |
301 | "pce-pce-dm32", fs9721, |
302 | "PCE", "PCE-DM32", "2400/8n1", 2400, | |
bcbef5ed ML |
303 | FS9721_PACKET_SIZE, 0, 0, NULL, |
304 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
1cd40b57 | 305 | sr_fs9721_01_10_temp_f_c |
bcbef5ed | 306 | ), |
289e1f4e | 307 | DMM( |
1cd40b57 | 308 | "peaktech-3330", fs9721, |
6c62c605 | 309 | "PeakTech", "3330", "2400/8n1/dtr=1", 2400, |
289e1f4e GS |
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 | "tecpel-dmm-8061-ser", fs9721, | |
316 | "Tecpel", "DMM-8061 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
317 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
318 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
319 | sr_fs9721_00_temp_c | |
320 | ), | |
321 | DMM( | |
1cd40b57 GS |
322 | "tekpower-tp4000ZC", fs9721, |
323 | "TekPower", "TP4000ZC", "2400/8n1/dtr=1", 2400, | |
324 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
289e1f4e | 325 | sr_fs9721_packet_valid, sr_fs9721_parse, |
1cd40b57 | 326 | sr_fs9721_10_temp_c |
289e1f4e GS |
327 | ), |
328 | DMM( | |
1cd40b57 GS |
329 | "tenma-72-7745-ser", fs9721, |
330 | "Tenma", "72-7745 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
289e1f4e GS |
331 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, |
332 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
333 | sr_fs9721_00_temp_c | |
334 | ), | |
335 | DMM( | |
336 | "uni-t-ut60a-ser", fs9721, | |
337 | "UNI-T", "UT60A (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 | NULL | |
341 | ), | |
342 | DMM( | |
343 | "uni-t-ut60e-ser", fs9721, | |
344 | "UNI-T", "UT60E (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
345 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
346 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
347 | sr_fs9721_00_temp_c | |
348 | ), | |
349 | DMM( | |
1cd40b57 GS |
350 | "va-va18b", fs9721, |
351 | "V&A", "VA18B", "2400/8n1", 2400, | |
352 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
289e1f4e | 353 | sr_fs9721_packet_valid, sr_fs9721_parse, |
1cd40b57 | 354 | sr_fs9721_01_temp_c |
289e1f4e GS |
355 | ), |
356 | DMM( | |
1cd40b57 GS |
357 | "va-va40b", fs9721, |
358 | "V&A", "VA40B", "2400/8n1", 2400, | |
289e1f4e GS |
359 | FS9721_PACKET_SIZE, 0, 0, NULL, |
360 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
1cd40b57 GS |
361 | sr_fs9721_max_c_min |
362 | ), | |
363 | DMM( | |
364 | "voltcraft-vc820-ser", fs9721, | |
365 | "Voltcraft", "VC-820 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
366 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
367 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
368 | NULL | |
369 | ), | |
370 | DMM( | |
371 | "voltcraft-vc840-ser", fs9721, | |
372 | "Voltcraft", "VC-840 (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 | |
289e1f4e GS |
376 | ), |
377 | /* }}} */ | |
0e27643f | 378 | /* fs9922 based meters {{{ */ |
f97c1595 R |
379 | DMM( |
380 | "sparkfun-70c", fs9922, | |
381 | "SparkFun", "70C", "2400/8n1/rts=0/dtr=1", | |
382 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
383 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
384 | ), | |
0e27643f GS |
385 | DMM( |
386 | "uni-t-ut61b-ser", fs9922, | |
387 | "UNI-T", "UT61B (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
388 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
389 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
390 | ), | |
391 | DMM( | |
392 | "uni-t-ut61c-ser", fs9922, | |
393 | "UNI-T", "UT61C (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
394 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
395 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
396 | ), | |
397 | DMM( | |
398 | "uni-t-ut61d-ser", fs9922, | |
399 | "UNI-T", "UT61D (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
400 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
401 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
402 | ), | |
403 | DMM( | |
404 | /* | |
405 | * Note: The VC830 doesn't set the 'volt' and 'diode' bits of | |
406 | * the FS9922 protocol. Instead, it only sets the user-defined | |
407 | * bit "z1" to indicate "diode mode" and "voltage". | |
408 | */ | |
409 | "voltcraft-vc830-ser", fs9922, | |
410 | "Voltcraft", "VC-830 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
411 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
412 | sr_fs9922_packet_valid, sr_fs9922_parse, | |
413 | &sr_fs9922_z1_diode | |
414 | ), | |
415 | /* }}} */ | |
9d12555f | 416 | /* m2110 based meters {{{ */ |
289e1f4e | 417 | DMM( |
9d12555f | 418 | "bbcgm-2010", m2110, |
289e1f4e GS |
419 | "BBC Goertz Metrawatt", "M2110", "1200/7n2", 1200, |
420 | BBCGM_M2110_PACKET_SIZE, 0, 0, NULL, | |
421 | sr_m2110_packet_valid, sr_m2110_parse, | |
422 | NULL | |
423 | ), | |
9d12555f UH |
424 | /* }}} */ |
425 | /* metex14 based meters {{{ */ | |
289e1f4e | 426 | DMM( |
b35d0023 GS |
427 | "mastech-mas345", metex14, |
428 | "MASTECH", "MAS345", "600/7n2/rts=0/dtr=1", 600, | |
289e1f4e GS |
429 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, |
430 | sr_metex14_packet_valid, sr_metex14_parse, | |
431 | NULL | |
432 | ), | |
433 | DMM( | |
b35d0023 GS |
434 | "metex-m3640d", metex14, |
435 | "Metex", "M-3640D", "1200/7n2/rts=0/dtr=1", 1200, | |
289e1f4e GS |
436 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, |
437 | sr_metex14_packet_valid, sr_metex14_parse, | |
438 | NULL | |
439 | ), | |
440 | DMM( | |
b35d0023 GS |
441 | "metex-m4650cr", metex14, |
442 | "Metex", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
289e1f4e GS |
443 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, |
444 | sr_metex14_packet_valid, sr_metex14_parse, | |
445 | NULL | |
446 | ), | |
bcbef5ed | 447 | DMM( |
b35d0023 GS |
448 | "metex-me31", metex14, |
449 | "Metex", "ME-31", "600/7n2/rts=0/dtr=1", 600, | |
bcbef5ed ML |
450 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, |
451 | sr_metex14_packet_valid, sr_metex14_parse, | |
452 | NULL | |
453 | ), | |
454 | DMM( | |
b35d0023 | 455 | "peaktech-3410", metex14, |
6c62c605 | 456 | "PeakTech", "3410", "600/7n2/rts=0/dtr=1", 600, |
bcbef5ed ML |
457 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, |
458 | sr_metex14_packet_valid, sr_metex14_parse, | |
459 | NULL | |
460 | ), | |
461 | DMM( | |
462 | "peaktech-4370", metex14, | |
463 | "PeakTech", "4370", "1200/7n2/rts=0/dtr=1", 1200, | |
464 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
465 | sr_metex14_packet_valid, sr_metex14_parse, | |
466 | NULL | |
467 | ), | |
bcbef5ed ML |
468 | DMM( |
469 | "radioshack-22-168", metex14, | |
470 | "RadioShack", "22-168", "1200/7n2/rts=0/dtr=1", 1200, | |
471 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
472 | sr_metex14_packet_valid, sr_metex14_parse, | |
473 | NULL | |
474 | ), | |
475 | DMM( | |
476 | "radioshack-22-805", metex14, | |
477 | "RadioShack", "22-805", "600/7n2/rts=0/dtr=1", 600, | |
478 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
479 | sr_metex14_packet_valid, sr_metex14_parse, | |
480 | NULL | |
481 | ), | |
bcbef5ed ML |
482 | DMM( |
483 | "voltcraft-m3650cr", metex14, | |
484 | "Voltcraft", "M-3650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
485 | METEX14_PACKET_SIZE, 150, 20, sr_metex14_packet_request, | |
486 | sr_metex14_packet_valid, sr_metex14_parse, | |
487 | NULL | |
488 | ), | |
489 | DMM( | |
490 | "voltcraft-m3650d", metex14, | |
491 | "Voltcraft", "M-3650D", "1200/7n2/rts=0/dtr=1", 1200, | |
492 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
493 | sr_metex14_packet_valid, sr_metex14_parse, | |
494 | NULL | |
495 | ), | |
496 | DMM( | |
497 | "voltcraft-m4650cr", metex14, | |
498 | "Voltcraft", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
499 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
500 | sr_metex14_packet_valid, sr_metex14_parse, | |
501 | NULL | |
502 | ), | |
503 | DMM( | |
504 | "voltcraft-me42", metex14, | |
505 | "Voltcraft", "ME-42", "600/7n2/rts=0/dtr=1", 600, | |
506 | METEX14_PACKET_SIZE, 250, 60, sr_metex14_packet_request, | |
507 | sr_metex14_packet_valid, sr_metex14_parse, | |
508 | NULL | |
509 | ), | |
ab34156b | 510 | /* }}} */ |
92496488 | 511 | /* rs9lcd based meters {{{ */ |
ab34156b GS |
512 | DMM( |
513 | "radioshack-22-812", rs9lcd, | |
514 | "RadioShack", "22-812", "4800/8n1/rts=0/dtr=1", 4800, | |
515 | RS9LCD_PACKET_SIZE, 0, 0, NULL, | |
516 | sr_rs9lcd_packet_valid, sr_rs9lcd_parse, | |
517 | NULL | |
518 | ), | |
92496488 | 519 | /* }}} */ |
6c6e5e47 | 520 | /* ut71x based meters {{{ */ |
bcbef5ed | 521 | DMM( |
53e875ab GS |
522 | "tenma-72-7730-ser", ut71x, |
523 | "Tenma", "72-7730 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
bcbef5ed ML |
524 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, |
525 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
526 | ), | |
527 | DMM( | |
53e875ab GS |
528 | "tenma-72-7732-ser", ut71x, |
529 | "Tenma", "72-7732 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
bcbef5ed ML |
530 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, |
531 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
532 | ), | |
533 | DMM( | |
53e875ab GS |
534 | "tenma-72-9380a-ser", ut71x, |
535 | "Tenma", "72-9380A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
bcbef5ed ML |
536 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, |
537 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
538 | ), | |
bcbef5ed ML |
539 | DMM( |
540 | "uni-t-ut71a-ser", ut71x, | |
541 | "UNI-T", "UT71A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
542 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
543 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
544 | ), | |
545 | DMM( | |
546 | "uni-t-ut71b-ser", ut71x, | |
547 | "UNI-T", "UT71B (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
548 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
549 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
550 | ), | |
551 | DMM( | |
552 | "uni-t-ut71c-ser", ut71x, | |
553 | "UNI-T", "UT71C (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
554 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
555 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
556 | ), | |
557 | DMM( | |
558 | "uni-t-ut71d-ser", ut71x, | |
559 | "UNI-T", "UT71D (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
560 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
561 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
562 | ), | |
563 | DMM( | |
564 | "uni-t-ut71e-ser", ut71x, | |
565 | "UNI-T", "UT71E (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
566 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
567 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
568 | ), | |
b1cadcfb | 569 | DMM( |
53e875ab GS |
570 | "voltcraft-vc920-ser", ut71x, |
571 | "Voltcraft", "VC-920 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
b1cadcfb KP |
572 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, |
573 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
574 | ), | |
0a4549ff | 575 | DMM( |
53e875ab GS |
576 | "voltcraft-vc940-ser", ut71x, |
577 | "Voltcraft", "VC-940 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
0a4549ff UH |
578 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, |
579 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
580 | ), | |
20f9f1fb | 581 | DMM( |
53e875ab GS |
582 | "voltcraft-vc960-ser", ut71x, |
583 | "Voltcraft", "VC-960 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
20f9f1fb UH |
584 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, |
585 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
586 | ), | |
6c6e5e47 | 587 | /* }}} */ |
89a3d8af | 588 | /* vc870 based meters {{{ */ |
6c6e5e47 GS |
589 | DMM( |
590 | "voltcraft-vc870-ser", vc870, | |
591 | "Voltcraft", "VC-870 (UT-D02 cable)", "9600/8n1/rts=0/dtr=1", | |
592 | 9600, VC870_PACKET_SIZE, 0, 0, NULL, | |
593 | sr_vc870_packet_valid, sr_vc870_parse, NULL | |
594 | ), | |
89a3d8af GS |
595 | /* }}} */ |
596 | /* | |
597 | * The list is sorted. Add new items in the respective chip's group. | |
598 | */ | |
dd5c48a6 | 599 | ); |