]> sigrok.org Git - libsigrok.git/log
libsigrok.git
8 years agoinput: vcd: allow optional index item
Wolfram Sang [Wed, 30 Dec 2015 21:04:38 +0000 (22:04 +0100)]
input: vcd: allow optional index item

A $var block can have an optional index item which looks like '[<sth>]'.
Parse it, too, and append it to the channel name.

This fixes bug #322. A first version was posted by Simon Richter. This
version is rebased and simplified.

Signed-off-by: Wolfram Sang <redacted>
8 years agohameg-hmo: Fix some compiler warnings.
Uwe Hermann [Thu, 28 Jan 2016 17:46:55 +0000 (18:46 +0100)]
hameg-hmo: Fix some compiler warnings.

8 years agohameg-hmo: Replace floating point comparison for vdiv
Soeren Apel [Fri, 8 Jan 2016 22:02:20 +0000 (23:02 +0100)]
hameg-hmo: Replace floating point comparison for vdiv

This should fix bug #731.

8 years agoTrace32 import module: Send trigger only once
Soeren Apel [Fri, 8 Jan 2016 22:00:55 +0000 (23:00 +0100)]
Trace32 import module: Send trigger only once

As we're downsampling, several record time stamps can match the specified
trigger time. For this reason, it's possible that several trigger packets
are sent when a file is loaded. This prevents the issue and sends a
trigger packet only on the first matching record.

8 years agoImplement Ruby bindings on top of SWIG/C++ bindings.
Aurelien Jacobs [Mon, 11 Jan 2016 13:31:47 +0000 (14:31 +0100)]
Implement Ruby bindings on top of SWIG/C++ bindings.

8 years agoMakefile: use PYSIGROK_FLAGS only for building python bindings
Aurelien Jacobs [Mon, 11 Jan 2016 13:32:22 +0000 (14:32 +0100)]
Makefile: use PYSIGROK_FLAGS only for building python bindings

8 years agoUse ALL_ZERO in a few more places.
Uwe Hermann [Thu, 7 Jan 2016 22:46:36 +0000 (23:46 +0100)]
Use ALL_ZERO in a few more places.

8 years agolecroy-logicstudio: Fix some compiler warnings on MinGW.
Uwe Hermann [Thu, 7 Jan 2016 22:22:42 +0000 (23:22 +0100)]
lecroy-logicstudio: Fix some compiler warnings on MinGW.

src/hardware/lecroy-logicstudio/protocol.c: In function 'handle_fetch_samples_done':
src/hardware/lecroy-logicstudio/protocol.c:261:3: warning: passing argument 6 of 'libusb_fill_bulk_transfer' from incompatible pointer type
   recv_bulk_transfer, (void *)sdi, USB_TIMEOUT_MS);
   ^
In file included from ./src/libsigrok-internal.h:31:0,
                 from src/hardware/lecroy-logicstudio/protocol.h:26,
                 from src/hardware/lecroy-logicstudio/protocol.c:23:
/home/uwe/sr_mingw/include/libusb-1.0/libusb.h:1546:20: note: expected 'libusb_transfer_cb_fn' but argument is of type 'void (*)(struct libusb_transfer *)'
 static inline void libusb_fill_bulk_transfer(struct libusb_transfer *transfer,
                    ^
src/hardware/lecroy-logicstudio/protocol.c: In function 'fetch_samples_async':
src/hardware/lecroy-logicstudio/protocol.c:314:4: warning: passing argument 6 of 'write_registers_async' from incompatible pointer type
    handle_fetch_samples_done);
    ^
src/hardware/lecroy-logicstudio/protocol.c:200:12: note: expected 'libusb_transfer_cb_fn' but argument is of type 'void (*)(struct libusb_transfer *)'
 static int write_registers_async(const struct sr_dev_inst *sdi,
            ^
src/hardware/lecroy-logicstudio/protocol.c: In function 'lls_start_acquisition':
src/hardware/lecroy-logicstudio/protocol.c:1122:3: warning: passing argument 6 of 'libusb_fill_interrupt_transfer' from incompatible pointer type
   recv_intr_transfer, (void *) sdi, USB_TIMEOUT_MS);
   ^
In file included from ./src/libsigrok-internal.h:31:0,
                 from src/hardware/lecroy-logicstudio/protocol.h:26,
                 from src/hardware/lecroy-logicstudio/protocol.c:23:
/home/uwe/sr_mingw/include/libusb-1.0/libusb.h:1602:20: note: expected 'libusb_transfer_cb_fn' but argument is of type 'void (*)(struct libusb_transfer *)'
 static inline void libusb_fill_interrupt_transfer(
                    ^

8 years agosysclk-lwla: Minor whitespace and consistency fixes.
Uwe Hermann [Wed, 23 Dec 2015 14:25:18 +0000 (15:25 +0100)]
sysclk-lwla: Minor whitespace and consistency fixes.

8 years agoMinor whitespace and cosmetic fixes.
Uwe Hermann [Tue, 22 Dec 2015 18:36:19 +0000 (19:36 +0100)]
Minor whitespace and cosmetic fixes.

8 years agodmm: vc870: drop unused variable
Wolfram Sang [Sun, 3 Jan 2016 21:27:45 +0000 (22:27 +0100)]
dmm: vc870: drop unused variable

There is no status bit for RMS. We know about RMS if certain modes are
active. So, drop this superfluous variable.

Signed-off-by: Wolfram Sang <redacted>
8 years agodmm: vc870: support effective voltage & current
Wolfram Sang [Sun, 3 Jan 2016 21:27:44 +0000 (22:27 +0100)]
dmm: vc870: support effective voltage & current

And rename the status variable because in sigrok the term RMS is used
instead of "effective value".

Signed-off-by: Wolfram Sang <redacted>
8 years agodmm: vc870: render POWER_FACTOR as such and not as frequency
Wolfram Sang [Sun, 3 Jan 2016 21:27:43 +0000 (22:27 +0100)]
dmm: vc870: render POWER_FACTOR as such and not as frequency

The primary display is the power factor, the secondary is the frequency.
This got mixed up, so change the order. We also need to fix the
conversion factor.

Signed-off-by: Wolfram Sang <redacted>
8 years agodmm: vc870: keep the order when processing modes
Wolfram Sang [Sun, 3 Jan 2016 21:27:42 +0000 (22:27 +0100)]
dmm: vc870: keep the order when processing modes

is_power_apparent_power is index 0 of function 0x39, so it is better to
process it first and the later indices after that (we need to add
another one with a different patch later).

Signed-off-by: Wolfram Sang <redacted>
8 years agodmm: vc870: fix AC conversion factors
Wolfram Sang [Sun, 3 Jan 2016 21:27:41 +0000 (22:27 +0100)]
dmm: vc870: fix AC conversion factors

Testing showed that AC current needs to be handled different from DC.
Note that ACA is still untested because of limited testing equipment.

Signed-off-by: Wolfram Sang <redacted>
8 years agodmm: vc870: show display value properly in debug output
Wolfram Sang [Sun, 3 Jan 2016 21:27:40 +0000 (22:27 +0100)]
dmm: vc870: show display value properly in debug output

It was confusing to see the display value (5 digits) printed in debug
output as a float. Print it the same way as shown on the real device,
without comma, of course.
This also allows to simplify the code a little.

Signed-off-by: Wolfram Sang <redacted>
8 years agoresource: Replace ssize_t with gssize to avoid unistd.h
Daniel Elstner [Mon, 4 Jan 2016 17:53:30 +0000 (18:53 +0100)]
resource: Replace ssize_t with gssize to avoid unistd.h

8 years agopython: Provide sensible __str__ and __repr__ functions for enum values.
Martin Ling [Sun, 3 Jan 2016 22:22:57 +0000 (22:22 +0000)]
python: Provide sensible __str__ and __repr__ functions for enum values.

This fixes bug #668.

8 years agoproto.h: Add missing unistd.h #include.
Uwe Hermann [Sun, 3 Jan 2016 02:00:45 +0000 (03:00 +0100)]
proto.h: Add missing unistd.h #include.

The ssize_t and size_t usage requires the unistd.h #include.

Thanks to Daniel Glöckner for the bug report.

This fixes bug #721.

8 years agobaylibre-acme: Replace g_close() with close() for now.
Uwe Hermann [Sun, 3 Jan 2016 01:51:01 +0000 (02:51 +0100)]
baylibre-acme: Replace g_close() with close() for now.

This g_close(), the only one in the whole code-base, would unnecessarily
raise the minimum glib version to 2.36.

Thanks to Daniel Glöckner for the report.

This fixes bug #724.

8 years agoC++: Avoid std::map::emplace() for GCC 4.7 compatibility
Daniel Elstner [Wed, 30 Dec 2015 17:39:48 +0000 (18:39 +0100)]
C++: Avoid std::map::emplace() for GCC 4.7 compatibility

This fixes bug #720.

8 years agosrc/backend.c: Add missing winsock2.h #include.
Uwe Hermann [Sat, 2 Jan 2016 23:39:44 +0000 (00:39 +0100)]
src/backend.c: Add missing winsock2.h #include.

8 years agowin32: Call WSAStartup() at sr_init() time.
Martin Ling [Tue, 29 Dec 2015 23:49:15 +0000 (23:49 +0000)]
win32: Call WSAStartup() at sr_init() time.

Should fix bug #692.

8 years agoRename sr_driver_scan_options() to sr_driver_scan_options_list().
Uwe Hermann [Thu, 31 Dec 2015 17:47:55 +0000 (18:47 +0100)]
Rename sr_driver_scan_options() to sr_driver_scan_options_list().

8 years agoRename sr_dev_config_capabilities() to sr_dev_config_capabilities_list().
Uwe Hermann [Thu, 31 Dec 2015 17:45:17 +0000 (18:45 +0100)]
Rename sr_dev_config_capabilities() to sr_dev_config_capabilities_list().

8 years agoRestore number "categories" in sr_configkey.
Uwe Hermann [Thu, 31 Dec 2015 17:43:18 +0000 (18:43 +0100)]
Restore number "categories" in sr_configkey.

8 years agoMake SR_CONF_MASK an internal constant.
Martin Ling [Tue, 3 Nov 2015 01:59:42 +0000 (01:59 +0000)]
Make SR_CONF_MASK an internal constant.

8 years agoMake SR_CONF_{SCAN,DEVICE}_OPTIONS into internal constants.
Martin Ling [Mon, 2 Nov 2015 01:03:07 +0000 (01:03 +0000)]
Make SR_CONF_{SCAN,DEVICE}_OPTIONS into internal constants.

These are no longer needed in the public API as we have new wrapper functions.
They are still used internally by drivers.

8 years agobindings: New configuration enumeration API.
Martin Ling [Mon, 2 Nov 2015 22:05:02 +0000 (22:05 +0000)]
bindings: New configuration enumeration API.

The new methods wrap the new libsigrok C API helper functions and eliminate
the need to pass complex types back to the user and wrap them with SWIG.

Fixes bugs #479 and #480.

8 years agoAdd new sr_driver_scan_options() helper function.
Martin Ling [Mon, 2 Nov 2015 00:23:23 +0000 (00:23 +0000)]
Add new sr_driver_scan_options() helper function.

This function replaces the pattern of calling config_list() with
SR_CONF_SCAN_OPTIONS to obtain a list of scan options.

8 years agoAdd new sr_dev_options() helper function.
Martin Ling [Mon, 2 Nov 2015 00:40:40 +0000 (00:40 +0000)]
Add new sr_dev_options() helper function.

This function replaces the pattern of calling config_list() with
SR_CONF_DEVICE_OPTIONS to obtain a list of device options. Note
that this does not include the SR_CONF_{GET,SET,LIST} bitmask,
which is now retrieved for a specific key by calling
sr_dev_config_capabilties().

8 years agoAdd new sr_dev_config_capabilities() helper function.
Martin Ling [Mon, 2 Nov 2015 21:35:26 +0000 (21:35 +0000)]
Add new sr_dev_config_capabilities() helper function.

8 years agobindings: Wrap enum sr_configcap as Capability class.
Martin Ling [Mon, 2 Nov 2015 20:52:00 +0000 (20:52 +0000)]
bindings: Wrap enum sr_configcap as Capability class.

8 years agoMake SR_CONF_{GET,SET,LIST} into a new enum.
Martin Ling [Mon, 2 Nov 2015 20:46:28 +0000 (20:46 +0000)]
Make SR_CONF_{GET,SET,LIST} into a new enum.

8 years agosrc/usb.c: Only allow hex characters in CONN_USB_VIDPID.
Uwe Hermann [Sun, 27 Dec 2015 11:26:06 +0000 (12:26 +0100)]
src/usb.c: Only allow hex characters in CONN_USB_VIDPID.

(and also allow case-insensitive specification)

Thanks to Hannu Vuolasaho for the fix.

8 years agomodbus: silence a build warning
Wolfram Sang [Tue, 29 Dec 2015 11:45:07 +0000 (12:45 +0100)]
modbus: silence a build warning

Refactor handling the size of modbus_devs, so it doesn't produce a build
warning and still allows the compiler to remove unused code.

This fixes bug #637. It could be reverted once modbus_devs
unconditionally has a member in the struct.

Signed-off-by: Wolfram Sang <redacted>
8 years agoPrefer postfix-increment for consistency across the code-base.
Uwe Hermann [Tue, 22 Dec 2015 19:15:57 +0000 (20:15 +0100)]
Prefer postfix-increment for consistency across the code-base.

Only when there are technical reasons use prefix-increment.

8 years agokorad-kaxxxxp: Add workaround for a Korad KA3005P issue.
Uwe Hermann [Fri, 25 Dec 2015 22:20:00 +0000 (23:20 +0100)]
korad-kaxxxxp: Add workaround for a Korad KA3005P issue.

In some situations, the reply to the *IDN? command contains an
additional trailing 0x01 byte for unknown reasons.

This issue seems to be reproducible by changing the voltage using the knobs
on the device, then turning on the output and turning it off again.

The next korad-kaxxxxp scan() operation would contain the trailing 0x01
byte, which would lead to the detection of the device in libsigrok no
longer working until the next power-cycle.

Work around this issue by treating both the ID string with and without
the trailing 0x01 byte as valid.

8 years agokorad-kaxxxxp: Add support for the Velleman PS3005D.
Uwe Hermann [Thu, 24 Dec 2015 00:19:11 +0000 (01:19 +0100)]
korad-kaxxxxp: Add support for the Velleman PS3005D.

8 years agosysclk-lwla: Use static array for LWLA1034 init sequence
Daniel Elstner [Tue, 22 Dec 2015 22:42:36 +0000 (23:42 +0100)]
sysclk-lwla: Use static array for LWLA1034 init sequence

Just as in the LWLA1016 initialization, make use of a static array
for the constant part of the LWLA1034 capture setup sequence.

8 years agosysclk-lwla: Attempt initialization three times
Daniel Elstner [Tue, 22 Dec 2015 14:52:40 +0000 (15:52 +0100)]
sysclk-lwla: Attempt initialization three times

This is a desperate measure to improve the success rate of device
initialization even after it got into a bad state. Combine this
with a reduced USB timeout (1 second) so that if it fails, it fails
quickly. Also ignore USB errors from the initial dummy read of the
device test ID.

8 years agosysclk-lwla: Use static array for init sequence
Daniel Elstner [Sat, 5 Dec 2015 17:16:39 +0000 (18:16 +0100)]
sysclk-lwla: Use static array for init sequence

8 years agosysclk-lwla: Work around short transfer quirk
Daniel Elstner [Sat, 5 Dec 2015 16:47:52 +0000 (17:47 +0100)]
sysclk-lwla: Work around short transfer quirk

Detect whether the FX2 firmware of the LWLA device exhibits the
short transfer bug. If so, work around the problem by limiting
reads to at most 64 bytes at a time. This slows down the memory
read after acquisition quite noticably, but makes the device
usable even in adverse conditions.

8 years agosysclk-lwla: Skip unused registers in status poll
Daniel Elstner [Sat, 5 Dec 2015 09:06:15 +0000 (10:06 +0100)]
sysclk-lwla: Skip unused registers in status poll

Reduce the number of long registers read in bulk during status
polling from 10 to 5. The LWLA1034 driver used to do that already
in an earlier iteration, which was then changed to be more like
the original vendor software. The reason for bringing it back now
is that it reduces the response size to 40 bytes, which works
around the spurious 64 byte limit bug in the FX2 firmware of the
LWLA devices.

8 years agosysclk-lwla: Declare model_info structs as extern
Daniel Elstner [Mon, 14 Dec 2015 20:47:46 +0000 (21:47 +0100)]
sysclk-lwla: Declare model_info structs as extern

This fixes bug 714.

8 years agosysclk-lwla: Close USB handle on drain error
Daniel Elstner [Sat, 5 Dec 2015 09:41:16 +0000 (10:41 +0100)]
sysclk-lwla: Close USB handle on drain error

8 years agosysclk-lwla: Various cosmetic improvements
Daniel Elstner [Fri, 4 Dec 2015 19:08:07 +0000 (20:08 +0100)]
sysclk-lwla: Various cosmetic improvements

8 years agoAdd the Lauterbach Trace32 logic analyzer data import module
Soeren Apel [Sun, 20 Dec 2015 19:20:56 +0000 (20:20 +0100)]
Add the Lauterbach Trace32 logic analyzer data import module

8 years agoAdd RL64 and RL64S endianness helper macros
Soeren Apel [Mon, 7 Dec 2015 19:26:11 +0000 (20:26 +0100)]
Add RL64 and RL64S endianness helper macros

8 years agoWhitespace fixes
Soeren Apel [Mon, 7 Dec 2015 19:14:19 +0000 (20:14 +0100)]
Whitespace fixes

8 years agoinput/raw_analog: Fix two compiler warnings.
Uwe Hermann [Mon, 21 Dec 2015 15:22:44 +0000 (16:22 +0100)]
input/raw_analog: Fix two compiler warnings.

../src/input/raw_analog.c:63:67: warning: integer overflow in expression [-Woverflow]
  { "S32_LE",     { 4, TRUE,  FALSE, FALSE, 0, TRUE, { 1, INT32_MAX+1}, { 0, 1}}},
                                                                   ^
../src/input/raw_analog.c:65:67: warning: integer overflow in expression [-Woverflow]
  { "S32_BE",     { 4, TRUE,  FALSE, TRUE,  0, TRUE, { 1, INT32_MAX+1}, { 0, 1}}},
                                                                   ^

8 years agoinput/raw_analog: Use ARRAY_SIZE.
Uwe Hermann [Mon, 21 Dec 2015 14:58:03 +0000 (15:58 +0100)]
input/raw_analog: Use ARRAY_SIZE.

8 years agoinput/raw_analog: set scale and offset appropriately
Stefan Brüns [Sun, 29 Nov 2015 07:03:57 +0000 (08:03 +0100)]
input/raw_analog: set scale and offset appropriately

8 years agoinput/raw_analog: Add input module for raw analog signals
Stefan Brüns [Sat, 28 Nov 2015 18:55:12 +0000 (19:55 +0100)]
input/raw_analog: Add input module for raw analog signals

8 years agoanalog: add conversion from various integer formats to float
Stefan Brüns [Wed, 25 Nov 2015 00:41:41 +0000 (01:41 +0100)]
analog: add conversion from various integer formats to float

8 years agoinput/wav: initialize channel list before going into ready state
Stefan Brüns [Sat, 28 Nov 2015 15:52:08 +0000 (16:52 +0100)]
input/wav: initialize channel list before going into ready state

The sr_input_dev_inst_get API documentation guarantees an input is fully
initialized as soon as the device instance is returned. An sdi
implementation should not set sdi_ready any earlier.

This fixes parts of bug #387.

8 years agobindings/cxx: make sure the config value reference is kept
Stefan Brüns [Sat, 28 Nov 2015 22:18:50 +0000 (23:18 +0100)]
bindings/cxx: make sure the config value reference is kept

fixes glib warning:
GLib-CRITICAL **: g_variant_unref: assertion 'value->ref_count > 0' failed

8 years agoz60_libsigrok.rules: Add udev rule for LeCroy LogicStudio16.
Tilman Sauerbeck [Sun, 29 Nov 2015 19:49:40 +0000 (20:49 +0100)]
z60_libsigrok.rules: Add udev rule for LeCroy LogicStudio16.

8 years agolecroy-logicstudio: Initial driver implementation.
Tilman Sauerbeck [Thu, 8 Oct 2015 18:13:53 +0000 (20:13 +0200)]
lecroy-logicstudio: Initial driver implementation.

This supports both 8 and 16 channel modes with samplerates up to
500 MHz. Voltage thresholds are currently fixed at 1.58V.

8 years agoAdd the RB64 macro.
Tilman Sauerbeck [Mon, 16 Nov 2015 18:47:04 +0000 (19:47 +0100)]
Add the RB64 macro.

Reads an unsigned 64 bit integer from memory.

8 years agobindings: Fix doc extraction for enums
Marcus Comstedt [Sun, 8 Nov 2015 16:37:34 +0000 (17:37 +0100)]
bindings: Fix doc extraction for enums

The source file enum.hpp was not found when not building in the source
tree.  Also, extraction of the brief description did not work correctly
when there was additional XML markup inside the <para> element.

8 years agokorad-kaxxxxp: Workaround for Korad device bug
Hannu Vuolasaho [Fri, 27 Nov 2015 18:10:14 +0000 (20:10 +0200)]
korad-kaxxxxp: Workaround for Korad device bug

The sixth character from ISET? is read and discarded. If the device is
turned off and on again, this won't be there and causes 10 ms delay in
every ISET? Luckily, this value isn't queried that often. To get the
sixth byte, the *IDN? command has to be issued before ISET?.

8 years agokorad-kaxxxxp: Fix typo in Korad driver device enum
Hannu Vuolasaho [Mon, 30 Nov 2015 20:47:56 +0000 (22:47 +0200)]
korad-kaxxxxp: Fix typo in Korad driver device enum

9 years agooutput/wav: use the right buffer for SR_DF_ANALOG
Stefan Brüns [Tue, 24 Nov 2015 21:31:35 +0000 (22:31 +0100)]
output/wav: use the right buffer for SR_DF_ANALOG

9 years agoinput/wav: fix and simplify conversion of integer samples
Stefan Brüns [Tue, 24 Nov 2015 20:03:04 +0000 (21:03 +0100)]
input/wav: fix and simplify conversion of integer samples

Size of individual samples is specified by unitsize, not samplesize.
The sample immediate is not necessary.

9 years agoinput/wav: increase search range for data chunk, report errors
Stefan Brüns [Tue, 24 Nov 2015 19:55:14 +0000 (20:55 +0100)]
input/wav: increase search range for data chunk, report errors

9 years agoinput/wav: fix error in offset calculation
Stefan Brüns [Sun, 22 Nov 2015 21:14:15 +0000 (22:14 +0100)]
input/wav: fix error in offset calculation

9 years agooutput/wav: track and free memory for float conversion buffer
Stefan Brüns [Thu, 26 Nov 2015 23:44:50 +0000 (00:44 +0100)]
output/wav: track and free memory for float conversion buffer

9 years agoinput: fix leak of config data in several input modules
Stefan Brüns [Thu, 26 Nov 2015 21:55:55 +0000 (22:55 +0100)]
input: fix leak of config data in several input modules

9 years agooutput: fix options memory leak
Stefan Brüns [Thu, 26 Nov 2015 03:29:28 +0000 (04:29 +0100)]
output: fix options memory leak

9 years agooutput/analog: track and free memory for float conversion buffer
Stefan Brüns [Thu, 26 Nov 2015 02:07:47 +0000 (03:07 +0100)]
output/analog: track and free memory for float conversion buffer

==18779== 800,000 bytes in 196 blocks are definitely lost in loss record 29 of 29
==18779==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==18779==    by 0x4E635C3: receive (analog.c:319)
==18779==    by 0x40870B: datafeed_in (session.c:316)
==18779==    by 0x4E59D4E: sr_session_send (session.c:1201)
==18779==    by 0x4E59F8B: sr_session_send (session.c:1159)
==18779==    by 0x4E62595: send_chunk (wav.c:234)
==18779==    by 0x4E62A06: process_buffer (wav.c:290)
==18779==    by 0x40954A: load_input_file_module (input.c:123)
==18779==    by 0x4097AB: load_input_file (input.c:157)
==18779==    by 0x40531E: main (main.c:288)

9 years agosession: free memory for datafeed callbacks, reported by valgrind
Stefan Brüns [Thu, 26 Nov 2015 02:04:39 +0000 (03:04 +0100)]
session: free memory for datafeed callbacks, reported by valgrind

==17549== 32 (16 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record 22 of 39
==17549==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==17549==    by 0x5359200: g_malloc (in /usr/lib64/libglib-2.0.so.0.4200.2)
==17549==    by 0x536EE2D: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.4200.2)
==17549==    by 0x5370165: g_slist_append (in /usr/lib64/libglib-2.0.so.0.4200.2)
==17549==    by 0x4E595C3: sr_session_datafeed_callback_add (session.c:512)
==17549==    by 0x409527: load_input_file_module (input.c:111)
==17549==    by 0x4097AB: load_input_file (input.c:157)
==17549==    by 0x40531E: main (main.c:288)

9 years agosession: fix use after free of session->devs as reported by valgrind
Stefan Brüns [Thu, 26 Nov 2015 01:30:42 +0000 (02:30 +0100)]
session: fix use after free of session->devs as reported by valgrind

==7478== Invalid write of size 8
==7478==    at 0x4E59182: sr_session_dev_remove_all (session.c:302)
==7478==    by 0x4E591CD: sr_session_destroy (session.c:265)
==7478==    by 0x4095D9: load_input_file_module (input.c:143)
==7478==    by 0x4097AB: load_input_file (input.c:157)
==7478==    by 0x40531E: main (main.c:288)
==7478==  Address 0x7877eb8 is 88 bytes inside a block of size 96 free'd
==7478==    at 0x4C2A37C: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==7478==    by 0x4E5F454: sr_input_free (input.c:573)
==7478==    by 0x4095C3: load_input_file_module (input.c:140)
==7478==    by 0x4097AB: load_input_file (input.c:157)
==7478==    by 0x40531E: main (main.c:288)

9 years agoMake all sizeof() consistently use parenthesis.
Uwe Hermann [Sat, 28 Nov 2015 23:23:53 +0000 (00:23 +0100)]
Make all sizeof() consistently use parenthesis.

9 years agosysclk-lwla: Simplify trigger mask generation
Daniel Elstner [Fri, 27 Nov 2015 22:44:11 +0000 (23:44 +0100)]
sysclk-lwla: Simplify trigger mask generation

9 years agosysclk-lwla: Drain pending replies on initialization
Daniel Elstner [Fri, 27 Nov 2015 21:47:29 +0000 (22:47 +0100)]
sysclk-lwla: Drain pending replies on initialization

When opening the device, drain any pending data from the USB
buffers so that the device won't get stuck on crashes etc.

9 years agosysclk-lwla: Remove double USB set configuration
Daniel Elstner [Fri, 27 Nov 2015 20:26:13 +0000 (21:26 +0100)]
sysclk-lwla: Remove double USB set configuration

This was a pointless attempt to make the reset hiccups go away.
It didn't help, the problem must be something else.

9 years agosysclk-lwla: Cut down on size_t overuse
Daniel Elstner [Fri, 27 Nov 2015 13:32:28 +0000 (14:32 +0100)]
sysclk-lwla: Cut down on size_t overuse

Do not use size_t for values whose width is defined by the device,
not the host. Also don't use size_t for simple indices with known
small range, unless type compatibility considerations apply.

9 years agosysclk-lwla: Fix copy'n'paste mistake in comment
Daniel Elstner [Fri, 27 Nov 2015 02:19:43 +0000 (03:19 +0100)]
sysclk-lwla: Fix copy'n'paste mistake in comment

9 years agoUse the ALLZERO macro in more places.
Uwe Hermann [Thu, 26 Nov 2015 23:15:15 +0000 (00:15 +0100)]
Use the ALLZERO macro in more places.

9 years agoSupport for Korad KA3005P
Hannu Vuolasaho [Tue, 24 Nov 2015 22:56:23 +0000 (00:56 +0200)]
Support for Korad KA3005P

9 years agokorad-kdxxxxp: Rename driver to korad-kaxxxxp.
Uwe Hermann [Thu, 26 Nov 2015 23:16:05 +0000 (00:16 +0100)]
korad-kdxxxxp: Rename driver to korad-kaxxxxp.

This matches the supported / supportable devices better.

9 years agodoxygen: Only use @since on public API functions.
Uwe Hermann [Thu, 26 Nov 2015 23:14:05 +0000 (00:14 +0100)]
doxygen: Only use @since on public API functions.

9 years agoz60_libsigrok.rules: Add sigrok fx2lafw VID/PID pairs.
Uwe Hermann [Thu, 26 Nov 2015 23:12:57 +0000 (00:12 +0100)]
z60_libsigrok.rules: Add sigrok fx2lafw VID/PID pairs.

9 years agoVCD input: Chunk up the samples in 1MB blocks.
Petteri Aimonen [Wed, 4 Feb 2015 15:46:33 +0000 (17:46 +0200)]
VCD input: Chunk up the samples in 1MB blocks.

This gives about 100x speed improvement when converting VCD->SR.

Also should allow practically unlimited number of channels.

This fixes bug #551.

9 years agosession: Remove debug spew on I/O events
Daniel Elstner [Mon, 23 Nov 2015 19:36:08 +0000 (20:36 +0100)]
session: Remove debug spew on I/O events

This really is a bit much with some drivers that do lots of small
I/O transfers.

9 years agocontrib: Add SysClk LWLA1016 to udev rules
Daniel Elstner [Sun, 22 Nov 2015 16:51:05 +0000 (17:51 +0100)]
contrib: Add SysClk LWLA1016 to udev rules

9 years agosysclk-lwla: Implement support for LWLA1016
Daniel Elstner [Sun, 22 Nov 2015 16:45:54 +0000 (17:45 +0100)]
sysclk-lwla: Implement support for LWLA1016

Refactor the sysclk-lwla driver to separate the generic logic from
the model-specific implementation. Based on this, implement support
for the SysClk LWLA1016 device.

9 years agosysclk-lwla: Remove global driver instance pointer
Daniel Elstner [Tue, 10 Nov 2015 19:52:09 +0000 (20:52 +0100)]
sysclk-lwla: Remove global driver instance pointer

Obtain the sr_dev_driver pointer from the device instance so that
the remaining references to the global di pointer can be removed.

9 years agosr_usb_find(): Increase the 'bus' limit to 255.
Uwe Hermann [Sat, 21 Nov 2015 19:27:25 +0000 (20:27 +0100)]
sr_usb_find(): Increase the 'bus' limit to 255.

On some systems it can happen that the USB 'bus' number is a lot larger
than 64, but sr_usb_find() currently errors out if it is > 64.

Example:
Bus 250 Device 006: ID 1ab1:04ce 1ab1 DS1000Z Series[...]

Increase that limit so that the code will work everywhere. This bus number
is queried via libusb_get_bus_number() which returns an uint8_t, so we're
limiting to 255 here.

Thanks to 'ssi' on IRC for reporting the issue.

9 years agoserial-dmm: Add support for Velleman DVM4100 & PeakTech 3415.
Matthieu Gaillet [Wed, 4 Nov 2015 21:58:15 +0000 (22:58 +0100)]
serial-dmm: Add support for Velleman DVM4100 & PeakTech 3415.

(both are using the new dtm0660 DMM parser)

9 years agoAdd dtm0660 15-byte DMM protocol parser.
Matthieu Gaillet [Wed, 4 Nov 2015 21:58:15 +0000 (22:58 +0100)]
Add dtm0660 15-byte DMM protocol parser.

9 years agousb.c: Fix usb_get_port_path() issue on Mac OS X.
Uwe Hermann [Sun, 15 Nov 2015 18:01:13 +0000 (19:01 +0100)]
usb.c: Fix usb_get_port_path() issue on Mac OS X.

Apparently (some versions of) Mac OS X have the same problem with
usb_get_port_path() as FreeBSD does. Work around this in the same way.

Thanks to hanyazou@gmail.com for the patch!

This fixes bug #673.

9 years agochronovu-la: Add missing libusb dependencies.
Uwe Hermann [Sun, 15 Nov 2015 15:12:35 +0000 (16:12 +0100)]
chronovu-la: Add missing libusb dependencies.

The chronovu-la driver now uses libusb (in addition to libftdi), so add
a missing <libusb.h> #include and libusb dependency in configure.ac.

9 years agochronovu-la: Properly handle multiple devices.
Uwe Hermann [Sun, 8 Nov 2015 23:38:18 +0000 (00:38 +0100)]
chronovu-la: Properly handle multiple devices.

The driver should now be able to cope with e.g. multiple ChronoVu LA8
and/or ChronoVu LA16 devices being connected to the same PC.

It now also provides the serial number and connection ID, which can be
used by frontends to differentiate multiple devices.

Also improve the scanopts / drvopts / devopts lists handling.

This fixes bug #504.

9 years agoasix-sigma: Drop unneeded asix_sigma_driver_info.
Uwe Hermann [Sun, 8 Nov 2015 16:38:02 +0000 (17:38 +0100)]
asix-sigma: Drop unneeded asix_sigma_driver_info.

This is not needed, but also causes linker issues on some platforms.

9 years agoConstify a lot more items.
Uwe Hermann [Fri, 6 Nov 2015 17:18:34 +0000 (18:18 +0100)]
Constify a lot more items.

This fixes various compiler warnings when -Wdiscarded-qualifiers is used.

9 years agobuild: Delete generated files on make clean
Daniel Elstner [Sat, 7 Nov 2015 21:29:12 +0000 (22:29 +0100)]
build: Delete generated files on make clean

9 years agobuild: Enable uninstall of Java bindings
Daniel Elstner [Sat, 7 Nov 2015 21:20:19 +0000 (22:20 +0100)]
build: Enable uninstall of Java bindings

This is needed for make distcheck to work.

9 years agobuild: Skip Python bindings during distcheck
Daniel Elstner [Sat, 7 Nov 2015 21:08:45 +0000 (22:08 +0100)]
build: Skip Python bindings during distcheck

setup.py attempts to relink the bindings at installation time,
which breaks distcheck. Thus, disable the Python bindings during
distcheck for now.