This adds support for the Testo 435-4, with differential pressure
measurement built in, and probes for wind speed and temperature/humidity
at 293 kelvin.
Support for other probe types will have to be added by people with
access to those probes.
Models other than the 435-4 may well work unchanged, but this is
difficult to predict. Most likely new unit types will need to be added,
and possibly the protocol handling may need to be more flexible and
model-dependent to cope with 5-byte values and other minor changes
in the protocol.
Dan Horák [Sun, 15 Jun 2014 09:08:37 +0000 (11:08 +0200)]
detect version 1.x of libftdi library
The FDTI library changed version, module name and also soname, so add an option to detect it
when the 0.x version is not found. The 1.x API is compatible enough for libsigrok to build.
Mike Frysinger [Sat, 14 Jun 2014 02:44:40 +0000 (22:44 -0400)]
asix-sigma: fix build time warnings
We need to include unistd.h for usleep():
hardware/asix-sigma/asix-sigma.c: In function 'sigma_fpga_init_bitbang':
hardware/asix-sigma/asix-sigma.c:450:3: warning: implicit declaration of function 'usleep'
usleep(10000);
And we need to tweak the type of chunks_per_read to match dl_lines_total:
hardware/asix-sigma/asix-sigma.c: In function 'download_capture':
hardware/asix-sigma/asix-sigma.c:1161:39: warning: comparison between signed and unsigned integer expressions
dl_lines_curr = MIN(chunks_per_read, dl_lines_total);
Bert Vermeulen [Thu, 22 May 2014 23:21:58 +0000 (01:21 +0200)]
Add new triggering framework.
The new triggers consist of a set of structs and an API to manipulate
them. Both logic and analog triggers are supported, in an unlimited
number of stages.
A single struct sr_trigger containing its stages and triggers is then
added to the session.
In case of a driver where the hardware supports triggering, the struct
is then converted and used to arm the hardware trigger. Drivers without
hardware trigger support, such as fx2lafw or multimeter drivers, use it
as the basis for a software-based trigger implementation instead.
Uwe Hermann [Sun, 4 May 2014 15:44:05 +0000 (17:44 +0200)]
Unhook the Link Instruments MSO-19 from the build for now.
This driver is neither working nor has it been in a compiling state for
a long time, so unhook it from the build until it is fixed and works.
The files (api.c and protocol.[ch]) are still in git, but won't end up in
released tarballs and they don't get built (neither git nor tarballs).
This also allows us to drop the otherwise unneeded dependency on libudev.
When the MSO-19 driver comes back, it should be in a form that doesn't
require the inherently Linux-only libudev anyway. See also:
http://sigrok.org/bugzilla/show_bug.cgi?id=65
Marek Vasut [Fri, 25 Apr 2014 16:03:47 +0000 (18:03 +0200)]
asix-sigma: Init cur_sample_rate
Init the cur_sample_rate to 200kHz. This is now the default sample
rate for the ASIX Sigma if no other is specified by -c samplerate=N
on the command line. Without this change, the driver would crash on
SIGFPE because a division by zero would happen.
Marek Vasut [Sun, 20 Apr 2014 23:44:36 +0000 (01:44 +0200)]
asix-sigma: Fix the trigger handling
Due to the recent changes in the sigma driver, the trigger handling got
broken. Fix this by properly calculating and propagating the fact that
the trigger happened.
Marek Vasut [Sun, 20 Apr 2014 01:10:05 +0000 (03:10 +0200)]
asix-sigma: Rework decode_chunk_ts()
This function could have never returned correct data. Rework the decoding
logic according to the Sigma documentation. This patch also fixes the
handling of partial DRAM lines and partial DRAM clusters.
While at it, do not allocate megabytes of data on stack, just allocate 2KiB
which is plenty for all the work this function needs to do.
Marek Vasut [Sun, 20 Apr 2014 20:58:34 +0000 (22:58 +0200)]
asix-sigma: Suspend support for trailing DRAM lines
The support for trailing DRAM lines was broken. This patch starts
rework of support for this, but in order to do that, we need to
rework decode_chunk_ts() a little first.
This patch adjusts the decode_chunk_ts() a little to receive the
total amount of events in DRAM line instead of some nonsense value.
This patch temporarily removes the support for the trailing DRAM
lines until the decode_chunk_ts() is fixed to cope with this, so
yes, this patch introduces breakage!
Marek Vasut [Sun, 20 Apr 2014 20:40:38 +0000 (22:40 +0200)]
asix-sigma: Use proper structure for DRAM lines
Use proper structure instead of plain buffer of uint8_t for the contents
of DRAM in download_capture(). This is beneficial as we can interpret the
contents easily.
Marek Vasut [Sun, 20 Apr 2014 20:28:33 +0000 (22:28 +0200)]
asix-sigma: Unify calling of decode_chunk_ts()
Clean up the way decode_chunk_ts() is called a little. Introduce a variable
which will not be -1 only in case a trigger happened on the particular DRAM
line.
Marek Vasut [Sun, 20 Apr 2014 20:19:11 +0000 (22:19 +0200)]
asix-sigma: Rework download_capture() to support more than 32 lines
In the current configuration, the download capture used 32KiB buffer
for samples. This was the upper limit this function could download
from the Sigma. Even the sigma_read_dram() was only called once to
read up-to 32 DRAM line from address 0x0 in the DRAM.
This patch reworks the function to call sigma_read_dram() in a loop
in case there is need to download more than 32 DRAM lines of data
from Sigma. The data are then correctly passed for decoding to the
decoding function.
Marek Vasut [Sun, 20 Apr 2014 19:34:36 +0000 (21:34 +0200)]
asix-sigma: Remove stack-based alloc in download_capture()
Avoid allocating 32KiB of data on stack in download_capture(). Instead,
do a glib-variant of calloc(1, ) to allocate the data for the samples
which will be downloaded. This avoids explosions of stack on systems
with tight stack limits.
Furthermore, define structures describing the organisation of Sigma's
DRAM memory and start using those instead of ad-hoc preprocessor macros
defining the sizes of various structures in memory.
Marek Vasut [Sun, 20 Apr 2014 18:50:10 +0000 (20:50 +0200)]
asix-sigma: Localize variables
The trigger position, stop position and chunk in which the trigger happened
are no longer needed in the global scope. Make those variables local to the
download_capture() function.
Marek Vasut [Sun, 20 Apr 2014 18:45:40 +0000 (20:45 +0200)]
asix-sigma: Move all register I/O into download_capture()
Move all the register I/O that is necessary to do the download of samples
from Sigma into download_capture() function. This makes the downloading
code contained a bit more again.
Marek Vasut [Sun, 20 Apr 2014 18:40:00 +0000 (20:40 +0200)]
asix-sigma: Clearly separate the sample download
Reorder the sigma_capture_mode() function so that the part which handles
the download of samples from Sigma is clearly separated from the tests if
the download should be started.
Marek Vasut [Sun, 20 Apr 2014 18:30:16 +0000 (20:30 +0200)]
asix-sigma: Pull out the CAPTURE mode handler
Pull out the code handling the Sigma which is in CAPTURE mode into
a separate function. This is so we can start reworking this entire
code easily soon.