On Tue, Jun 2, 2020 at 8:55 PM Timo Kokkonen <t...@iki.fi> wrote: > On Tue, Jun 2, 2020 at 3:29 AM Frank Stettner <frank-stett...@gmx.net> wrote: > > You might want to add support for SmuView? Then you want to add a mutex > > (GMutex) to make the serial read/write thread safe. > > Background is that data acquisition and getting/setting of config keys are > > running in separate threads in SmuView. > > Have a look at the arachnid-labs-re-load-pro driver (acquisition_mutex) or > > the korad-kaxxxxp driver (rw_mutex) for examples. > [...] > Shouldn't the mutex be initialize when driver is loaded (in scan() > function), and then freed when driver is freed/closed?
I went with the above approach adding mutex support. Now driver seems to work fine with SmuView. SmuView looks really nice! It would be nice if SmuView would dynamically adjust to device capabilities. I noticed it was crashing with "libgirok:Error" (or something similar) and tracked it down to driver not supporting "Under Voltage" config values. I had to make driver send dummy values to get SmuView to run. Ideally, SmuView could notice that device doesn't have under voltage (or over voltage, over current, over power, etc...) feature (if driver responds with SR_ERR_NA) and just disable/hide that functionality in the UI (?) -- Timo <t...@iki.fi> _______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel