2 * This file is part of the libsigrok project.
4 * Copyright (C) 2022 Shawn Walker <ac0bi00@gmail.com>
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.
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.
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/>.
19 //debug print levels are err/warn/info/dbg/spew
28 #include <libsigrok/libsigrok.h>
29 #include "libsigrok-internal.h"
33 #define SERIALCOMM "115200/8n1"
35 static const uint32_t scanopts[] = {
36 SR_CONF_CONN, //Required OS name for the port, i.e. /dev/ttyACM0
37 SR_CONF_SERIALCOMM, //Optional config of the port, i.e. 115200/8n1
40 //PulseView reads a sample rate config list as a min, max and step.
41 //If step is 1 then it creates a 1,2,5,10 set of selects, as well as the max.
42 //If step is not 1, then it gives a place to enter any value, which gives the greatest flexibility
43 static const uint64_t samplerates[] = {
49 static const uint32_t drvopts[] = {
51 SR_CONF_LOGIC_ANALYZER,
54 //SW trigger requires this
55 static const int32_t trigger_matches[] = {
64 static const uint32_t devopts[] = {
65 //CLI prefers LIMIT_SAMPLES to be a list of high,low
66 SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
67 SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
68 SR_CONF_CAPTURE_RATIO | SR_CONF_GET | SR_CONF_SET,
69 //pulseview needs a list return to allow sample rate setting
70 SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
73 static struct sr_dev_driver raspberrypi_pico_driver_info;
76 static GSList *scan(struct sr_dev_driver *di, GSList * options)
78 struct sr_config *src;
79 struct sr_dev_inst *sdi;
80 struct sr_serial_dev_inst *serial;
81 struct dev_context *devc;
82 struct sr_channel *ch;
86 const char *conn, *serialcomm;
89 uint8_t num_a, num_d, a_size;
92 conn = serialcomm = NULL;
93 for (l = options; l; l = l->next) {
97 conn = g_variant_get_string(src->data, NULL);
99 case SR_CONF_SERIALCOMM:
100 serialcomm = g_variant_get_string(src->data, NULL);
108 serialcomm = SERIALCOMM;
110 serial = sr_serial_dev_inst_new(conn, serialcomm);
111 sr_info("Opening %s.", conn);
112 if (serial_open(serial, SERIAL_RDWR) != SR_OK) {
113 sr_err("1st serial open fail");
117 sr_info("Reseting device with *s at %s.", conn);
118 send_serial_char(serial, '*');
120 //drain any inflight data
122 sr_warn("Drain reads");
123 len = serial_read_blocking(serial, buf, 32, 100);
124 sr_warn("Drain reads done");
126 sr_dbg("Dropping in flight serial data");
131 num_read = send_serial_w_resp(serial, "i\n", buf, 17);
133 sr_err("1st identify failed");
134 serial_close(serial);
136 if (serial_open(serial, SERIAL_RDWR) != SR_OK) {
137 sr_err("2st serial open fail");
141 sr_err("Send second *");
142 send_serial_char(serial, '*');
144 num_read = send_serial_w_resp(serial, "i\n", buf, 17);
146 sr_err("Second attempt failed");
150 //Expected ID response is SRPICO,AxxyDzz,VV
151 //where xx are number of analog channels, y is bytes per analog sample
152 //and zz is number of digital channels, and VV is two digit version# which must be 00
154 || (strncmp(buf, "SRPICO,A", 8))
157 || (buf[16] != '0')) {
158 sr_err("ERROR:Bad response string %s %d", buf, num_read);
161 a_size = buf[10] - '0';
162 buf[10] = '\0'; //Null to end the str for atois
163 buf[14] = '\0'; //Null to end the str for atois
164 num_a = atoi(&buf[8]);
165 num_d = atoi(&buf[12]);
167 sdi = g_malloc0(sizeof(struct sr_dev_inst));
168 sdi->status = SR_ST_INACTIVE;
169 sdi->vendor = g_strdup("Raspberry Pi");
170 sdi->model = g_strdup("PICO");
171 sdi->version = g_strdup("00");
173 sdi->driver = &raspberrypi_pico_driver_info;
174 sdi->inst_type = SR_INST_SERIAL;
175 sdi->serial_num = g_strdup("N/A");
176 if (((num_a == 0) && (num_d == 0))
177 || (num_a > MAX_ANALOG_CHANNELS)
178 || (num_d > MAX_DIGITAL_CHANNELS)
181 sr_err("ERROR: invalid channel config a %d d %d asz %d",
182 num_a, num_d, a_size);
185 devc = g_malloc0(sizeof(struct dev_context));
186 devc->a_size = a_size;
187 //multiple bytes per analog sample not supported
188 if ((num_a > 0) && (devc->a_size != 1)) {
189 sr_err("Only Analog Size of 1 supported\n\r");
192 devc->num_a_channels = num_a;
193 devc->num_d_channels = num_d;
194 devc->a_chan_mask = ((1 << num_a) - 1);
195 devc->d_chan_mask = ((1 << num_d) - 1);
196 //The number of bytes that each digital sample in the buffers sent to the session.
197 //All logical channels are packed together, where a slice of N channels takes roundup(N/8) bytes
198 //This never changes even if channels are disabled because PV expects disabled channels to still
199 //be accounted for in the packing
200 devc->dig_sample_bytes = ((devc->num_d_channels + 7) / 8);
201 //These are the slice sizes of the data on the wire
202 //1 7 bit field per byte
203 devc->bytes_per_slice = (devc->num_a_channels * devc->a_size);
204 if (devc->num_d_channels > 0) {
205 // logic sent in groups of 7
206 devc->bytes_per_slice += (devc->num_d_channels + 6) / 7;
208 sr_dbg("num channels a %d d %d bps %d dsb %d", num_a, num_d,
209 devc->bytes_per_slice, devc->dig_sample_bytes);
210 //Each analog channel is it's own group
211 //Digital are just channels
212 //Grouping of channels is rather arbitrary as parameters like sample rate and number of samples
213 //apply to all changes. Analog channels do have a scale and offset, but that is applied
214 //without involvement of the session.
215 devc->analog_groups = g_malloc0(sizeof(struct sr_channel_group *) *
216 devc->num_a_channels);
217 for (i = 0; i < devc->num_a_channels; i++) {
218 channel_name = g_strdup_printf("A%d", i);
219 //sdi, index, type, enabled,name
220 ch = sr_channel_new(sdi, i, SR_CHANNEL_ANALOG, TRUE,
222 devc->analog_groups[i] =
223 g_malloc0(sizeof(struct sr_channel_group));
224 devc->analog_groups[i]->name = channel_name;
225 devc->analog_groups[i]->channels =
226 g_slist_append(NULL, ch);
227 sdi->channel_groups =
228 g_slist_append(sdi->channel_groups,
229 devc->analog_groups[i]);
232 if (devc->num_d_channels > 0) {
233 for (i = 0; i < devc->num_d_channels; i++) {
234 //Name digital channels starting at D2 to match pico board pin names
235 channel_name = g_strdup_printf("D%d", i + 2);
236 sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE,
238 g_free(channel_name);
242 //In large sample usages we get the call to receive with large transfers.
243 //Since the CDC serial implemenation can silenty lose data as it gets close to full, allocate
244 //storage for a half buffer which in a worst case scenario has 2x ratio of transmitted bytes
246 //Note: The intent of making this buffer large is to prevent CDC serial buffer overflows.
247 //However, it is likely that if the host is running slow (i.e. it's a raspberry pi model 3) that it becomes
248 //compute bound and doesn't service CDC serial responses in time to not overflow the internal CDC buffers.
249 //And thus no serial buffer is large enough. But, it's only 256K....
250 devc->serial_buffer_size = 256000;
252 sr_dbg("Setting serial buffer size: %i.",
253 devc->serial_buffer_size);
254 devc->cbuf_wrptr = 0;
255 //While slices are sent as a group of one sample across all channels, sigrok wants analog
256 //channel data sent as separate packets.
257 //Logical trace values are packed together.
258 //A serial byte in normal mode never represent more than one sample so a 2x multiplier is plenty.
259 //In D4 mode a serial byte can represents 100s of samples due to RLE, but process_D4 ensures that
260 //it breaks up the rle_memset calls to prevent overflowing the sample buffer.
261 //that it doesn't overflow the sample buffers.
262 devc->sample_buf_size = devc->serial_buffer_size * 2;
263 for (i = 0; i < devc->num_a_channels; i++) {
264 devc->a_data_bufs[i] = NULL;
265 devc->a_pretrig_bufs[i] = NULL;
267 devc->d_data_buf = NULL;
268 devc->sample_rate = 5000;
269 devc->capture_ratio = 10;
270 devc->rxstate = RX_IDLE;
272 //Set an initial value as various code relies on an inital value.
273 devc->limit_samples = 1000;
275 if (raspberrypi_pico_get_dev_cfg(sdi) != SR_OK) {
279 sr_err("sr_err level logging enabled");
280 sr_warn("sr_warn level logging enabled");
281 sr_info("sr_info level logging enabled");
282 sr_dbg("sr_dbg level logging enabled");
283 sr_spew("sr_spew level logging enabled");
284 serial_close(serial);
285 return std_scan_complete(di, g_slist_append(NULL, sdi));
291 //Note that on the initial driver load we pull all values into local storage.
292 //Thus gets can return local data, but sets have to issue commands to device.
293 static int config_set(uint32_t key, GVariant * data,
294 const struct sr_dev_inst *sdi,
295 const struct sr_channel_group *cg)
297 struct dev_context *devc;
304 sr_dbg("Got config_set key %d \n", key);
306 case SR_CONF_SAMPLERATE:
307 devc->sample_rate = g_variant_get_uint64(data);
308 sr_dbg("config_set sr %llu\n", devc->sample_rate);
310 case SR_CONF_LIMIT_SAMPLES:
311 devc->limit_samples = g_variant_get_uint64(data);
312 sr_dbg("config_set slimit %lld\n", devc->limit_samples);
314 case SR_CONF_CAPTURE_RATIO:
315 devc->capture_ratio = g_variant_get_uint64(data);
319 sr_err("ERROR:config_set undefine %d\n", key);
326 static int config_get(uint32_t key, GVariant ** data,
327 const struct sr_dev_inst *sdi,
328 const struct sr_channel_group *cg)
330 struct dev_context *devc;
331 sr_dbg("at config_get key %d", key);
338 case SR_CONF_SAMPLERATE:
339 *data = g_variant_new_uint64(devc->sample_rate);
340 sr_spew("sample rate get of %lld", devc->sample_rate);
342 case SR_CONF_CAPTURE_RATIO:
346 *data = g_variant_new_uint64(devc->capture_ratio);
348 case SR_CONF_LIMIT_SAMPLES:
349 sr_spew("config_get limit_samples of %llu",
350 devc->limit_samples);
351 *data = g_variant_new_uint64(devc->limit_samples);
354 sr_spew("unsupported cfg_get key %d", key);
360 static int config_list(uint32_t key, GVariant ** data,
361 const struct sr_dev_inst *sdi,
362 const struct sr_channel_group *cg)
365 //scan or device options are the only ones that can be called without a defined instance
366 if ((key == SR_CONF_SCAN_OPTIONS)
367 || (key == SR_CONF_DEVICE_OPTIONS)) {
368 return STD_CONFIG_LIST(key, data, sdi, cg, scanopts,
373 ("ERROR:\n\r\n\r\n\r Call to config list with null sdi\n\r\n\r");
376 sr_dbg("start config_list with key %X\n", key);
378 //Pulseview in pulseview/pv/toolbars/mainbar.cpp requires list support for frequencies as a triple
379 //of min,max,step. If step is 1, then it proves a 1,2,5,10 select, but if not 1 it allows a spin box
380 case SR_CONF_SAMPLERATE:
381 sr_dbg("Return sample rate list");
383 std_gvar_samplerates_steps(ARRAY_AND_SIZE
386 //This must be set to get SW trigger support
387 case SR_CONF_TRIGGER_MATCH:
389 std_gvar_array_i32(ARRAY_AND_SIZE(trigger_matches));
391 case SR_CONF_LIMIT_SAMPLES:
392 //Really this limit is up to the memory capacity of the host,
393 //and users that pick huge values deserve what they get.
394 //But setting this limit to prevent really crazy things.
395 *data = std_gvar_tuple_u64(1LL, 1000000000LL);
396 sr_dbg("sr_config_list limit samples ");
399 sr_dbg("reached default statement of config_list");
407 static int dev_acquisition_start(const struct sr_dev_inst *sdi)
409 struct sr_serial_dev_inst *serial;
410 struct dev_context *devc;
411 struct sr_channel *ch;
412 struct sr_trigger *trigger;
415 int a_enabled = 0, d_enabled = 0, len;
419 sr_dbg("Enter acq start");
420 sr_dbg("dsbstart %d", devc->dig_sample_bytes);
421 devc->buffer = g_malloc(devc->serial_buffer_size);
422 if (!(devc->buffer)) {
423 sr_err("ERROR:serial buffer malloc fail");
424 return SR_ERR_MALLOC;
426 //Get device in idle state
427 if (serial_drain(serial) != SR_OK) {
428 sr_err("Initial Drain Failed\n\r");
431 send_serial_char(serial, '*');
432 if (serial_drain(serial) != SR_OK) {
433 sr_err("Second Drain Failed\n\r");
437 for (l = sdi->channels; l; l = l->next) {
439 sr_dbg("c %d enabled %d name %s\n", ch->index, ch->enabled,
442 if (ch->name[0] == 'A') {
443 devc->a_chan_mask &= ~(1 << ch->index);
446 (ch->enabled << ch->index);
449 // sr_dbg("A%d en %d mask 0x%X",ch->index,ch->enabled,devc->a_chan_mask);
452 if (ch->name[0] == 'D') {
453 devc->d_chan_mask &= ~(1 << ch->index);
456 (ch->enabled << ch->index);
458 // sr_dbg("D%d en %d mask 0x%X",ch->index,ch->enabled,devc->d_chan_mask);
461 sr_info("Channel enable masks D 0x%X A 0x%X",
462 devc->d_chan_mask, devc->a_chan_mask);
463 sprintf(tmpstr, "%c%d%d\n", ch->name[0], ch->enabled,
465 if (send_serial_w_ack(serial, tmpstr) != SR_OK) {
466 sr_err("ERROR:Channel enable fail");
472 //ensure data channels are continuous
474 for (i = 0; i < 32; i++) {
475 if ((devc->d_chan_mask >> i) & 1) {
478 ("Digital channel mask 0x%X not continous\n\r",
486 //recalculate bytes_per_slice.
487 devc->bytes_per_slice = (a_enabled * devc->a_size);
489 for (i = 0; i < devc->num_d_channels; i += 7) {
490 if (((devc->d_chan_mask) >> i) & (0x7F)) {
491 (devc->bytes_per_slice)++;
494 if ((a_enabled == 0) && (d_enabled == 0)) {
495 sr_err("ERROR:No channels enabled");
498 sr_dbg("bps %d\n", devc->bytes_per_slice);
500 //Apply sample rate limits
501 //Save off the lower rate values which are hacked way of getting configs to the device
503 cfg_bits = (devc->sample_rate % 10 & 0x6); //Only bits 2&1 are used as cfg_bits
504 devc->sample_rate -= cfg_bits;
505 sr_warn("Capture device cfg_bits of 0x%X from sample rate %lld",
506 cfg_bits, devc->sample_rate);
507 if ((a_enabled == 3) && (devc->sample_rate > 166660)) {
509 ("ERROR:3 channel ADC sample rate dropped to 166.660khz");
510 devc->sample_rate = 166660;
512 if ((a_enabled == 2) && (devc->sample_rate > 250000)) {
514 ("ERROR:2 channel ADC sample rate dropped to 250khz");
515 devc->sample_rate = 250000;
517 if ((a_enabled == 1) && (devc->sample_rate > 500000)) {
519 ("ERROR:1 channel ADC sample rate dropped to 500khz");
520 devc->sample_rate = 500000;
522 //Depending on channel configs, rates below 5ksps are possible
523 //but such a low rate can easily stream and this eliminates a lot
525 if (devc->sample_rate < 5000) {
526 sr_err("Sample rate override to min of 5ksps");
527 devc->sample_rate = 5000;
529 if (devc->sample_rate > 120000000) {
530 sr_err("Sample rate override to max of 120Msps");
531 devc->sample_rate = 12000000;
533 //It may take a very large number of samples to notice, but if digital and analog are enabled
534 //and either PIO or ADC are fractional the samples will skew over time.
535 //24Mhz is the max common divisor to the 120Mhz and 48Mhz ADC clock
536 //so force an integer divisor to it.
537 if ((a_enabled > 0) && (d_enabled > 0)) {
538 if (24000000ULL % (devc->sample_rate)) {
539 uint32_t commondivint =
540 24000000ULL / (devc->sample_rate);
541 //Always increment the divisor so that we go down in frequency to avoid max sample rate issues
543 devc->sample_rate = 24000000ULL / commondivint;
544 //While the common divisor is an integer, that does not mean the resulting sample rate is, and
545 //we want to keep the sample_rate divisible by 10 to support the cfg_bits
546 while ((devc->sample_rate % 10)
547 && (commondivint < 4800)) {
550 24000000ULL / commondivint;
551 //sr_err(" sample rate of %llu div %u\n\r",devc->sample_rate,commondivint);
553 //Make sure the divisor increement didn't make use go too low.
554 if (devc->sample_rate < 5000) {
555 devc->sample_rate = 50000;
558 ("WARN: Forcing common integer divisor sample rate of %llu div %u\n\r",
559 devc->sample_rate, commondivint);
563 //If we are only digital only or only analog print a warning that the
564 //fractional divisors aren't a true PLL fractional feedback loop and thus
565 //could have sample to sample variation.
567 if (48000000ULL % (devc->sample_rate * a_enabled)) {
569 ("WARN: Non integer ADC divisor of 48Mhz clock for sample rate %llu may cause sample to sample variability.",
574 if (120000000ULL % (devc->sample_rate)) {
576 ("WARN: Non integer PIO divisor of 120Mhz for sample rate %llu may cause sample to sample variability.",
581 //modulo 10 to add cfg_bits back in
582 //All code above should create overrides that are multiples of 10, but add a check just in case.
583 if (devc->sample_rate % 10) {
584 sr_err("Output sample rate %llu not mod 10",
586 devc->sample_rate = (devc->sample_rate / 10) * 10;
589 devc->sample_rate += cfg_bits;
592 ("Embedding cfg_bits of 0x%X in sample_rate %lld\n\r",
593 cfg_bits, devc->sample_rate);
595 sprintf(&tmpstr[0], "R%llu\n", devc->sample_rate);
596 if (send_serial_w_ack(serial, tmpstr) != SR_OK) {
597 sr_err("Sample rate to device failed");
600 sprintf(tmpstr, "L%lld\n", devc->limit_samples);
601 if (send_serial_w_ack(serial, tmpstr) != SR_OK) {
602 sr_err("Sample limit to device failed");
607 devc->sent_samples = 0;
609 devc->bytes_avail = 0;
611 devc->cbuf_wrptr = 0;
613 serial_read_blocking(serial, devc->buffer,
614 devc->serial_buffer_size,
615 serial_timeout(serial, 4));
617 sr_info("Pre-ARM drain had %d characters:", len);
618 devc->buffer[len] = 0;
619 sr_info("%s", devc->buffer);
622 for (i = 0; i < devc->num_a_channels; i++) {
623 devc->a_data_bufs[i] =
624 g_malloc(devc->sample_buf_size * sizeof(float));
625 if (!(devc->a_data_bufs[i])) {
626 sr_err("ERROR:analog buffer malloc fail");
627 return SR_ERR_MALLOC;
630 if (devc->num_d_channels > 0) {
632 g_malloc(devc->sample_buf_size *
633 devc->dig_sample_bytes);
634 if (!(devc->d_data_buf)) {
635 sr_err("ERROR:logic buffer malloc fail");
636 return SR_ERR_MALLOC;
640 if ((trigger = sr_session_trigger_get(sdi->session))) {
641 devc->pretrig_entries =
642 (devc->capture_ratio * devc->limit_samples) / 100;
644 soft_trigger_logic_new(sdi, trigger,
645 devc->pretrig_entries);
647 return SR_ERR_MALLOC;
648 devc->trigger_fired = FALSE;
649 if (devc->pretrig_entries > 0) {
650 sr_dbg("Allocating pretrig buffers size %d",
651 devc->pretrig_entries);
652 for (i = 0; i < devc->num_a_channels; i++) {
653 if ((devc->a_chan_mask >> i) & 1) {
654 devc->a_pretrig_bufs[i] =
655 g_malloc0(sizeof(float) *
658 if (!devc->a_pretrig_bufs[i]) {
660 ("ERROR:Analog pretrigger buffer malloc failure, disabling");
661 devc->trigger_fired = TRUE;
664 } //for num_a_channels
666 sr_info("Entering sw triggered mode");
667 //post the receive before starting the device to ensure we are ready to receive data ASAP
668 serial_source_add(sdi->session, serial, G_IO_IN, 200,
669 raspberrypi_pico_receive, (void *) sdi);
670 sprintf(tmpstr, "C\n");
671 if (send_serial_str(serial, tmpstr) != SR_OK)
675 devc->trigger_fired = TRUE;
676 devc->pretrig_entries = 0;
677 sr_info("Entering fixed sample mode");
678 serial_source_add(sdi->session, serial, G_IO_IN, 200,
679 raspberrypi_pico_receive, (void *) sdi);
680 sprintf(tmpstr, "F\n");
681 if (send_serial_str(serial, tmpstr) != SR_OK)
684 std_session_send_df_header(sdi);
686 sr_dbg("dsbstartend %d", devc->dig_sample_bytes);
688 if (devc->trigger_fired)
689 std_session_send_df_trigger(sdi);
690 //Keep this at the end as we don't want to be RX_ACTIVE unless everything is ok
691 devc->rxstate = RX_ACTIVE;
696 //This function is called either by the protocol code if we reached all of the samples
697 //or an error condition, and also by the user clicking stop in pulseview.
698 //It must always be called for any acquistion that was started to free memory.
699 static int dev_acquisition_stop(struct sr_dev_inst *sdi)
701 struct dev_context *devc;
702 struct sr_serial_dev_inst *serial;
703 sr_dbg("****at dev_acquisition_stop");
708 std_session_send_df_end(sdi);
709 //If we reached this while still active it is likely because the stop button was pushed
711 //That is generally some kind of error condition, so we don't try to check the bytenct
712 if (devc->rxstate == RX_ACTIVE) {
713 sr_err("Reached dev_acquisition_stop in RX_ACTIVE");
715 if (devc->rxstate != RX_IDLE) {
716 sr_err("Sending plus to stop device stream\n\r");
717 send_serial_char(serial, '+');
719 //In case we get calls to receive force it to exit
720 devc->rxstate = RX_IDLE;
721 //drain data from device so that it doesn't confuse subsequent commands
724 serial_read_blocking(serial, devc->buffer,
725 devc->serial_buffer_size, 100);
727 sr_err("Dropping %d device bytes\n\r", len);
733 g_free(devc->buffer);
737 for (int i = 0; i < devc->num_a_channels; i++) {
738 if (devc->a_data_bufs[i]) {
739 g_free(devc->a_data_bufs[i]);
740 devc->a_data_bufs[i] = NULL;
744 if (devc->d_data_buf) {
745 g_free(devc->d_data_buf);
746 devc->d_data_buf = NULL;
748 for (int i = 0; i < devc->num_a_channels; i++) {
749 if (devc->a_pretrig_bufs[i])
750 g_free(devc->a_pretrig_bufs[i]);
751 devc->a_pretrig_bufs[i] = NULL;
755 serial_source_remove(sdi->session, serial);
760 static struct sr_dev_driver raspberrypi_pico_driver_info = {
761 .name = "raspberrypi-pico",
762 .longname = "RaspberryPI PICO",
765 .cleanup = std_cleanup,
767 .dev_list = std_dev_list,
768 .dev_clear = std_dev_clear,
769 .config_get = config_get,
770 .config_set = config_set,
771 .config_list = config_list,
772 .dev_open = std_serial_dev_open,
773 .dev_close = std_serial_dev_close,
774 .dev_acquisition_start = dev_acquisition_start,
775 .dev_acquisition_stop = dev_acquisition_stop,
779 SR_REGISTER_DEV_DRIVER(raspberrypi_pico_driver_info);