The *.sr (libsigrok session) file format has changed since the last
libsigrok release. Frontends using older libsigrok versions will not
be able to read *.sr files created by frontends using the new file format.
Thus, bump the version number of the file format to 2.
Current libsigrok will read both version 1 and version 2 files
correctly, and always write version 2 files.
Move pre-acquisition hardware setup to the new config_commit()
callback. At the moment, the only setting applied at commit
time is switching the clock source, which involves uploading
a new bitstream to the FPGA.
Move setup of channels and trigger masks to the new probe
configuration callback. Although the actual hardware setup
still happens just before acquisition, the new approach
already has the advantage that invalid settings are caught
early.
Also, it turns out that the LWLA1034 allows triggering on
channels which are not enabled for data acquisition. This
feature is now supported as well.
Apparently, frontends may call scan() more than once to accumulate
multiple devices, so do not reset the instance list pointer at the
start of each scan. Also, number devices continuously across scans.
This change moves the handling of series differences out to the points in the
code where they actually matter, unifying the overall structure of the code.
It also adds new VS5000/DS1000 series equivalents for commands that were
previously only implemented on the later models.
After this change, trigger waiting and the 'Memory' data source are supported
on the VS5000/DS1000 series.
(sr_session_start): Just before starting acquisition on
a device, call sr_config_commit() to apply pending config
changes to the hardware device.
(sr_session_dev_add): Ditto. Also, return an error code
if starting acquisition failed.
(sr_dev_driver.config_probe_set): New optional callback enabling
drivers to be notified upon changes to probe settings.
(sr_dev_probe_enable, sr_dev_trigger_set): Invoke new driver
callback on changes.
(sr_dev_driver.config_commit): New optional callback allowing
drivers to defer application of configuration settings until
an explicit call to config_commit().
(sr_config_commit): New public wrapper function.