]> sigrok.org Git - libsigrok.git/log
libsigrok.git
10 years agochronovu-la: Fix byte order for LA16 samples sent to the bus.
Uwe Hermann [Tue, 1 Apr 2014 21:23:23 +0000 (23:23 +0200)]
chronovu-la: Fix byte order for LA16 samples sent to the bus.

10 years agochronovu-la: Document that streaming is not possible.
Uwe Hermann [Tue, 1 Apr 2014 20:41:02 +0000 (22:41 +0200)]
chronovu-la: Document that streaming is not possible.

This closes bug #261.

10 years agoRename 'chronovu-la8' driver to 'chronovu-la'.
Uwe Hermann [Tue, 1 Apr 2014 19:47:11 +0000 (21:47 +0200)]
Rename 'chronovu-la8' driver to 'chronovu-la'.

The driver now also supports the LA16 device (and possibly others in the
future).

10 years agola8: Add support for the ChronoVu LA16.
Uwe Hermann [Sun, 30 Mar 2014 23:26:07 +0000 (01:26 +0200)]
la8: Add support for the ChronoVu LA16.

The ChronoVu LA16 is a new logic analyzer from ChronoVu with some
differences in features compared to the LA8, e.g.

 - Supports 16 channels (instead of 8).
 - Max. 200MHz samplerate (instead of 100MHz).
 - Supports state triggering (low and high channel value) and edge triggering
   (rising or falling edge), the LA8 only supports state triggering.

This driver now supports both the LA8 and LA16, but it needed a few
changes:

 - Add support for detecting multiple device instances at all.
 - Add support for both LA8 and/or LA16 devices being detected.
 - Add a device profile struct for LA8-/LA16-specific device properties.
 - Move the samplerates list to devc (it's different for LA8 and LA16).
 - Split scan() into two functions, one for scanning, one for adding a device.
 - Expand some variables and fields from uint8_t to uint16_t in order to
   support 16 channels.
 - Update the samplerate related functions to support the LA16's 200MHz.
 - Various other minor updates in order to better handle both device types.
 - Various error handling improvements and simplifications.
 - Also, replace time() with g_get_monotonic_time() everywhere.

This also fixes bug #247 (which was related to incorrect handling of
resources during scan and open of the device, which was exposed by
PulseView allowing multiple consecutive scan/close/open calls).

10 years agola8: Cleanups, cosmetics, simplifications.
Uwe Hermann [Sun, 30 Mar 2014 20:40:27 +0000 (22:40 +0200)]
la8: Cleanups, cosmetics, simplifications.

Also, make some LA8 references more generic in preparation of
LA16 support.

10 years agodemo: Fix typos.
Uwe Hermann [Tue, 25 Mar 2014 20:38:47 +0000 (21:38 +0100)]
demo: Fix typos.

10 years agoVarious drivers: Drop some unneeded lines.
Uwe Hermann [Tue, 25 Mar 2014 20:35:31 +0000 (21:35 +0100)]
Various drivers: Drop some unneeded lines.

10 years agorigol-ds: Don't close SCPI handle we didn't open.
Bert Vermeulen [Thu, 27 Mar 2014 14:13:24 +0000 (15:13 +0100)]
rigol-ds: Don't close SCPI handle we didn't open.

10 years agorigol-ds: Add the TRIGGER_SLOPE entry to config_get() and config_list()
Aurelien Jacobs [Tue, 25 Mar 2014 22:09:57 +0000 (23:09 +0100)]
rigol-ds: Add the TRIGGER_SLOPE entry to config_get() and config_list()

10 years agohameg-hmo: Change some PG_/pg_ names to CG_/cg_.
Uwe Hermann [Tue, 25 Mar 2014 08:26:05 +0000 (09:26 +0100)]
hameg-hmo: Change some PG_/pg_ names to CG_/cg_.

This fixes parts of bug #259.

10 years agoA few more random 'probe' to 'channel' changes.
Uwe Hermann [Mon, 24 Mar 2014 15:11:45 +0000 (16:11 +0100)]
A few more random 'probe' to 'channel' changes.

This fixes parts of bug #259.

10 years agoRename a few more API calls with 'probe' in their name.
Uwe Hermann [Mon, 24 Mar 2014 15:05:42 +0000 (16:05 +0100)]
Rename a few more API calls with 'probe' in their name.

This fixes parts of bug #259.

10 years agoRename various *PROBE* macros to *CHANNEL*.
Uwe Hermann [Mon, 24 Mar 2014 21:39:42 +0000 (22:39 +0100)]
Rename various *PROBE* macros to *CHANNEL*.

This fixes parts of bug #259.

10 years agoRename sr_probe_new() to sr_channel_new().
Uwe Hermann [Mon, 24 Mar 2014 20:36:04 +0000 (21:36 +0100)]
Rename sr_probe_new() to sr_channel_new().

This fixes parts of bug #259.

10 years agoReplace 'probe' with 'channel' in most places.
Uwe Hermann [Mon, 24 Mar 2014 20:34:20 +0000 (21:34 +0100)]
Replace 'probe' with 'channel' in most places.

Also, consistently use 'ch' for channel variables. This matches how we
consistently use sdi, devc, and so on all over the code-base.

This fixes parts of bug #259.

10 years agoRename 'struct sr_probe' to 'struct sr_channel' everywhere.
Uwe Hermann [Thu, 20 Mar 2014 20:58:57 +0000 (21:58 +0100)]
Rename 'struct sr_probe' to 'struct sr_channel' everywhere.

This fixes parts of bug #259.

10 years agoConsistently use 'cg' for channel group variables.
Uwe Hermann [Thu, 20 Mar 2014 20:58:01 +0000 (21:58 +0100)]
Consistently use 'cg' for channel group variables.

This matches how we consistently use sdi, devc, and so on all over
the code-base.

This fixes parts of bug #259.

10 years agoReplace channel_group.probes with channel_group.channels.
Uwe Hermann [Fri, 14 Mar 2014 20:21:09 +0000 (21:21 +0100)]
Replace channel_group.probes with channel_group.channels.

This fixes parts of bug #259.

10 years agoReplace some 'pg' with 'cg'.
Uwe Hermann [Fri, 14 Mar 2014 20:22:29 +0000 (21:22 +0100)]
Replace some 'pg' with 'cg'.

(since 'probe groups' are now called 'channel groups')

This fixes parts of bug #259.

10 years agoReplace 'probe group' with 'channel group' everywhere.
Uwe Hermann [Fri, 14 Mar 2014 20:09:37 +0000 (21:09 +0100)]
Replace 'probe group' with 'channel group' everywhere.

The name 'probe' (and thus 'probe group') is a relic from the times when
sigrok was mostly about logic analyzers. Nowadays we support a lot more
device types where 'probe' is not really a good term and 'channel' is
much better suited.

This fixes parts of bug #259.

10 years agohameg-hmo: Add missing cases in config_get().
poljar (Damir Jelić) [Tue, 25 Mar 2014 16:44:38 +0000 (17:44 +0100)]
hameg-hmo: Add missing cases in config_get().

10 years agohameg-hmo: Add the TRIGGER_SLOPE entry to config_list().
poljar (Damir Jelić) [Tue, 25 Mar 2014 16:44:37 +0000 (17:44 +0100)]
hameg-hmo: Add the TRIGGER_SLOPE entry to config_list().

10 years agohameg-hmo: Fix the logic for the horizontal trigger position in config_set()
poljar (Damir Jelić) [Tue, 25 Mar 2014 16:44:36 +0000 (17:44 +0100)]
hameg-hmo: Fix the logic for the horizontal trigger position in config_set()

This patch fixes the logic calculating the trigger position as well as the
(hopefully) last remaining locale issue.

10 years agoserial-dmm: Implemented support for Voltcraft M-3650CR (driver voltcraft-m3650cr).
Matthias Heidbrink [Mon, 24 Mar 2014 20:50:07 +0000 (21:50 +0100)]
serial-dmm: Implemented support for Voltcraft M-3650CR (driver voltcraft-m3650cr).

10 years agoserial-dmm: Implemented support for Voltcraft ME-42 (driver voltcraft-me42).
Matthias Heidbrink [Mon, 24 Mar 2014 16:42:52 +0000 (17:42 +0100)]
serial-dmm: Implemented support for Voltcraft ME-42 (driver voltcraft-me42).

10 years agoMakefile.am: Add missing vxi.h.
Uwe Hermann [Wed, 19 Mar 2014 23:04:45 +0000 (00:04 +0100)]
Makefile.am: Add missing vxi.h.

If it's not listed as SOURCE, it won't end up in the tarball and a build
from tarball would thus break.

10 years agoSwitch to a non-recursive automake setup.
Uwe Hermann [Wed, 19 Mar 2014 22:04:55 +0000 (23:04 +0100)]
Switch to a non-recursive automake setup.

Instead of >= 44 Makefile.am's we now only have one top-level
Makefile.am, and use the 'subdir-objects' automake option to
handle the build via non-recursive (auto)make.

This has the advantage of fewer (boilerplate or other) files and less
clutter in general, as well as performance advantages since the new
setup can build many files in parallel (with 'make -j'), not only 2 or 3
files within the same (e.g. hardware/xxxx/* subdirectory) and also since
we no longer need to build intermediate libtool helper libs per subdirectory.

A quick, non-scientific test build on a quad-core laptop with 'make -j 4'
yields a build time reduction from 35s to 19s.

All autotools features that worked before are still intact without any
regressions, including the Make targets 'install', 'uninstall', 'check',
'dist', 'clean', 'distclean' and so on, as well as all the usual portability
handling (build works on any OS, with any Make implementation such as
GNU Make or BSD Make, with any shell such as sh/ksh/zsh/bash/dash, etc. etc.)
and features such as out-of-tree build support, cross-compile support,
testsuite support (also with colored output), "silent make rules", etc. etc.

10 years agoscpi_usbtmc_libusb.c: Fix two error checks.
Uwe Hermann [Tue, 11 Mar 2014 18:46:39 +0000 (19:46 +0100)]
scpi_usbtmc_libusb.c: Fix two error checks.

Two error checks had a missing "ret = ", which lead to an incorrect
value being passed to libusb_error_name().

Also, lower the level for those messages from sr_err() to sr_dbg()
since they're not fatal.

10 years agoscpi_usbtmc_libusb.c: Consistently check for < 0 (libusb calls).
Uwe Hermann [Tue, 11 Mar 2014 18:41:51 +0000 (19:41 +0100)]
scpi_usbtmc_libusb.c: Consistently check for < 0 (libusb calls).

10 years agoFix 'aquisition' typo in a few places.
Uwe Hermann [Wed, 5 Mar 2014 19:48:54 +0000 (20:48 +0100)]
Fix 'aquisition' typo in a few places.

10 years agobrymen-bm86x: disable driver when libusb is not present
Aurelien Jacobs [Sun, 9 Mar 2014 22:09:47 +0000 (23:09 +0100)]
brymen-bm86x: disable driver when libusb is not present

10 years agogmc-mh-1x-2x: Whitespace fixes (cosmetic).
Matthias Heidbrink [Sat, 8 Mar 2014 10:04:27 +0000 (11:04 +0100)]
gmc-mh-1x-2x: Whitespace fixes (cosmetic).

10 years agovisa: Fixed missing header warnings/uninitialized variable.
Matthias Heidbrink [Sat, 8 Mar 2014 09:56:16 +0000 (10:56 +0100)]
visa: Fixed missing header warnings/uninitialized variable.

10 years agogmc-mh-1x-2x: Cosmetic fixes for Metrahit 25S.
Matthias Heidbrink [Sat, 8 Mar 2014 09:50:21 +0000 (10:50 +0100)]
gmc-mh-1x-2x: Cosmetic fixes for Metrahit 25S.

10 years agogmc-mh-1x-2x: Fixed 300 µA range scaling.
Matthias Heidbrink [Sat, 8 Mar 2014 09:40:38 +0000 (10:40 +0100)]
gmc-mh-1x-2x: Fixed 300 µA range scaling.

10 years agoFluke189 support
Fabio [Wed, 5 Mar 2014 09:04:17 +0000 (10:04 +0100)]
Fluke189 support

I can confirm that the 189 uses the same "QM" command as the 187:
<-- QM\r
--> QM,+03.225 mV AC

10 years agoFixed session_driver so that it can run more than one session.
Joel Holdsworth [Fri, 28 Feb 2014 18:51:57 +0000 (19:51 +0100)]
Fixed session_driver so that it can run more than one session.

10 years agobrymen-bm86x: Remove std_dev_clear() wrapper.
Uwe Hermann [Fri, 28 Feb 2014 12:11:46 +0000 (13:11 +0100)]
brymen-bm86x: Remove std_dev_clear() wrapper.

10 years agoconfigure.ac: Move Brymen BM86X snippet to correct place.
Uwe Hermann [Fri, 28 Feb 2014 12:08:53 +0000 (13:08 +0100)]
configure.ac: Move Brymen BM86X snippet to correct place.

10 years agobrymen-bm86x: actual driver implementation
Aurelien Jacobs [Wed, 19 Feb 2014 14:09:03 +0000 (15:09 +0100)]
brymen-bm86x: actual driver implementation

10 years agobrymen-bm86x: Initial driver skeleton.
Aurelien Jacobs [Sat, 8 Feb 2014 21:40:36 +0000 (22:40 +0100)]
brymen-bm86x: Initial driver skeleton.

10 years agosession: Always read a whole number of samples.
Daniel Elstner [Tue, 25 Feb 2014 23:29:55 +0000 (00:29 +0100)]
session: Always read a whole number of samples.

10 years agoRemove std_dev_clear() wrappers from drivers.
Bert Vermeulen [Wed, 26 Feb 2014 20:37:18 +0000 (21:37 +0100)]
Remove std_dev_clear() wrappers from drivers.

10 years agosession: Implement dev_clear().
Bert Vermeulen [Wed, 26 Feb 2014 20:35:33 +0000 (21:35 +0100)]
session: Implement dev_clear().

10 years agodevice: sr_dev_clear() now always works.
Bert Vermeulen [Wed, 26 Feb 2014 20:25:07 +0000 (21:25 +0100)]
device: sr_dev_clear() now always works.

If the driver does not provide a dev_clear() function, the wrapper
now calls std_dev_clear() instead.

10 years agoconrad-digi-35-cpu: Add missing Makefile.am, minor cosmetics.
Uwe Hermann [Wed, 12 Feb 2014 14:13:41 +0000 (15:13 +0100)]
conrad-digi-35-cpu: Add missing Makefile.am, minor cosmetics.

10 years agoconrad-digi-35-cpu: Implemented driver.
Matthias Heidbrink [Sat, 8 Feb 2014 13:26:26 +0000 (14:26 +0100)]
conrad-digi-35-cpu: Implemented driver.

10 years agoconrad-digi-35-cpu: Initial driver framework.
Matthias Heidbrink [Wed, 5 Feb 2014 18:50:46 +0000 (19:50 +0100)]
conrad-digi-35-cpu: Initial driver framework.

10 years agogmc-mh-1x-2x: Shorten driver names a bit.
Uwe Hermann [Wed, 12 Feb 2014 14:04:54 +0000 (15:04 +0100)]
gmc-mh-1x-2x: Shorten driver names a bit.

10 years agogmc-mh-1x-2x: Support for interface SI232-II with driver gmc-mh-2x-bd232.
Matthias Heidbrink [Sun, 9 Feb 2014 17:13:49 +0000 (18:13 +0100)]
gmc-mh-1x-2x: Support for interface SI232-II with driver gmc-mh-2x-bd232.

10 years agogmc-mh-1x-2x: Added new driver gmc-mh-2x-bd232.
Matthias Heidbrink [Wed, 5 Feb 2014 13:59:02 +0000 (14:59 +0100)]
gmc-mh-1x-2x: Added new driver gmc-mh-2x-bd232.

10 years agohwdriver.c: Update/extend some Doxygen comments.
Matthias Heidbrink [Wed, 5 Feb 2014 13:46:10 +0000 (14:46 +0100)]
hwdriver.c: Update/extend some Doxygen comments.

10 years agogmc-mh-1x-2x: Cleanup, docs, minor fixes.
Matthias Heidbrink [Wed, 5 Feb 2014 13:40:40 +0000 (14:40 +0100)]
gmc-mh-1x-2x: Cleanup, docs, minor fixes.

10 years agoUpdate/extend some Doxygen comments.
Matthias Heidbrink [Wed, 5 Feb 2014 13:32:21 +0000 (14:32 +0100)]
Update/extend some Doxygen comments.

10 years agoscpi_visa: Add missing callback parameter.
Daniel Elstner [Fri, 7 Feb 2014 19:20:20 +0000 (20:20 +0100)]
scpi_visa: Add missing callback parameter.

(scpi_visa_dev_inst_new): Fix serious compiler warning due to
missing drvc parameter in prototype.

10 years agoscpi_usbtmc_libusb: Consistent libusb error handling.
Uwe Hermann [Fri, 7 Feb 2014 18:42:27 +0000 (19:42 +0100)]
scpi_usbtmc_libusb: Consistent libusb error handling.

10 years agoscpi: Disable scpi_usbtmc in favor of scpi_usbtmc_libusb for now.
Uwe Hermann [Fri, 7 Feb 2014 18:01:45 +0000 (19:01 +0100)]
scpi: Disable scpi_usbtmc in favor of scpi_usbtmc_libusb for now.

Having both in the list will "find" the same device twice.

10 years agousb: remove unused sr_usb_find_usbtmc()
Aurelien Jacobs [Tue, 4 Feb 2014 22:19:02 +0000 (23:19 +0100)]
usb: remove unused sr_usb_find_usbtmc()

10 years agoscpi: add a libusb based implementation of usbtmc
Aurelien Jacobs [Fri, 17 Jan 2014 09:49:00 +0000 (10:49 +0100)]
scpi: add a libusb based implementation of usbtmc

10 years agohameg-hmo: use the new scpi scan API
Aurelien Jacobs [Sun, 2 Feb 2014 20:50:14 +0000 (21:50 +0100)]
hameg-hmo: use the new scpi scan API

10 years agorigol-ds: use the new scpi scan API
Aurelien Jacobs [Sun, 2 Feb 2014 20:49:57 +0000 (21:49 +0100)]
rigol-ds: use the new scpi scan API

10 years agoscpi: add a generic scan API and implement it in usbtmc and serial transport
Aurelien Jacobs [Sun, 2 Feb 2014 20:47:45 +0000 (21:47 +0100)]
scpi: add a generic scan API and implement it in usbtmc and serial transport

note that sr_usb_find_serial() is copied from the hameg-hmo driver

10 years agoscpi: add a struct drv_context parameter to scpi_dev_inst_new()
Aurelien Jacobs [Fri, 17 Jan 2014 09:47:42 +0000 (10:47 +0100)]
scpi: add a struct drv_context parameter to scpi_dev_inst_new()

10 years agolibsigrok-internal.h: endian neutral helper macro to write 8/16/32 bits integer to...
Aurelien Jacobs [Sun, 2 Feb 2014 20:33:09 +0000 (21:33 +0100)]
libsigrok-internal.h: endian neutral helper macro to write 8/16/32 bits integer to unaligned memory

10 years agolibsigrok-internal.h: add helper macro to read 8 bits integer
Aurelien Jacobs [Sun, 2 Feb 2014 20:29:34 +0000 (21:29 +0100)]
libsigrok-internal.h: add helper macro to read 8 bits integer
matching the 16 and 32 bits one

10 years agorigol-ds: apply :KEY:LOCK DISABLE only to DS1K
Aurelien Jacobs [Sun, 2 Feb 2014 20:46:20 +0000 (21:46 +0100)]
rigol-ds: apply :KEY:LOCK DISABLE only to DS1K

10 years agorigol-ds: properly end WAIT_TRIGGER event handling
Aurelien Jacobs [Sun, 2 Feb 2014 20:44:26 +0000 (21:44 +0100)]
rigol-ds: properly end WAIT_TRIGGER event handling

10 years agorigol-ds: properly deal with dev_close() getting called multiple times
Aurelien Jacobs [Sun, 2 Feb 2014 21:09:01 +0000 (22:09 +0100)]
rigol-ds: properly deal with dev_close() getting called multiple times

10 years agoFix building without librevisa.
Martin Ling [Mon, 3 Feb 2014 00:21:33 +0000 (16:21 -0800)]
Fix building without librevisa.

10 years agooutput/vcd: Extend output stream to last sample.
Daniel Elstner [Tue, 4 Feb 2014 23:56:49 +0000 (00:56 +0100)]
output/vcd: Extend output stream to last sample.

(receive): Write a dummy timestamp after the last sample
to indicate the length of the sampled stream.

10 years agoinput/vcd: Remove debug output from inner loops.
Daniel Elstner [Tue, 4 Feb 2014 23:25:32 +0000 (00:25 +0100)]
input/vcd: Remove debug output from inner loops.

(parse_contents): Do not call sr_dbg() on every signal change.
This would be excessive even for sr_spew().
(read_until): Do not call ftell() just to be able to show some
number in a debug message later on.

10 years agoinput/vcd: Avoid truncation of shift to 32 bits.
Daniel Elstner [Mon, 3 Feb 2014 00:54:20 +0000 (01:54 +0100)]
input/vcd: Avoid truncation of shift to 32 bits.

(parse_contents): Cast constant 1 to uint64_t before shifting left.
Also fix whitespace errors.

10 years agoscpi_visa.c: Minor cosmetics.
Uwe Hermann [Sun, 2 Feb 2014 23:24:13 +0000 (00:24 +0100)]
scpi_visa.c: Minor cosmetics.

10 years agoAdd librevisa SCPI backend.
Martin Ling [Sat, 1 Feb 2014 10:01:05 +0000 (10:01 +0000)]
Add librevisa SCPI backend.

10 years agovcd: Remove bogus $dumpvars and $dumpoff commands.
Daniel Elstner [Thu, 30 Jan 2014 21:11:10 +0000 (22:11 +0100)]
vcd: Remove bogus $dumpvars and $dumpoff commands.

These commands are superfluous and do not seem to make sense in
the context they were used.  Also, $dumpvars was missing an $end,
and $dumpoff was used without any content.

10 years agovcd: Output timestamp only once per change.
Daniel Elstner [Thu, 30 Jan 2014 20:57:49 +0000 (21:57 +0100)]
vcd: Output timestamp only once per change.

Avoid writing a new timestamp for every changed signal if multiple
signals change state simultaneously.  Also, keep signal transitions
on the same line with their timestamp to make the output easier to
inspect in a text editor.  (VCD does not care whether newlines or
spaces are used to separate tokens.)

10 years agovcd: Fix output for more than 8 channels.
Daniel Elstner [Thu, 30 Jan 2014 19:49:36 +0000 (20:49 +0100)]
vcd: Fix output for more than 8 channels.

(receive): Use probe index for sample byte selection too, not just
for bit selection.  Also simplify the indexing expressions a bit.
This fixes the problem of incorrect output for probes indices 8 to
31.
Also, use double rather than float in the timestamp calculation,
and format the result directly as floating point number rather than
converting it back to uint64_t.
Additionally, make sure that the state of all signals is written
for the very first sample in the stream.  This fixes the problem
that signals would be displayed as indeterminate until the first
change.
(context.samplecount): Make the sample counter part of the context
struct, rather than keeping it as a global static.

10 years agoDrop unneeded comments.
Uwe Hermann [Thu, 30 Jan 2014 16:52:44 +0000 (17:52 +0100)]
Drop unneeded comments.

10 years agosr_probe->index is no longer deprecated (for now).
Uwe Hermann [Thu, 30 Jan 2014 16:48:10 +0000 (17:48 +0100)]
sr_probe->index is no longer deprecated (for now).

10 years agoconfigure.ac: Only check for things we actually use.
Uwe Hermann [Thu, 30 Jan 2014 16:02:34 +0000 (17:02 +0100)]
configure.ac: Only check for things we actually use.

Drop checks where we don't use the result (yet). We might bring back
some of those once we start actually using the result in the code.

10 years agosysclk-lwla: Implement SR_CONF_CLOCK_EDGE setting.
Daniel Elstner [Wed, 29 Jan 2014 23:31:42 +0000 (00:31 +0100)]
sysclk-lwla: Implement SR_CONF_CLOCK_EDGE setting.

10 years agohwdriver: Add SR_CONF_CLOCK_EDGE option.
Daniel Elstner [Wed, 29 Jan 2014 19:53:51 +0000 (20:53 +0100)]
hwdriver: Add SR_CONF_CLOCK_EDGE option.

Allow the edge of an external clock input to be configured by
means of an SR_CONF_CLOCK_EDGE configuration setting.  This is
a string option with the same format as SR_CONF_TRIGGER_SLOPE.

10 years agools: Code cleanup and more debug output.
Bert Vermeulen [Thu, 30 Jan 2014 10:58:07 +0000 (11:58 +0100)]
ols: Code cleanup and more debug output.

10 years agools: Fix endianness problems in protocol.
Bert Vermeulen [Wed, 29 Jan 2014 07:22:02 +0000 (08:22 +0100)]
ols: Fix endianness problems in protocol.

10 years agosysclk-lwla: Add support for external trigger input.
Daniel Elstner [Sun, 26 Jan 2014 20:42:22 +0000 (21:42 +0100)]
sysclk-lwla: Add support for external trigger input.

Implement the configuration setting TRIGGER_SOURCE with the
choices CH (logic channels) and TRG (external trigger input).
Also implement the TRIGGER_SLOPE setting for selecting the
edge to trigger on (rising or falling).

10 years agosysclk-lwla: Simplify and optimize word extraction.
Daniel Elstner [Sun, 26 Jan 2014 19:28:59 +0000 (20:28 +0100)]
sysclk-lwla: Simplify and optimize word extraction.

It turns out that all LWLA protocol responses consist either
of 32-bit units or of 32-bit units combined into 64-bit units.
Thus it makes sense to double the basic unit size for reading
from 16 bit to 32 bit.
We cannot do the same for command messages though, as those
actually do use 16-bit quantities in some places, and 32-bit
arguments are not always aligned to 32-bit boundaries.

(acquisition_state.xfer_buf_in): Change unit type to uint32_t,
and update related macros and code accordingly.
(LWLA_TO_UINT32): New macro to replace LWLA_READ32, operating
directly on 32-bit values instead of pointers to 16-bit units.
Make use of a compiler-recognized idiom for bitwise rotation
to efficiently swap the 16-bit halves of a 32-bit word.
(LWLA_TO_UINT16): New macro to replace LWLA_READ16.
(LWLA_READ64): Remove unused macro.
(LWLA_WORD_[0123]): Slightly simplify 16-bit word extraction.

10 years agosysclk-lwla: Limit use of SR_ERR_ARG to user-supplied arguments.
Daniel Elstner [Sat, 25 Jan 2014 22:27:40 +0000 (23:27 +0100)]
sysclk-lwla: Limit use of SR_ERR_ARG to user-supplied arguments.

The return code SR_ERR_ARG is intended for reporting unsupported
or inapplicable device configuration settings and is not a hard
error.  In order to indicate failure of internal sanity checks,
use SR_ERR_BUG instead.

10 years agoscpi: Limit the log message in get_string() to 70 characters.
poljar (Damir Jelić) [Tue, 28 Jan 2014 16:13:00 +0000 (17:13 +0100)]
scpi: Limit the log message in get_string() to 70 characters.

10 years agodemo: Cast to double while calculating the pattern frequency.
poljar (Damir Jelić) [Sun, 26 Jan 2014 20:30:57 +0000 (21:30 +0100)]
demo: Cast to double while calculating the pattern frequency.

Without the cast non integer frequencies weren't possible (e.g. with a sampling
frequency of 50Hz we would end up with a signal frequency of 2Hz instead of
2.5Hz). The result were signals which had an incorrect number of samples per
period.

BugLink: http://sigrok.org/bugzilla/show_bug.cgi?id=297
10 years agorigol-ds: Deal with dev_close() getting called multiple times.
Bert Vermeulen [Mon, 27 Jan 2014 20:19:41 +0000 (21:19 +0100)]
rigol-ds: Deal with dev_close() getting called multiple times.

10 years agohwdriver: Change TRIGGER_SLOPE setting to string type.
Daniel Elstner [Sun, 26 Jan 2014 23:22:01 +0000 (00:22 +0100)]
hwdriver: Change TRIGGER_SLOPE setting to string type.

Drivers interpreted the uint64 values to the SR_CONF_TRIGGER_SLOPE
configuration setting in different ways.  In order to orthogonalize
the API, change the type of the setting to a string with the same
format as uses for logic probes.

10 years agodemo: Require sample limit.
Bert Vermeulen [Sat, 25 Jan 2014 20:20:29 +0000 (21:20 +0100)]
demo: Require sample limit.

10 years agosysclk-lwla: Load bitstream files in RBF format.
Daniel Elstner [Sat, 25 Jan 2014 01:21:19 +0000 (02:21 +0100)]
sysclk-lwla: Load bitstream files in RBF format.

Modify the bitstream loading routine to work directly with the
Raw Binary Files (.rbf) generated by Altera tools.  Previously,
a custom format was used which was basically an RBF preceded by
a 4-byte header specifying the transfer length.

10 years agodemo: Keep separate counters for logic and analog sources.
Bert Vermeulen [Sat, 25 Jan 2014 19:39:50 +0000 (20:39 +0100)]
demo: Keep separate counters for logic and analog sources.

Since they have different internal buffer sizes, their output counters
are not in sync. See bug 295.

10 years agoProperly publish samplerate when loading session file.
Bert Vermeulen [Sat, 25 Jan 2014 11:44:00 +0000 (12:44 +0100)]
Properly publish samplerate when loading session file.

10 years agosr file format: Bump version to 2.
Uwe Hermann [Thu, 23 Jan 2014 21:45:08 +0000 (22:45 +0100)]
sr file format: Bump version to 2.

The *.sr (libsigrok session) file format has changed since the last
libsigrok release. Frontends using older libsigrok versions will not
be able to read *.sr files created by frontends using the new file format.

Thus, bump the version number of the file format to 2.

Current libsigrok will read both version 1 and version 2 files
correctly, and always write version 2 files.

10 years agorigol-ds: Fix a couple of compile warnings.
Martin Ling [Thu, 23 Jan 2014 10:13:54 +0000 (10:13 +0000)]
rigol-ds: Fix a couple of compile warnings.

10 years agooutput/csv: Drop last separators as needed.
Bert Vermeulen [Thu, 23 Jan 2014 22:11:34 +0000 (23:11 +0100)]
output/csv: Drop last separators as needed.

10 years agosysclk-lwla: Implement config_commit() callback.
Daniel Elstner [Thu, 23 Jan 2014 01:35:51 +0000 (02:35 +0100)]
sysclk-lwla: Implement config_commit() callback.

Move pre-acquisition hardware setup to the new config_commit()
callback.  At the moment, the only setting applied at commit
time is switching the clock source, which involves uploading
a new bitstream to the FPGA.

10 years agosysclk-lwla: Implement config_probe_set() callback.
Daniel Elstner [Thu, 23 Jan 2014 01:27:58 +0000 (02:27 +0100)]
sysclk-lwla: Implement config_probe_set() callback.

Move setup of channels and trigger masks to the new probe
configuration callback.  Although the actual hardware setup
still happens just before acquisition, the new approach
already has the advantage that invalid settings are caught
early.
Also, it turns out that the LWLA1034 allows triggering on
channels which are not enabled for data acquisition.  This
feature is now supported as well.