Uwe Hermann [Sat, 13 Apr 2013 16:58:11 +0000 (18:58 +0200)]
Doxygen: Add @since markers.
Add @since tags to some (not all yet) public API functions, to document
in which release they were added (and/or in which release there were
API changes).
Document the @since usage in HACKING.
Also, add Doxygen docs for the functions in version.c.
Uwe Hermann [Mon, 15 Apr 2013 22:58:29 +0000 (00:58 +0200)]
Python bindings: Fix reported libsigrok version.
Use 'pkg-config --modversion libsigrok' to get the libsigrok package
version. 'pkg-config --version libsigrok' ignores the argument and just
reports the version of pkg-config itself.
With the sigrok session running in a worker thread, if sr_session_stop is called
from another thread, it shuts down the pollfds used by the hardware drivers,
without ensuring that the sigrok event loop is no longer using those pollfds.
On the demo driver, this involves shutting down the GIOChannels, causing a
segfault when the sigrok event loop tries to use them. This is evident when
using the Stop button in PulseView, while the session is running.
This isn't a problem with just the demo driver; any driver's resources may be
freed by sr_session_stop concurrently with the sigrok session running.
To solve this problem, we don't touch the session itself in sr_session_stop().
Instead, we mark it for decommissioning and return. The session polls this flag,
and shuts itself down when requested.
Add SR_CONF keys to report the number of timebases and vdivs
Number of timebases is needed to properly interpret a frame's worth
of samples. Number of vertical divisions isn't, but may nevertheless
be interesting for a frontend that wants to reproduce the scope's
native display.
Bert Vermeulen [Mon, 25 Mar 2013 19:41:28 +0000 (20:41 +0100)]
struct sr_samplerates is now obsolete
sr_config_get() of SR_CONF_SAMPLERATE now returns a GVARIANT_TYPE_DICTIONARY.
This dictionary contains a single key-value pair. Possible values for the key:
- "samplerates": the value is an array of GVARIANT_TYPE_UINT64 representing
all valid samplerates.
- "samplerate-steps": the value is an array of GVARIANT_TYPE_UINT64 with
exactly three members, which represent the lowest samplerate, highest
samplerate, and the minimum step, respectively.
Bert Vermeulen [Mon, 25 Mar 2013 14:38:44 +0000 (15:38 +0100)]
Use GVariant for sr_config_*() functions
sr_config_get() provides a GVariant owned by the caller, so it must be
released with g_variant_unref() when done.
sr_config_set() takes a GVariant from the caller which may be floating;
it will be properly sunk and release after use by this function. Thus
the output of g_variant_new_*() may be used as an argument.
sr_config_list() also provides a GVariant owned by the caller, to be
unreferenced when done.
Uwe Hermann [Tue, 9 Apr 2013 17:52:38 +0000 (19:52 +0200)]
configure.ac: Fix checks for cross-compiles.
When checking architecture-specific things, always check $host, i.e. the
architecture we're building _for_, not the one we happen to build _on_.
E.g. when cross-compiling _for_ Android (or Windows or others) it's important
to check for Android in $host; whether we happen to cross-compile _on_ a Linux
or Windows or OpenBSD or FreeBSD machine ($build) doesn't matter, only the
fact that we compile _for_ Android is important for most checks.
Uwe Hermann [Tue, 9 Apr 2013 16:47:31 +0000 (18:47 +0200)]
configure.ac: Print $host and $build.
In the configure summary at the end also print the architecture we're
building on ($build) and the target host we build for ($host). The two are
not necessarily the same, e.g. in the case of cross-compiles.
Uwe Hermann [Tue, 9 Apr 2013 16:08:16 +0000 (18:08 +0200)]
configure.ac: Mention required lib versions.
In the summary output at the end of a configure run, explicitly mention
which versions of which libraries are required, and also the version which
pkg-config has found.
Uwe Hermann [Tue, 9 Apr 2013 08:03:58 +0000 (10:03 +0200)]
configure.ac: Cosmetics for the list of drivers.
Use the canonical driver name (all-lowercase, e.g. "serial-dmm") in the
list of enabled/disabled drivers that configure prints after a run.
It's common to many drivers that they support multiple devices, so
printing one device name (e.g. "ChronoVu LA8") is seldom really correct.
E.g. the agilent-dmm, asix-sigma, brymen-dmm, colead-slm, fluke-dmm,
fx2lafw, hantek-dso, lascar-el-usb, mic-985xx, openbench-logic-sniffer,
rigol-ds1xx2, uni-t-dmm, victor-dmm, and zeroplus-logic-cube drivers
all support more than just one device.
So, just print the driver name instead which is more correct anyway
since it's specifically a list of enabled/disabled drivers.
Uwe Hermann [Mon, 8 Apr 2013 13:56:54 +0000 (15:56 +0200)]
configure.ac: Improve a libusb-1.0 related check.
Don't rely on the "heuristic" that 'libusb_CFLAGS' will be non-empty if
libusb-1.0 was found, but rather use the proper method of checking the
variable 'have_libusb1_0' which pkg-config will set to "yes"/"no"
depending on whether it finds the library.
Uwe Hermann [Mon, 8 Apr 2013 13:40:57 +0000 (15:40 +0200)]
configure.ac: Improve USB/EZUSB/serial checks.
- If libusb-1.0 is not found, do not compile in ezusb.c and usb.c since
they require libusb.h. The respective hardware drivers that use
libusb-1.0, and usb.c and/or ezusb.c will be excluded from the build
elsewhere in configure.ac. Rename NEED_EZUSB to NEED_USB.
- Drop the NEED_SERIAL check and always compile in serial.c. This is a
very small chunk of code, it does not depend on any external
libraries that might be missing, and it compiles on all architectures.
Thus there's no need to conditionally include or exclude it.