Uwe Hermann [Sun, 12 Apr 2015 15:26:48 +0000 (17:26 +0200)]
baylibre-acme: Fix a compiler warning.
CC src/hardware/baylibre-acme/protocol.lo
../src/hardware/baylibre-acme/protocol.c: In function 'bl_acme_set_power_off':
../src/hardware/baylibre-acme/protocol.c:417:6: warning: variable 'val' set but not used [-Wunused-but-set-variable]
int val;
^
baylibre-acme: Set update_interval when modifing samplerate.
Both ina2xx and tmp401 linux drivers used by baylibre-acme expose
the standard hwmon update_interval attribute, which affects the internal
update interval of the chip.
When setting samplerate for data acquisition try to modify this
attribute accordingly.
Uwe Hermann [Sat, 4 Apr 2015 18:57:22 +0000 (20:57 +0200)]
sr_driver_list() now takes a context pointer.
This requires sr_hw_cleanup_all() and sanity_check_all_drivers()
to also take a context.
The (runtime) generation of the driver list now happens in sr_init()
and sr_driver_list() always returns that pre-generated list. This fixes
a segfault when (correctly) invoking multiple sr_init() and sr_exit()
calls with different contexts (caught by the unit tests).
Martin Ling [Wed, 25 Mar 2015 05:16:06 +0000 (05:16 +0000)]
Call libusb_get_next_timeout() to get minimum timeout for g_poll().
We should have been doing this all along, but we get away with it
on Linux where libusb can do everything with fds, and we get away
with it for many drivers that have a short timeout on their events.
On Windows though, handling this correctly is essential.
Martin Ling [Tue, 24 Mar 2015 19:06:17 +0000 (20:06 +0100)]
Initial fix attempt for a thread-related issue on Windows.
This is a partial fix for bug #343, which lead to a large amount of
handles being created, and eventually to a frontend "hang".
It's not yet a "full" fix as some issues are still observable,
but it successfully improves the situation on Windows to the extent
that frontend hangs due to large amounts of handles no longer seem
to happen.
Thanks to Boris Gjenero <redacted> for the debugging
efforts, testing, and updating of this patch!
Additionally, this seems to also fix a "SysClk LWLA hanging" bug
and apparently not receiving any samples during an acquisition
(tested on an LWLA1034).
Martin Ling [Thu, 19 Mar 2015 16:15:52 +0000 (16:15 +0000)]
rigol-ds: Add DS1000Z series support.
Tested on an MSO1104Z with firmware 00.04.02.SP4.
The analog channels are captured correctly. For the MSO series, with digital
channels, there are two outstanding issues:
1. Logic data is retrieved per-channel, one byte per sample, with the value
in the LSB of each byte. The current datafeed logic format doesn't allow
this format to be passed on directly. I suggest we resolve that rather than
making the driver buffer and interleave the data.
As stands, the code will retrieve data for all channels and pass it onto
the datafeed with unitsize=1. Channel D0 can used correctly if selected
alone. For other channels, data is passed to the frontend but the API does
not provide a way to associate it with the correct channel.
2. Channels CH3 and CH4 are multiplexed with D0-7 and D8-15 respectively, so
enabling these is mutually exclusive. We don't currently have a way to
express this constraint to the frontend.
eightdot [Mon, 16 Mar 2015 09:34:08 +0000 (10:34 +0100)]
Various fixes/updates to make the driver compile.
This patchset was originally done by eightdot <redacted> by
manually forward-porting parts of the changes done by Bert Vermeulen (see
previous commits), but then heavily modified by Uwe Hermann to be based on
top off the (git-)rebased patches from Bert Vermeulen instead.
Note: This initial DSLogic code is *not* yet in a working or usable
state. It should be considered as a basis for further work only, for now.
Uwe Hermann [Fri, 13 Mar 2015 18:12:47 +0000 (19:12 +0100)]
ols: Fix a compiler warning (unused variable).
CC src/hardware/openbench-logic-sniffer/api.lo
../src/hardware/openbench-logic-sniffer/api.c: In function 'scan':
../src/hardware/openbench-logic-sniffer/api.c:103:10: warning: unused
variable 'probefd' [-Wunused-variable]
GPollFD probefd;
^
Uwe Hermann [Fri, 13 Mar 2015 07:33:22 +0000 (08:33 +0100)]
ols: Fix detection and acquisition on Windows.
Use the more portable sp_input_waiting() instead of g_poll() with FDs.
Thanks to Martin Ling for the hints. This is tested on Linux and Win7
using an OLS; scanning for the device and starting an acquisition works.
Current exclude patterns lead to unwanted exclusion of all paths
containing common directory names like output, bindings etc. even
if those names occur higher in the directory structure.
Make exclude patterns more specific by prefixing them with src/.
Uwe Hermann [Mon, 16 Feb 2015 00:53:15 +0000 (01:53 +0100)]
baylibre-acme: Drop unneeded comment.
There's indeed no g_fclose() unfortunately. The g_*() wrappers for file
handling are mainly there to deal with portability issues in file names
(encoding, character sets, etc) on different platforms.
Uwe Hermann [Mon, 16 Feb 2015 00:51:53 +0000 (01:51 +0100)]
baylibre-acme: Fix a compiler warning.
Use PRIu64 to avoid the following compiler warning:
CC src/hardware/baylibre-acme/gpio.lo
protocol.c: In function 'bl_acme_set_shunt':
protocol.c:341:2: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t' [-Wformat=]
g_fprintf(fd, "%llu\n", MOHM_TO_UOHM(shunt));
^