> On Sep 22, 2025, at 10:58 PM, Shawn Walker <[email protected]> wrote:
>
> I think (based on my fuzzy memory from my raspberrypi-pico driver), that you
> can enforce a max limit by having a SR_CONF_LIMIT_SAMPLES key inside of the
> config_list. At least that seems to be what worked for me in
> libsigrok/src/hardware/raspberrypi-pico/api.c.
> What I also remember is that the driver always has the option to send fewer
> samples than what was requested by sending a complete (I forget the exact
> term) up the chain and that whatever samples you have sent are good enough.
Thanks, I found the solution in your code! The trick (std_gvar_tuple_u64()) in
function config_list:
case SR_CONF_LIMIT_SAMPLES:
/* Really this limit is up to the memory capacity of the host,
* and users that pick huge values deserve what they get.
* But setting this limit to prevent really crazy things. */
*data = std_gvar_tuple_u64(1LL, 1000000000LL);
break;
> That all being said, I would highly advise trying to get your device to "fit"
> into one of the many existing drivers. Look for something that has the same
> protocol (wifi/ethernet, USB, USB Serial etc. as a good starting point).
I have been through a lot of drivers and collected parts of code that suite my
needs. Unfortunately, no driver had a solution that fit the hardware with minor
tweaks.
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel