]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * This file is part of the libsigrok project. | |
3 | * | |
4 | * Copyright (C) 2011-2015 Uwe Hermann <uwe@hermann-uwe.de> | |
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 2 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 | #include <config.h> | |
21 | #include "protocol.h" | |
22 | ||
23 | static const uint32_t drvopts[] = { | |
24 | SR_CONF_LOGIC_ANALYZER, | |
25 | }; | |
26 | ||
27 | static const uint32_t scanopts[] = { | |
28 | SR_CONF_CONN, | |
29 | }; | |
30 | ||
31 | static const uint32_t devopts[] = { | |
32 | SR_CONF_LIMIT_MSEC | SR_CONF_SET, | |
33 | SR_CONF_LIMIT_SAMPLES | SR_CONF_SET | SR_CONF_LIST, | |
34 | SR_CONF_CONN | SR_CONF_GET, | |
35 | SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, | |
36 | SR_CONF_TRIGGER_MATCH | SR_CONF_LIST, | |
37 | }; | |
38 | ||
39 | static const int32_t trigger_matches[] = { | |
40 | SR_TRIGGER_ZERO, | |
41 | SR_TRIGGER_ONE, | |
42 | SR_TRIGGER_RISING, | |
43 | SR_TRIGGER_FALLING, | |
44 | }; | |
45 | ||
46 | static void clear_helper(void *priv) | |
47 | { | |
48 | struct dev_context *devc; | |
49 | ||
50 | devc = priv; | |
51 | ||
52 | ftdi_free(devc->ftdic); | |
53 | g_free(devc->final_buf); | |
54 | } | |
55 | ||
56 | static int dev_clear(const struct sr_dev_driver *di) | |
57 | { | |
58 | return std_dev_clear(di, clear_helper); | |
59 | } | |
60 | ||
61 | static int add_device(int model, struct libusb_device_descriptor *des, | |
62 | const char *serial_num, const char *connection_id, libusb_device *usbdev, | |
63 | GSList **devices) | |
64 | { | |
65 | int ret; | |
66 | unsigned int i; | |
67 | struct sr_dev_inst *sdi; | |
68 | struct dev_context *devc; | |
69 | ||
70 | ret = SR_OK; | |
71 | ||
72 | /* Allocate memory for our private device context. */ | |
73 | devc = g_malloc0(sizeof(struct dev_context)); | |
74 | ||
75 | /* Set some sane defaults. */ | |
76 | devc->prof = &cv_profiles[model]; | |
77 | devc->ftdic = NULL; /* Will be set in the open() API call. */ | |
78 | devc->cur_samplerate = 0; /* Set later (different for LA8/LA16). */ | |
79 | devc->limit_msec = 0; | |
80 | devc->limit_samples = 0; | |
81 | memset(devc->mangled_buf, 0, BS); | |
82 | devc->final_buf = NULL; | |
83 | devc->trigger_pattern = 0x0000; /* Irrelevant, see trigger_mask. */ | |
84 | devc->trigger_mask = 0x0000; /* All channels: "don't care". */ | |
85 | devc->trigger_edgemask = 0x0000; /* All channels: "state triggered". */ | |
86 | devc->trigger_found = 0; | |
87 | devc->done = 0; | |
88 | devc->block_counter = 0; | |
89 | devc->divcount = 0; | |
90 | devc->usb_vid = des->idVendor; | |
91 | devc->usb_pid = des->idProduct; | |
92 | memset(devc->samplerates, 0, sizeof(uint64_t) * 255); | |
93 | ||
94 | /* Allocate memory where we'll store the de-mangled data. */ | |
95 | if (!(devc->final_buf = g_try_malloc(SDRAM_SIZE))) { | |
96 | sr_err("Failed to allocate memory for sample buffer."); | |
97 | ret = SR_ERR_MALLOC; | |
98 | goto err_free_devc; | |
99 | } | |
100 | ||
101 | /* We now know the device, set its max. samplerate as default. */ | |
102 | devc->cur_samplerate = devc->prof->max_samplerate; | |
103 | ||
104 | /* Register the device with libsigrok. */ | |
105 | sdi = g_malloc0(sizeof(struct sr_dev_inst)); | |
106 | sdi->status = SR_ST_INACTIVE; | |
107 | sdi->vendor = g_strdup("ChronoVu"); | |
108 | sdi->model = g_strdup(devc->prof->modelname); | |
109 | sdi->serial_num = g_strdup(serial_num); | |
110 | sdi->connection_id = g_strdup(connection_id); | |
111 | sdi->conn = sr_usb_dev_inst_new(libusb_get_bus_number(usbdev), | |
112 | libusb_get_device_address(usbdev), NULL); | |
113 | sdi->priv = devc; | |
114 | ||
115 | for (i = 0; i < devc->prof->num_channels; i++) | |
116 | sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE, | |
117 | cv_channel_names[i]); | |
118 | ||
119 | *devices = g_slist_append(*devices, sdi); | |
120 | ||
121 | if (ret == SR_OK) | |
122 | return SR_OK; | |
123 | ||
124 | err_free_devc: | |
125 | g_free(devc); | |
126 | ||
127 | return ret; | |
128 | } | |
129 | ||
130 | static GSList *scan(struct sr_dev_driver *di, GSList *options) | |
131 | { | |
132 | int i, ret, model; | |
133 | struct drv_context *drvc; | |
134 | GSList *devices, *conn_devices, *l; | |
135 | struct sr_usb_dev_inst *usb; | |
136 | struct sr_config *src; | |
137 | struct libusb_device_descriptor des; | |
138 | libusb_device **devlist; | |
139 | struct libusb_device_handle *hdl; | |
140 | const char *conn; | |
141 | char product[64], serial_num[64], connection_id[64]; | |
142 | ||
143 | drvc = di->context; | |
144 | ||
145 | conn = NULL; | |
146 | for (l = options; l; l = l->next) { | |
147 | src = l->data; | |
148 | switch (src->key) { | |
149 | case SR_CONF_CONN: | |
150 | conn = g_variant_get_string(src->data, NULL); | |
151 | break; | |
152 | } | |
153 | } | |
154 | if (conn) | |
155 | conn_devices = sr_usb_find(drvc->sr_ctx->libusb_ctx, conn); | |
156 | else | |
157 | conn_devices = NULL; | |
158 | ||
159 | devices = NULL; | |
160 | libusb_get_device_list(drvc->sr_ctx->libusb_ctx, &devlist); | |
161 | ||
162 | for (i = 0; devlist[i]; i++) { | |
163 | if (conn) { | |
164 | for (l = conn_devices; l; l = l->next) { | |
165 | usb = l->data; | |
166 | if (usb->bus == libusb_get_bus_number(devlist[i]) | |
167 | && usb->address == libusb_get_device_address(devlist[i])) | |
168 | break; | |
169 | } | |
170 | if (!l) | |
171 | /* This device matched none of the ones that | |
172 | * matched the conn specification. */ | |
173 | continue; | |
174 | } | |
175 | ||
176 | libusb_get_device_descriptor(devlist[i], &des); | |
177 | ||
178 | if ((ret = libusb_open(devlist[i], &hdl)) < 0) | |
179 | continue; | |
180 | ||
181 | if (des.iProduct == 0) { | |
182 | product[0] = '\0'; | |
183 | } else if ((ret = libusb_get_string_descriptor_ascii(hdl, | |
184 | des.iProduct, (unsigned char *)product, | |
185 | sizeof(product))) < 0) { | |
186 | sr_warn("Failed to get product string descriptor: %s.", | |
187 | libusb_error_name(ret)); | |
188 | continue; | |
189 | } | |
190 | ||
191 | if (des.iSerialNumber == 0) { | |
192 | serial_num[0] = '\0'; | |
193 | } else if ((ret = libusb_get_string_descriptor_ascii(hdl, | |
194 | des.iSerialNumber, (unsigned char *)serial_num, | |
195 | sizeof(serial_num))) < 0) { | |
196 | sr_warn("Failed to get serial number string descriptor: %s.", | |
197 | libusb_error_name(ret)); | |
198 | continue; | |
199 | } | |
200 | ||
201 | usb_get_port_path(devlist[i], connection_id, sizeof(connection_id)); | |
202 | ||
203 | libusb_close(hdl); | |
204 | ||
205 | if (!strcmp(product, "ChronoVu LA8")) { | |
206 | model = 0; | |
207 | } else if (!strcmp(product, "ChronoVu LA16")) { | |
208 | model = 1; | |
209 | } else { | |
210 | sr_spew("Unknown iProduct string '%s'.", product); | |
211 | continue; | |
212 | } | |
213 | ||
214 | sr_dbg("Found %s (%04x:%04x, %d.%d, %s).", | |
215 | product, des.idVendor, des.idProduct, | |
216 | libusb_get_bus_number(devlist[i]), | |
217 | libusb_get_device_address(devlist[i]), connection_id); | |
218 | ||
219 | if ((ret = add_device(model, &des, serial_num, connection_id, | |
220 | devlist[i], &devices)) < 0) { | |
221 | sr_dbg("Failed to add device: %d.", ret); | |
222 | } | |
223 | } | |
224 | ||
225 | libusb_free_device_list(devlist, 1); | |
226 | g_slist_free_full(conn_devices, (GDestroyNotify)sr_usb_dev_inst_free); | |
227 | ||
228 | return std_scan_complete(di, devices); | |
229 | } | |
230 | ||
231 | static int dev_open(struct sr_dev_inst *sdi) | |
232 | { | |
233 | struct dev_context *devc; | |
234 | int ret; | |
235 | ||
236 | devc = sdi->priv; | |
237 | ||
238 | /* Allocate memory for the FTDI context and initialize it. */ | |
239 | if (!(devc->ftdic = ftdi_new())) { | |
240 | sr_err("Failed to initialize libftdi."); | |
241 | return SR_ERR; | |
242 | } | |
243 | ||
244 | sr_dbg("Opening %s device (%04x:%04x).", devc->prof->modelname, | |
245 | devc->usb_vid, devc->usb_pid); | |
246 | ||
247 | /* Open the device. */ | |
248 | if ((ret = ftdi_usb_open_desc(devc->ftdic, devc->usb_vid, | |
249 | devc->usb_pid, devc->prof->iproduct, NULL)) < 0) { | |
250 | sr_err("Failed to open FTDI device (%d): %s.", | |
251 | ret, ftdi_get_error_string(devc->ftdic)); | |
252 | goto err_ftdi_free; | |
253 | } | |
254 | sr_dbg("Device opened successfully."); | |
255 | ||
256 | /* Purge RX/TX buffers in the FTDI chip. */ | |
257 | if ((ret = ftdi_usb_purge_buffers(devc->ftdic)) < 0) { | |
258 | sr_err("Failed to purge FTDI buffers (%d): %s.", | |
259 | ret, ftdi_get_error_string(devc->ftdic)); | |
260 | goto err_ftdi_free; | |
261 | } | |
262 | sr_dbg("FTDI buffers purged successfully."); | |
263 | ||
264 | /* Enable flow control in the FTDI chip. */ | |
265 | if ((ret = ftdi_setflowctrl(devc->ftdic, SIO_RTS_CTS_HS)) < 0) { | |
266 | sr_err("Failed to enable FTDI flow control (%d): %s.", | |
267 | ret, ftdi_get_error_string(devc->ftdic)); | |
268 | goto err_ftdi_free; | |
269 | } | |
270 | sr_dbg("FTDI flow control enabled successfully."); | |
271 | ||
272 | /* Wait 100ms. */ | |
273 | g_usleep(100 * 1000); | |
274 | ||
275 | return SR_OK; | |
276 | ||
277 | err_ftdi_free: | |
278 | ftdi_free(devc->ftdic); /* Close device (if open), free FTDI context. */ | |
279 | devc->ftdic = NULL; | |
280 | return SR_ERR; | |
281 | } | |
282 | ||
283 | static int dev_close(struct sr_dev_inst *sdi) | |
284 | { | |
285 | int ret; | |
286 | struct dev_context *devc; | |
287 | ||
288 | devc = sdi->priv; | |
289 | ||
290 | if (!devc->ftdic) | |
291 | return SR_ERR_BUG; | |
292 | ||
293 | if ((ret = ftdi_usb_close(devc->ftdic)) < 0) | |
294 | sr_err("Failed to close FTDI device (%d): %s.", | |
295 | ret, ftdi_get_error_string(devc->ftdic)); | |
296 | ||
297 | return (ret == 0) ? SR_OK : SR_ERR; | |
298 | } | |
299 | ||
300 | static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, | |
301 | const struct sr_channel_group *cg) | |
302 | { | |
303 | struct dev_context *devc; | |
304 | struct sr_usb_dev_inst *usb; | |
305 | char str[128]; | |
306 | ||
307 | (void)cg; | |
308 | ||
309 | switch (key) { | |
310 | case SR_CONF_CONN: | |
311 | if (!sdi || !(usb = sdi->conn)) | |
312 | return SR_ERR_ARG; | |
313 | snprintf(str, 128, "%d.%d", usb->bus, usb->address); | |
314 | *data = g_variant_new_string(str); | |
315 | break; | |
316 | case SR_CONF_SAMPLERATE: | |
317 | if (!sdi) | |
318 | return SR_ERR_BUG; | |
319 | devc = sdi->priv; | |
320 | *data = g_variant_new_uint64(devc->cur_samplerate); | |
321 | break; | |
322 | default: | |
323 | return SR_ERR_NA; | |
324 | } | |
325 | ||
326 | return SR_OK; | |
327 | } | |
328 | ||
329 | static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi, | |
330 | const struct sr_channel_group *cg) | |
331 | { | |
332 | struct dev_context *devc; | |
333 | ||
334 | (void)cg; | |
335 | ||
336 | devc = sdi->priv; | |
337 | ||
338 | switch (key) { | |
339 | case SR_CONF_SAMPLERATE: | |
340 | if (cv_set_samplerate(sdi, g_variant_get_uint64(data)) < 0) | |
341 | return SR_ERR; | |
342 | break; | |
343 | case SR_CONF_LIMIT_MSEC: | |
344 | if (g_variant_get_uint64(data) == 0) | |
345 | return SR_ERR_ARG; | |
346 | devc->limit_msec = g_variant_get_uint64(data); | |
347 | break; | |
348 | case SR_CONF_LIMIT_SAMPLES: | |
349 | if (g_variant_get_uint64(data) == 0) | |
350 | return SR_ERR_ARG; | |
351 | devc->limit_samples = g_variant_get_uint64(data); | |
352 | break; | |
353 | default: | |
354 | return SR_ERR_NA; | |
355 | } | |
356 | ||
357 | return SR_OK; | |
358 | } | |
359 | ||
360 | static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, | |
361 | const struct sr_channel_group *cg) | |
362 | { | |
363 | GVariant *gvar, *grange[2]; | |
364 | GVariantBuilder gvb; | |
365 | struct dev_context *devc; | |
366 | ||
367 | (void)cg; | |
368 | ||
369 | switch (key) { | |
370 | case SR_CONF_SCAN_OPTIONS: | |
371 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, | |
372 | scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t)); | |
373 | break; | |
374 | case SR_CONF_DEVICE_OPTIONS: | |
375 | if (!sdi) | |
376 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, | |
377 | drvopts, ARRAY_SIZE(drvopts), sizeof(uint32_t)); | |
378 | else | |
379 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, | |
380 | devopts, ARRAY_SIZE(devopts), sizeof(uint32_t)); | |
381 | break; | |
382 | case SR_CONF_SAMPLERATE: | |
383 | if (!sdi) | |
384 | return SR_ERR_BUG; | |
385 | devc = sdi->priv; | |
386 | cv_fill_samplerates_if_needed(sdi); | |
387 | g_variant_builder_init(&gvb, G_VARIANT_TYPE("a{sv}")); | |
388 | gvar = g_variant_new_fixed_array(G_VARIANT_TYPE("t"), | |
389 | devc->samplerates, | |
390 | ARRAY_SIZE(devc->samplerates), | |
391 | sizeof(uint64_t)); | |
392 | g_variant_builder_add(&gvb, "{sv}", "samplerates", gvar); | |
393 | *data = g_variant_builder_end(&gvb); | |
394 | break; | |
395 | case SR_CONF_LIMIT_SAMPLES: | |
396 | if (!sdi || !sdi->priv || !(devc = sdi->priv) || !devc->prof) | |
397 | return SR_ERR_BUG; | |
398 | grange[0] = g_variant_new_uint64(0); | |
399 | if (devc->prof->model == CHRONOVU_LA8) | |
400 | grange[1] = g_variant_new_uint64(MAX_NUM_SAMPLES); | |
401 | else | |
402 | grange[1] = g_variant_new_uint64(MAX_NUM_SAMPLES / 2); | |
403 | *data = g_variant_new_tuple(grange, 2); | |
404 | break; | |
405 | case SR_CONF_TRIGGER_MATCH: | |
406 | if (!sdi || !sdi->priv || !(devc = sdi->priv) || !devc->prof) | |
407 | return SR_ERR_BUG; | |
408 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32, | |
409 | trigger_matches, devc->prof->num_trigger_matches, | |
410 | sizeof(int32_t)); | |
411 | break; | |
412 | default: | |
413 | return SR_ERR_NA; | |
414 | } | |
415 | ||
416 | return SR_OK; | |
417 | } | |
418 | ||
419 | static int receive_data(int fd, int revents, void *cb_data) | |
420 | { | |
421 | int i, ret; | |
422 | struct sr_dev_inst *sdi; | |
423 | struct dev_context *devc; | |
424 | ||
425 | (void)fd; | |
426 | (void)revents; | |
427 | ||
428 | if (!(sdi = cb_data)) { | |
429 | sr_err("cb_data was NULL."); | |
430 | return FALSE; | |
431 | } | |
432 | ||
433 | if (!(devc = sdi->priv)) { | |
434 | sr_err("sdi->priv was NULL."); | |
435 | return FALSE; | |
436 | } | |
437 | ||
438 | if (!devc->ftdic) { | |
439 | sr_err("devc->ftdic was NULL."); | |
440 | return FALSE; | |
441 | } | |
442 | ||
443 | /* Get one block of data. */ | |
444 | if ((ret = cv_read_block(devc)) < 0) { | |
445 | sr_err("Failed to read data block: %d.", ret); | |
446 | sr_dev_acquisition_stop(sdi); | |
447 | return FALSE; | |
448 | } | |
449 | ||
450 | /* We need to get exactly NUM_BLOCKS blocks (i.e. 8MB) of data. */ | |
451 | if (devc->block_counter != (NUM_BLOCKS - 1)) { | |
452 | devc->block_counter++; | |
453 | return TRUE; | |
454 | } | |
455 | ||
456 | sr_dbg("Sampling finished, sending data to session bus now."); | |
457 | ||
458 | /* | |
459 | * All data was received and demangled, send it to the session bus. | |
460 | * | |
461 | * Note: Due to the method how data is spread across the 8MByte of | |
462 | * SDRAM, we can _not_ send it to the session bus in a streaming | |
463 | * manner while we receive it. We have to receive and de-mangle the | |
464 | * full 8MByte first, only then the whole buffer contains valid data. | |
465 | */ | |
466 | for (i = 0; i < NUM_BLOCKS; i++) | |
467 | cv_send_block_to_session_bus(sdi, i); | |
468 | ||
469 | sr_dev_acquisition_stop(sdi); | |
470 | ||
471 | return TRUE; | |
472 | } | |
473 | ||
474 | static int dev_acquisition_start(const struct sr_dev_inst *sdi) | |
475 | { | |
476 | struct dev_context *devc; | |
477 | uint8_t buf[8]; | |
478 | int bytes_to_write, bytes_written; | |
479 | ||
480 | devc = sdi->priv; | |
481 | ||
482 | if (!devc->ftdic) { | |
483 | sr_err("devc->ftdic was NULL."); | |
484 | return SR_ERR_BUG; | |
485 | } | |
486 | ||
487 | devc->divcount = cv_samplerate_to_divcount(sdi, devc->cur_samplerate); | |
488 | if (devc->divcount == 0xff) { | |
489 | sr_err("Invalid divcount/samplerate."); | |
490 | return SR_ERR; | |
491 | } | |
492 | ||
493 | if (cv_convert_trigger(sdi) != SR_OK) { | |
494 | sr_err("Failed to configure trigger."); | |
495 | return SR_ERR; | |
496 | } | |
497 | ||
498 | /* Fill acquisition parameters into buf[]. */ | |
499 | if (devc->prof->model == CHRONOVU_LA8) { | |
500 | buf[0] = devc->divcount; | |
501 | buf[1] = 0xff; /* This byte must always be 0xff. */ | |
502 | buf[2] = devc->trigger_pattern & 0xff; | |
503 | buf[3] = devc->trigger_mask & 0xff; | |
504 | bytes_to_write = 4; | |
505 | } else { | |
506 | buf[0] = devc->divcount; | |
507 | buf[1] = 0xff; /* This byte must always be 0xff. */ | |
508 | buf[2] = (devc->trigger_pattern & 0xff00) >> 8; /* LSB */ | |
509 | buf[3] = (devc->trigger_pattern & 0x00ff) >> 0; /* MSB */ | |
510 | buf[4] = (devc->trigger_mask & 0xff00) >> 8; /* LSB */ | |
511 | buf[5] = (devc->trigger_mask & 0x00ff) >> 0; /* MSB */ | |
512 | buf[6] = (devc->trigger_edgemask & 0xff00) >> 8; /* LSB */ | |
513 | buf[7] = (devc->trigger_edgemask & 0x00ff) >> 0; /* MSB */ | |
514 | bytes_to_write = 8; | |
515 | } | |
516 | ||
517 | /* Start acquisition. */ | |
518 | bytes_written = cv_write(devc, buf, bytes_to_write); | |
519 | ||
520 | if (bytes_written < 0 || bytes_written != bytes_to_write) { | |
521 | sr_err("Acquisition failed to start."); | |
522 | return SR_ERR; | |
523 | } | |
524 | ||
525 | sr_dbg("Hardware acquisition started successfully."); | |
526 | ||
527 | std_session_send_df_header(sdi); | |
528 | ||
529 | /* Time when we should be done (for detecting trigger timeouts). */ | |
530 | devc->done = (devc->divcount + 1) * devc->prof->trigger_constant + | |
531 | g_get_monotonic_time() + (10 * G_TIME_SPAN_SECOND); | |
532 | devc->block_counter = 0; | |
533 | devc->trigger_found = 0; | |
534 | ||
535 | /* Hook up a dummy handler to receive data from the device. */ | |
536 | sr_session_source_add(sdi->session, -1, 0, 0, receive_data, (void *)sdi); | |
537 | ||
538 | return SR_OK; | |
539 | } | |
540 | ||
541 | static int dev_acquisition_stop(struct sr_dev_inst *sdi) | |
542 | { | |
543 | sr_session_source_remove(sdi->session, -1); | |
544 | std_session_send_df_end(sdi); | |
545 | ||
546 | return SR_OK; | |
547 | } | |
548 | ||
549 | static struct sr_dev_driver chronovu_la_driver_info = { | |
550 | .name = "chronovu-la", | |
551 | .longname = "ChronoVu LA8/LA16", | |
552 | .api_version = 1, | |
553 | .init = std_init, | |
554 | .cleanup = std_cleanup, | |
555 | .scan = scan, | |
556 | .dev_list = std_dev_list, | |
557 | .dev_clear = dev_clear, | |
558 | .config_get = config_get, | |
559 | .config_set = config_set, | |
560 | .config_list = config_list, | |
561 | .dev_open = dev_open, | |
562 | .dev_close = dev_close, | |
563 | .dev_acquisition_start = dev_acquisition_start, | |
564 | .dev_acquisition_stop = dev_acquisition_stop, | |
565 | .context = NULL, | |
566 | }; | |
567 | SR_REGISTER_DEV_DRIVER(chronovu_la_driver_info); |