]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * This file is part of the libsigrok project. | |
3 | * | |
4 | * Copyright (C) 2013, 2014 Matthias Heidbrink <m-sigrok@heidbrink.biz> | |
5 | * | |
6 | * This program is free software: you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation, either version 3 of the License, or | |
9 | * (at your option) any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | */ | |
19 | ||
20 | /** @file | |
21 | * Gossen Metrawatt Metrahit 1x/2x drivers | |
22 | * @internal | |
23 | */ | |
24 | ||
25 | #include <string.h> | |
26 | #include "protocol.h" | |
27 | ||
28 | /* Serial communication parameters for Metrahit 1x/2x with 'RS232' adaptor */ | |
29 | #define SERIALCOMM_1X_RS232 "8228/6n1/dtr=1/rts=1/flow=0" /* =8192, closer with divider */ | |
30 | #define SERIALCOMM_2X_RS232 "9600/6n1/dtr=1/rts=1/flow=0" | |
31 | #define SERIALCOMM_2X "9600/8n1/dtr=1/rts=1/flow=0" | |
32 | #define VENDOR_GMC "Gossen Metrawatt" | |
33 | ||
34 | SR_PRIV struct sr_dev_driver gmc_mh_1x_2x_rs232_driver_info; | |
35 | SR_PRIV struct sr_dev_driver gmc_mh_2x_bd232_driver_info; | |
36 | ||
37 | static const uint32_t scanopts[] = { | |
38 | SR_CONF_CONN, | |
39 | SR_CONF_SERIALCOMM, | |
40 | }; | |
41 | ||
42 | /** Hardware capabilities for Metrahit 1x/2x devices in send mode. */ | |
43 | static const uint32_t devopts_sm[] = { | |
44 | SR_CONF_MULTIMETER, | |
45 | SR_CONF_THERMOMETER, /**< All GMC 1x/2x multimeters seem to support this */ | |
46 | SR_CONF_CONTINUOUS, | |
47 | SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET, | |
48 | SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET, | |
49 | }; | |
50 | ||
51 | /** Hardware capabilities for Metrahit 2x devices in bidirectional Mode. */ | |
52 | static const uint32_t devopts_bd[] = { | |
53 | SR_CONF_MULTIMETER, | |
54 | SR_CONF_THERMOMETER, /**< All GMC 1x/2x multimeters seem to support this */ | |
55 | SR_CONF_CONTINUOUS, | |
56 | SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET, | |
57 | SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET, | |
58 | SR_CONF_POWER_OFF | SR_CONF_GET | SR_CONF_SET, | |
59 | }; | |
60 | ||
61 | /* TODO: | |
62 | * - For the 29S SR_CONF_ENERGYMETER, too. | |
63 | * - SR_CONF_PATTERN_MODE for some 2x devices | |
64 | * - SR_CONF_DATALOG for 22M, 26M, 29S and storage adaptors. | |
65 | * Need to implement device-specific lists. | |
66 | */ | |
67 | ||
68 | static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx) | |
69 | { | |
70 | return std_init(sr_ctx, di, LOG_PREFIX); | |
71 | } | |
72 | ||
73 | /** | |
74 | * Read single byte from serial port. | |
75 | * | |
76 | * @retval -1 Timeout or error. | |
77 | * @retval other Byte. | |
78 | */ | |
79 | static int read_byte(struct sr_serial_dev_inst *serial, gint64 timeout) | |
80 | { | |
81 | uint8_t result = 0; | |
82 | int rc = 0; | |
83 | ||
84 | for (;;) { | |
85 | rc = serial_read_nonblocking(serial, &result, 1); | |
86 | if (rc == 1) { | |
87 | sr_spew("read: 0x%02x/%d", result, result); | |
88 | return result; | |
89 | } | |
90 | if (g_get_monotonic_time() > timeout) | |
91 | return -1; | |
92 | g_usleep(2000); | |
93 | } | |
94 | } | |
95 | ||
96 | /** | |
97 | * Try to detect GMC 1x/2x multimeter model in send mode for max. 1 second. | |
98 | * | |
99 | * @param serial Configured, open serial port. | |
100 | * | |
101 | * @retval NULL Detection failed. | |
102 | * @retval other Model code. | |
103 | */ | |
104 | static enum model scan_model_sm(struct sr_serial_dev_inst *serial) | |
105 | { | |
106 | int byte, bytecnt, cnt; | |
107 | enum model model; | |
108 | gint64 timeout_us; | |
109 | ||
110 | model = METRAHIT_NONE; | |
111 | timeout_us = g_get_monotonic_time() + (1 * 1000 * 1000); | |
112 | ||
113 | /* | |
114 | * Try to find message consisting of device code and several | |
115 | * (at least 4) data bytes. | |
116 | */ | |
117 | for (bytecnt = 0; bytecnt < 100; bytecnt++) { | |
118 | byte = read_byte(serial, timeout_us); | |
119 | if ((byte == -1) || (timeout_us < g_get_monotonic_time())) | |
120 | break; | |
121 | if ((byte & MSGID_MASK) == MSGID_INF) { | |
122 | if (!(model = gmc_decode_model_sm(byte & MSGC_MASK))) | |
123 | break; | |
124 | /* Now expect (at least) 4 data bytes. */ | |
125 | for (cnt = 0; cnt < 4; cnt++) { | |
126 | byte = read_byte(serial, timeout_us); | |
127 | if ((byte == -1) || | |
128 | ((byte & MSGID_MASK) != MSGID_DATA)) | |
129 | { | |
130 | model = METRAHIT_NONE; | |
131 | bytecnt = 100; | |
132 | break; | |
133 | } | |
134 | } | |
135 | break; | |
136 | } | |
137 | } | |
138 | ||
139 | return model; | |
140 | } | |
141 | ||
142 | /** | |
143 | * Scan for Metrahit 1x and Metrahit 2x in send mode using Gossen Metrawatt | |
144 | * 'RS232' interface. | |
145 | * | |
146 | * The older 1x models use 8192 baud and the newer 2x 9600 baud. | |
147 | * The DMM usually sends up to about 20 messages per second. However, depending | |
148 | * on configuration and measurement mode the intervals can be much larger and | |
149 | * then the detection might not work. | |
150 | */ | |
151 | static GSList *scan_1x_2x_rs232(struct sr_dev_driver *di, GSList *options) | |
152 | { | |
153 | struct sr_dev_inst *sdi; | |
154 | struct drv_context *drvc; | |
155 | struct dev_context *devc; | |
156 | struct sr_config *src; | |
157 | struct sr_serial_dev_inst *serial; | |
158 | GSList *l, *devices; | |
159 | const char *conn, *serialcomm; | |
160 | enum model model; | |
161 | gboolean serialcomm_given; | |
162 | ||
163 | devices = NULL; | |
164 | drvc = di->priv; | |
165 | drvc->instances = NULL; | |
166 | conn = serialcomm = NULL; | |
167 | model = METRAHIT_NONE; | |
168 | serialcomm_given = FALSE; | |
169 | ||
170 | sr_spew("scan_1x_2x_rs232() called!"); | |
171 | ||
172 | for (l = options; l; l = l->next) { | |
173 | src = l->data; | |
174 | switch (src->key) { | |
175 | case SR_CONF_CONN: | |
176 | conn = g_variant_get_string(src->data, NULL); | |
177 | break; | |
178 | case SR_CONF_SERIALCOMM: | |
179 | serialcomm = g_variant_get_string(src->data, NULL); | |
180 | serialcomm_given = TRUE; | |
181 | break; | |
182 | } | |
183 | } | |
184 | if (!conn) | |
185 | return NULL; | |
186 | if (!serialcomm) | |
187 | serialcomm = SERIALCOMM_2X_RS232; | |
188 | ||
189 | serial = sr_serial_dev_inst_new(conn, serialcomm); | |
190 | ||
191 | if (serial_open(serial, SERIAL_RDWR) != SR_OK) { | |
192 | sr_serial_dev_inst_free(serial); | |
193 | return NULL; | |
194 | } | |
195 | ||
196 | serial_flush(serial); | |
197 | ||
198 | model = scan_model_sm(serial); | |
199 | ||
200 | /* | |
201 | * If detection failed and no user-supplied parameters, | |
202 | * try second baud rate. | |
203 | */ | |
204 | if ((model == METRAHIT_NONE) && !serialcomm_given) { | |
205 | serialcomm = SERIALCOMM_1X_RS232; | |
206 | g_free(serial->serialcomm); | |
207 | serial->serialcomm = g_strdup(serialcomm); | |
208 | if (serial_set_paramstr(serial, serialcomm) == SR_OK) { | |
209 | serial_flush(serial); | |
210 | model = scan_model_sm(serial); | |
211 | } | |
212 | } | |
213 | ||
214 | if (model != METRAHIT_NONE) { | |
215 | sr_spew("%s %s detected!", VENDOR_GMC, gmc_model_str(model)); | |
216 | sdi = g_malloc0(sizeof(struct sr_dev_inst)); | |
217 | sdi->status = SR_ST_INACTIVE; | |
218 | sdi->vendor = g_strdup(VENDOR_GMC); | |
219 | sdi->model = g_strdup(gmc_model_str(model)); | |
220 | devc = g_malloc0(sizeof(struct dev_context)); | |
221 | devc->model = model; | |
222 | devc->limit_samples = 0; | |
223 | devc->limit_msec = 0; | |
224 | devc->num_samples = 0; | |
225 | devc->elapsed_msec = g_timer_new(); | |
226 | devc->settings_ok = FALSE; | |
227 | sdi->conn = serial; | |
228 | sdi->priv = devc; | |
229 | sdi->driver = di; | |
230 | sr_channel_new(sdi, 0, SR_CHANNEL_ANALOG, TRUE, "P1"); | |
231 | drvc->instances = g_slist_append(drvc->instances, sdi); | |
232 | devices = g_slist_append(devices, sdi); | |
233 | } | |
234 | ||
235 | return devices; | |
236 | } | |
237 | ||
238 | /** | |
239 | * Scan for Metrahit 2x in a bidirectional mode using Gossen Metrawatt | |
240 | * 'BD 232' interface. | |
241 | */ | |
242 | static GSList *scan_2x_bd232(struct sr_dev_driver *di, GSList *options) | |
243 | { | |
244 | struct sr_dev_inst *sdi; | |
245 | struct drv_context *drvc; | |
246 | struct dev_context *devc; | |
247 | struct sr_config *src; | |
248 | struct sr_serial_dev_inst *serial; | |
249 | GSList *l, *devices; | |
250 | const char *conn, *serialcomm; | |
251 | int cnt, byte; | |
252 | gint64 timeout_us; | |
253 | ||
254 | sdi = NULL; | |
255 | devc = NULL; | |
256 | conn = serialcomm = NULL; | |
257 | devices = NULL; | |
258 | ||
259 | drvc = di->priv; | |
260 | drvc->instances = NULL; | |
261 | ||
262 | sr_spew("scan_2x_bd232() called!"); | |
263 | ||
264 | for (l = options; l; l = l->next) { | |
265 | src = l->data; | |
266 | switch (src->key) { | |
267 | case SR_CONF_CONN: | |
268 | conn = g_variant_get_string(src->data, NULL); | |
269 | break; | |
270 | case SR_CONF_SERIALCOMM: | |
271 | serialcomm = g_variant_get_string(src->data, NULL); | |
272 | break; | |
273 | } | |
274 | } | |
275 | if (!conn) | |
276 | return NULL; | |
277 | if (!serialcomm) | |
278 | serialcomm = SERIALCOMM_2X; | |
279 | ||
280 | serial = sr_serial_dev_inst_new(conn, serialcomm); | |
281 | ||
282 | if (serial_open(serial, SERIAL_RDWR) != SR_OK) | |
283 | goto exit_err; | |
284 | ||
285 | devc = g_malloc0(sizeof(struct dev_context)); | |
286 | ||
287 | sdi = g_malloc0(sizeof(struct sr_dev_inst)); | |
288 | sdi->status = SR_ST_INACTIVE; | |
289 | sdi->vendor = g_strdup(VENDOR_GMC); | |
290 | sdi->priv = devc; | |
291 | ||
292 | /* Send message 03 "Query multimeter version and status" */ | |
293 | sdi->conn = serial; | |
294 | sdi->priv = devc; | |
295 | if (req_stat14(sdi, TRUE) != SR_OK) | |
296 | goto exit_err; | |
297 | ||
298 | /* Wait for reply from device(s) for up to 2s. */ | |
299 | timeout_us = g_get_monotonic_time() + (2 * 1000 * 1000); | |
300 | ||
301 | while (timeout_us > g_get_monotonic_time()) { | |
302 | /* Receive reply (14 bytes) */ | |
303 | devc->buflen = 0; | |
304 | for (cnt = 0; cnt < GMC_REPLY_SIZE; cnt++) { | |
305 | byte = read_byte(serial, timeout_us); | |
306 | if (byte != -1) | |
307 | devc->buf[devc->buflen++] = (byte & MASK_6BITS); | |
308 | } | |
309 | ||
310 | if (devc->buflen != GMC_REPLY_SIZE) | |
311 | continue; | |
312 | ||
313 | devc->addr = devc->buf[0]; | |
314 | process_msg14(sdi); | |
315 | devc->buflen = 0; | |
316 | ||
317 | if (devc->model != METRAHIT_NONE) { | |
318 | sr_spew("%s %s detected!", VENDOR_GMC, gmc_model_str(devc->model)); | |
319 | devc->elapsed_msec = g_timer_new(); | |
320 | sdi->model = g_strdup(gmc_model_str(devc->model)); | |
321 | sdi->version = g_strdup_printf("Firmware %d.%d", devc->fw_ver_maj, devc->fw_ver_min); | |
322 | sdi->conn = serial; | |
323 | sdi->priv = devc; | |
324 | sdi->driver = di; | |
325 | sr_channel_new(sdi, 0, SR_CHANNEL_ANALOG, TRUE, "P1"); | |
326 | drvc->instances = g_slist_append(drvc->instances, sdi); | |
327 | devices = g_slist_append(devices, sdi); | |
328 | devc = g_malloc0(sizeof(struct dev_context)); | |
329 | sdi = g_malloc0(sizeof(struct sr_dev_inst)); | |
330 | sdi->status = SR_ST_INACTIVE; | |
331 | sdi->vendor = g_strdup(VENDOR_GMC); | |
332 | } | |
333 | }; | |
334 | ||
335 | /* Free last alloc if no device found */ | |
336 | if (devc->model == METRAHIT_NONE) { | |
337 | g_free(devc); | |
338 | sr_dev_inst_free(sdi); | |
339 | } | |
340 | ||
341 | return devices; | |
342 | ||
343 | exit_err: | |
344 | sr_info("scan_2x_bd232(): Error!"); | |
345 | ||
346 | if (serial) | |
347 | sr_serial_dev_inst_free(serial); | |
348 | g_free(devc); | |
349 | if (sdi) | |
350 | sr_dev_inst_free(sdi); | |
351 | ||
352 | return NULL; | |
353 | } | |
354 | ||
355 | static GSList *dev_list(const struct sr_dev_driver *di) | |
356 | { | |
357 | return ((struct drv_context *)(di->priv))->instances; | |
358 | } | |
359 | ||
360 | static int dev_close(struct sr_dev_inst *sdi) | |
361 | { | |
362 | struct dev_context *devc; | |
363 | ||
364 | std_serial_dev_close(sdi); | |
365 | ||
366 | sdi->status = SR_ST_INACTIVE; | |
367 | ||
368 | /* Free dynamically allocated resources. */ | |
369 | if ((devc = sdi->priv) && devc->elapsed_msec) { | |
370 | g_timer_destroy(devc->elapsed_msec); | |
371 | devc->elapsed_msec = NULL; | |
372 | devc->model = METRAHIT_NONE; | |
373 | } | |
374 | ||
375 | return SR_OK; | |
376 | } | |
377 | ||
378 | static int cleanup(const struct sr_dev_driver *di) | |
379 | { | |
380 | return std_dev_clear(di, NULL); | |
381 | } | |
382 | ||
383 | static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, | |
384 | const struct sr_channel_group *cg) | |
385 | { | |
386 | int ret; | |
387 | struct dev_context *devc; | |
388 | ||
389 | (void)cg; | |
390 | ||
391 | if (!sdi || !(devc = sdi->priv)) | |
392 | return SR_ERR_ARG; | |
393 | ||
394 | ret = SR_OK; | |
395 | switch (key) { | |
396 | case SR_CONF_LIMIT_SAMPLES: | |
397 | *data = g_variant_new_uint64(devc->limit_samples); | |
398 | break; | |
399 | case SR_CONF_LIMIT_MSEC: | |
400 | *data = g_variant_new_uint64(devc->limit_msec); | |
401 | break; | |
402 | case SR_CONF_POWER_OFF: | |
403 | *data = g_variant_new_boolean(FALSE); | |
404 | break; | |
405 | default: | |
406 | return SR_ERR_NA; | |
407 | } | |
408 | ||
409 | return ret; | |
410 | } | |
411 | ||
412 | /** Implementation of config_list, auxiliary function for common parts. */ | |
413 | static int config_list_common(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, | |
414 | const struct sr_channel_group *cg) | |
415 | { | |
416 | (void)sdi; | |
417 | (void)cg; | |
418 | ||
419 | switch (key) { | |
420 | case SR_CONF_SCAN_OPTIONS: | |
421 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, | |
422 | scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t)); | |
423 | break; | |
424 | default: | |
425 | return SR_ERR_NA; | |
426 | } | |
427 | ||
428 | return SR_OK; | |
429 | } | |
430 | ||
431 | /** Implementation of config_list for Metrahit 1x/2x send mode */ | |
432 | static int config_list_sm(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, | |
433 | const struct sr_channel_group *cg) | |
434 | { | |
435 | switch (key) { | |
436 | case SR_CONF_DEVICE_OPTIONS: | |
437 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, | |
438 | devopts_sm, ARRAY_SIZE(devopts_sm), sizeof(uint32_t)); | |
439 | break; | |
440 | default: | |
441 | return config_list_common(key, data, sdi, cg); | |
442 | } | |
443 | ||
444 | return SR_OK; | |
445 | } | |
446 | ||
447 | /** Implementation of config_list for Metrahit 2x bidirectional mode */ | |
448 | static int config_list_bd(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, | |
449 | const struct sr_channel_group *cg) | |
450 | { | |
451 | switch (key) { | |
452 | case SR_CONF_DEVICE_OPTIONS: | |
453 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, | |
454 | devopts_bd, ARRAY_SIZE(devopts_bd), sizeof(uint32_t)); | |
455 | break; | |
456 | default: | |
457 | return config_list_common(key, data, sdi, cg); | |
458 | } | |
459 | ||
460 | return SR_OK; | |
461 | } | |
462 | ||
463 | static int dev_acquisition_start_1x_2x_rs232(const struct sr_dev_inst *sdi, | |
464 | void *cb_data) | |
465 | { | |
466 | struct dev_context *devc; | |
467 | struct sr_serial_dev_inst *serial; | |
468 | ||
469 | if (!sdi || !cb_data || !(devc = sdi->priv)) | |
470 | return SR_ERR_BUG; | |
471 | ||
472 | if (sdi->status != SR_ST_ACTIVE) | |
473 | return SR_ERR_DEV_CLOSED; | |
474 | ||
475 | devc->cb_data = cb_data; | |
476 | devc->settings_ok = FALSE; | |
477 | devc->buflen = 0; | |
478 | ||
479 | /* Send header packet to the session bus. */ | |
480 | std_session_send_df_header(cb_data, LOG_PREFIX); | |
481 | ||
482 | /* Start timer, if required. */ | |
483 | if (devc->limit_msec) | |
484 | g_timer_start(devc->elapsed_msec); | |
485 | ||
486 | /* Poll every 40ms, or whenever some data comes in. */ | |
487 | serial = sdi->conn; | |
488 | serial_source_add(sdi->session, serial, G_IO_IN, 40, | |
489 | gmc_mh_1x_2x_receive_data, (void *)sdi); | |
490 | ||
491 | return SR_OK; | |
492 | } | |
493 | ||
494 | static int dev_acquisition_start_2x_bd232(const struct sr_dev_inst *sdi, | |
495 | void *cb_data) | |
496 | { | |
497 | struct dev_context *devc; | |
498 | struct sr_serial_dev_inst *serial; | |
499 | ||
500 | if (!sdi || !cb_data || !(devc = sdi->priv)) | |
501 | return SR_ERR_BUG; | |
502 | ||
503 | if (sdi->status != SR_ST_ACTIVE) | |
504 | return SR_ERR_DEV_CLOSED; | |
505 | ||
506 | devc->cb_data = cb_data; | |
507 | devc->settings_ok = FALSE; | |
508 | devc->buflen = 0; | |
509 | ||
510 | /* Send header packet to the session bus. */ | |
511 | std_session_send_df_header(cb_data, LOG_PREFIX); | |
512 | ||
513 | /* Start timer, if required. */ | |
514 | if (devc->limit_msec) | |
515 | g_timer_start(devc->elapsed_msec); | |
516 | ||
517 | /* Poll every 40ms, or whenever some data comes in. */ | |
518 | serial = sdi->conn; | |
519 | serial_source_add(sdi->session, serial, G_IO_IN, 40, | |
520 | gmc_mh_2x_receive_data, (void *)sdi); | |
521 | ||
522 | /* Send start message */ | |
523 | return req_meas14(sdi); | |
524 | } | |
525 | ||
526 | static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) | |
527 | { | |
528 | struct dev_context *devc; | |
529 | ||
530 | /* Stop timer, if required. */ | |
531 | if (sdi && (devc = sdi->priv) && devc->limit_msec) | |
532 | g_timer_stop(devc->elapsed_msec); | |
533 | ||
534 | return std_serial_dev_acquisition_stop(sdi, cb_data, dev_close, | |
535 | sdi->conn, LOG_PREFIX); | |
536 | } | |
537 | ||
538 | SR_PRIV struct sr_dev_driver gmc_mh_1x_2x_rs232_driver_info = { | |
539 | .name = "gmc-mh-1x-2x-rs232", | |
540 | .longname = "Gossen Metrawatt Metrahit 1x/2x, RS232 interface", | |
541 | .api_version = 1, | |
542 | .init = init, | |
543 | .cleanup = cleanup, | |
544 | .scan = scan_1x_2x_rs232, | |
545 | .dev_list = dev_list, | |
546 | .dev_clear = NULL, | |
547 | .config_get = config_get, | |
548 | .config_set = config_set, | |
549 | .config_list = config_list_sm, | |
550 | .dev_open = std_serial_dev_open, | |
551 | .dev_close = dev_close, | |
552 | .dev_acquisition_start = dev_acquisition_start_1x_2x_rs232, | |
553 | .dev_acquisition_stop = dev_acquisition_stop, | |
554 | .priv = NULL, | |
555 | }; | |
556 | ||
557 | SR_PRIV struct sr_dev_driver gmc_mh_2x_bd232_driver_info = { | |
558 | .name = "gmc-mh-2x-bd232", | |
559 | .longname = "Gossen Metrawatt Metrahit 2x, BD232/SI232-II interface", | |
560 | .api_version = 1, | |
561 | .init = init, | |
562 | .cleanup = cleanup, | |
563 | .scan = scan_2x_bd232, | |
564 | .dev_list = dev_list, | |
565 | .dev_clear = NULL, | |
566 | .config_get = config_get, | |
567 | .config_set = config_set, | |
568 | .config_list = config_list_bd, | |
569 | .dev_open = std_serial_dev_open, | |
570 | .dev_close = dev_close, | |
571 | .dev_acquisition_start = dev_acquisition_start_2x_bd232, | |
572 | .dev_acquisition_stop = dev_acquisition_stop, | |
573 | .priv = NULL, | |
574 | }; |