Commit Graph

2405 Commits

Author SHA1 Message Date
Bert Vermeulen aeff7fa286 chronovu-la: Use new trigger API. 2014-05-28 00:20:51 +02:00
Bert Vermeulen 39c64c6a4f asix-sigma: Use new trigger API. 2014-05-28 00:19:58 +02:00
Bert Vermeulen 9f00e5aefb Remove dead code from session read.
The "trigger" keyword was supported in theory, but in practice nothing
ever wrote it, so it was never used.
2014-05-28 00:05:51 +02:00
Bert Vermeulen 6db3b6a4d1 Remove obsolete API call sr_parse_triggerstring().
Since triggers are now passed to libsigrok with an API, this moved
to sigrok-cli.
2014-05-28 00:05:00 +02:00
Bert Vermeulen 3b0ff21c8c Remove obsolete API call sr_dev_trigger_set().
Triggers are now set on the session, not on a channel.
2014-05-28 00:01:54 +02:00
Bert Vermeulen 795c9de35e Rename SR_CONF_TRIGGER_TYPE to SR_CONF_TRIGGER_MATCH.
Drivers supporting triggering need to implement this in config_list()
and return an array of int32_t consisting of SR_TRIGGER_*.
2014-05-27 23:55:26 +02:00
Bert Vermeulen 7b5e6d2978 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.
2014-05-27 23:53:27 +02:00
Bert Vermeulen f66d45806f fx2lafw: Rename trigger constant. 2014-05-22 23:22:37 +02:00
Matthias Heidbrink 419bfb5009 motech-lps-30x: Cleanup. 2014-05-19 21:38:23 +02:00
Matthias Heidbrink 1f7da0c2bb motech-lps-30x: Cleanup. 2014-05-19 20:47:15 +02:00
Matthias Heidbrink 1c3d002b68 motech-lps-30x: Implemented driver. 2014-05-19 19:48:28 +02:00
Matthias Heidbrink d0a92abd54 Whitespace and comment improvements, no semantical changes. 2014-05-19 19:44:04 +02:00
Matthias Heidbrink 1ba4a1cf33 strutil: Now using base 10 in sr_atol(), sr_atoi() for compatibility to atoi(), atol(); docs. 2014-05-19 19:40:53 +02:00
Matthias Heidbrink 41b7bd01c1 motech-lps-30x: Initial driver framework. 2014-05-19 19:23:30 +02:00
Uwe Hermann 4133caab1d configure.ac: Bump package version to 0.3.0. 2014-05-06 23:00:08 +02:00
Uwe Hermann 85ca913cae configure.ac: Bump libtool/library version from 1:2:0 to 2:0:0.
The libtool current:revision:age numbers change from 1:2:0 to 2:0:0.

Details:
http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info

This changes the library filename (e.g. on Linux) from libsigrok.so.1.0.2
to libsigrok.so.2.0.0, the SONAME (+symlink) becomes libsigrok.so.2.
2014-05-06 22:59:00 +02:00
Uwe Hermann 8f8289dc1d NEWS: Add list of user-visible changes so far. 2014-05-06 20:28:21 +02:00
Uwe Hermann ace218f922 Rename SR_T_CHAR to SR_T_STRING.
This is more correct and less confusing.
2014-05-06 20:18:54 +02:00
Martin Ling 05238d2830 rigol-ds: Quick hack to fix bug #354. 2014-05-05 00:38:58 +01:00
Uwe Hermann a9af7b1b8b README: Mention missing dependency 'librevisa'. 2014-05-04 22:04:37 +02:00
Uwe Hermann f897acaee8 log.c: Avoid using the same name for a variable and enum. 2014-05-04 20:57:38 +02:00
Uwe Hermann 4711724141 Add/update Doxygen @since tags. 2014-05-04 20:53:53 +02:00
Uwe Hermann 768579456c libsigrok.h: Add some missing enum names for consistency. 2014-05-04 20:53:53 +02:00
Bert Vermeulen 6b2d33856f asix-sigma: Don't set invalid configuration options. 2014-05-04 11:49:48 -07:00
Uwe Hermann f055494660 doxygen: Updated Doxyfile to doxygen 1.8.6. 2014-05-04 17:55:46 +02:00
Uwe Hermann 8c21897f59 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
2014-05-04 17:44:05 +02:00
Uwe Hermann 2fa222c78b Drop obsolete Linux-only usbtmc backend.
We're now using a portable libusb-based (userspace) backend which should
in theory work on any OS with libusb support.
2014-05-04 17:38:09 +02:00
Uwe Hermann e311f77015 README.devices: Various updates and fixes. 2014-05-04 17:35:47 +02:00
Uwe Hermann 71422cb6eb Drop left-overs of the removed alsa driver. 2014-05-04 17:01:03 +02:00
Uwe Hermann 144f6660d0 Don't define names ending with _t (POSIX reserved).
Avoid defining any names ending in _t, those are generally reserved
for POSIX usage. For details see:

http://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_02.html
http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html
2014-05-04 16:16:17 +02:00
Bert Vermeulen 999f6730c6 asix-sigma: Disable sample-limited capture for now.
This is not really supported yet in the driver.
2014-05-04 00:36:46 -07:00
Bert Vermeulen fb2e6de774 asix-sigma: Publish capture ratio correctly. 2014-05-04 00:36:46 -07:00
Uwe Hermann b9a53103cf saleae-logic16: Minor whitespace fixes, cosmetics. 2014-05-03 21:27:08 +02:00
Marcus Comstedt 1b822521f7 saleae-logic16: Use unitsize 1 if none of channels 8-15 are used. 2014-05-03 21:27:08 +02:00
Marcus Comstedt 2db959063b saleae-logic16: Don't send more samples than requested.
This fixes bug #350.
2014-05-03 21:25:57 +02:00
Martin Ling 831d7c70eb Add SR_CONF_DEVICE_MODE and SR_CONF_TEST_MODE config keys. 2014-05-01 11:17:35 -07:00
Martin Ling e826239c85 fx2lafw: Allow matching USB descriptor strings as well as VID/PID. 2014-04-30 16:23:38 -07:00
Martin Ling 1c48000dc7 fx2lafw: tidy up config_set(). 2014-04-30 14:12:17 -07:00
Martin Ling a920a7d899 fx2lafw: implement config_get for SR_CONF_LIMIT_SAMPLES and tidy up. 2014-04-30 14:01:52 -07:00
Martin Ling a54edb1dfb fx2lafw: pass sdi to command functions. 2014-04-30 13:57:22 -07:00
Marek Vasut 23b886bc40 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.

Signed-off-by: Marek Vasut <marex@denx.de>
2014-04-30 09:45:52 -07:00
Marek Vasut 1e23158b93 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.

Signed-off-by: Marek Vasut <marex@denx.de>
2014-04-30 09:45:52 -07:00
Marek Vasut 23239b5c84 asix-sigma: Pull out cluster decoding
Pull out the code for decoding the DRAM clusters into separate function.
This shall improve readability some more.

Signed-off-by: Marek Vasut <marex@denx.de>
2014-04-30 09:45:52 -07:00
Marek Vasut a16a6391b5 asix-sigma: Exterminate passing lastts and lastsample
These two values can pulled out from devc->state, so there really is
no need to pass them as function argument when we already pass the
devc.

Signed-off-by: Marek Vasut <marex@denx.de>
2014-04-30 09:45:52 -07:00
Marek Vasut 5fc01191eb 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.

Signed-off-by: Marek Vasut <marex@denx.de>
2014-04-30 09:45:52 -07:00
Marek Vasut 46641facd4 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!

Signed-off-by: Marek Vasut <marex@denx.de>
2014-04-30 09:45:52 -07:00
Marek Vasut 3628074d09 asix-sigma: Properly fetch timestamp in decode_chunk_ts()
Instead of this ad-hoc readout voodoo, use proper function to read
the timestemp. One which will not break even on big-endian machines.

Signed-off-by: Marek Vasut <marex@denx.de>
2014-04-30 09:45:52 -07:00
Marek Vasut f41a4cae49 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.

Signed-off-by: Marek Vasut <marex@denx.de>
2014-04-30 09:45:52 -07:00
Marek Vasut 3513d96569 asix-sigma: Introduce function to read DRAM cluster timestamp
Introduce helper function which returns the timestamp of DRAM cluster
and use it in download_capture().

Signed-off-by: Marek Vasut <marex@denx.de>
2014-04-30 09:45:51 -07:00
Marek Vasut e69ad48e08 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.

Signed-off-by: Marek Vasut <marex@denx.de>
2014-04-30 09:45:51 -07:00