In order for lib autodetection and disabling of drivers (which require
libs that cannot be found) to work, the order of AC_ARG_ENABLEs,
AM_CONDITIONALs, and AC_DEFINEs needs to be changed.
All drivers start out enabled or disabled (depending on whether
the --disable-drivers option was supplied or not). Then, any driver can
be enabled or disabled explicitly via --enable-<drivername> or the
resp. --disable-<drivername> option. Finally, pkg-config checks for all
libraries are performed, and all drivers which require a library that
cannot be found are disabled explicitly (regardless of any
--enable-<drivername> option that might have been supplied).
Until now, we checked for certain (optional) libraries via pkg-config and
the configure script would abort if any of them was not found, even
though they were optional. It was up to the user to then figure out which
combination of --disable-<drivername> switches were required for his
specific OS (and set of installed libs) to get a working configure run.
Only if the user already specified enough --disable-<drivername>
switches beforehand, so that all drivers which require a missing library
were disabled, would the configure run not check for that specific lib
(and would thus not fail).
With this change, we now always unconditionally check for all libs
(required and optional) via pkg-config. However, whether an (optional) lib
is found or not, configure will not abort. Instead, it'll just disable
all drivers which need a lib that cannot be found.
The user will no longer have to supply --disable-<drivername> parameters
in order to get a working build.
The automake 'std-options' option checks whether all installed tools
and scripts have a --help and --version CLI option. This check is not
needed for libsigrok though, since it doesn't install any tools.
Expresses the time between samples, in milliseconds. This can be used
for devices with a samplerate > 1 second, such as dataloggers, which
cannot be expressed with SR_CONF_SAMPLERATE.
This adds a suite of unit tests for libsigrok. It uses the 'Check'
tool/library (apt-get install check) to run the tests.
The configure tool tries to find libcheck. If it succeeds, a
"make check" will run all tests. Otherwise, none of the tests will
be built and "make check" will not run any tests.
This also means that users who don't have 'check' installed will still
be able to build and install libsigrok just fine.
This has been deprecated in favor of sr_session_stop() since a while.
None of the current frontends use sr_session_halt() anymore, neither
does libsigrok.
This is essential if a format contains e.g. the number of probes; the
init() function needs to initialize the sr_dev_inst struct, but needs
access to the file to properly add the probes to it.
The currently supported model LAP-C(16032) doesn't support the
samplerates 150MHz and 200MHz which some of the other models have.
Thus, do not report these samplerates to the frontends. E.g. sigrok-cli
should not show them via --show and GUIs should not list them in their
"Samplerates" drop-down.
- Explicitly list .config_get in all drivers for consistency, and set it
to NULL if unused (whether or not a driver implements it is optional).
- List all 'struct sr_dev_driver' entries in the same order in all drivers.
- Move the check whether .config_set/.config_list exist (i.e., are non-NULL)
into sanity_check_all_drivers().
This is a small helper function which sends the SR_DF_HEADER packet that
drivers usually emit in their hw_dev_acquisition_start() API callback.
It simplifies and shortens the hw_dev_acquisition_start() functions
quite a bit.
It also simplifies the input modules which send an SR_DF_HEADER packet, too.
This patch also automatically removes some unneeded malloc/free in some
drivers for the 'packet' and 'header' structs used for SR_DF_HEADER.