]> sigrok.org Git - libsigrok.git/log
libsigrok.git
8 years agout71x: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:37:44 +0000 (01:37 +0200)]
ut71x: properly set encoding digits

8 years agout372: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:35:17 +0000 (01:35 +0200)]
ut372: properly set encoding digits

8 years agors9lcd: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:33:35 +0000 (01:33 +0200)]
rs9lcd: properly set encoding digits

8 years agometex14: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:28:50 +0000 (01:28 +0200)]
metex14: properly set encoding digits

This closes bug #815.

8 years agom2110: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:27:22 +0000 (01:27 +0200)]
m2110: properly set encoding digits

8 years agofs9922: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:19:40 +0000 (01:19 +0200)]
fs9922: properly set encoding digits

8 years agofs9721: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:16:40 +0000 (01:16 +0200)]
fs9721: properly set encoding digits

8 years agoes519xx: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:09:13 +0000 (01:09 +0200)]
es519xx: properly set encoding digits

8 years agodtm0660: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:03:21 +0000 (01:03 +0200)]
dtm0660: properly set encoding digits

8 years agobrymen-bm25x: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 16:08:03 +0000 (18:08 +0200)]
brymen-bm25x: properly set encoding digits

8 years agobrymen-bm86x: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 22:14:53 +0000 (00:14 +0200)]
brymen-bm86x: properly set encoding digits

8 years agobrymen-bm86x: remove redundant initilialization
Aurelien Jacobs [Tue, 16 Aug 2016 16:16:28 +0000 (18:16 +0200)]
brymen-bm86x: remove redundant initilialization

8 years agoappa-55ii: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 22:52:05 +0000 (00:52 +0200)]
appa-55ii: properly set encoding digits

8 years agohantek-6xxx: Ignore requests to set Hantek 6022BE coupling.
Erik Montnemery [Thu, 18 Aug 2016 21:05:11 +0000 (23:05 +0200)]
hantek-6xxx: Ignore requests to set Hantek 6022BE coupling.

Here's a patch to "Ignore requests to set coupling for the Hantek 6022BE",
this clears the LIBUSB errors for me.

Also in the patch:

 - There is a crash because config_list() can be called with sdi == NULL.

   This can be reproduced by doing:
     "sigrok-cli.exe --driver hantek-6xxx --show"

 - There seems to be a very unsafe loop in config_set() when setting COUPLING;
   the coupling vector is assumed to be zero terminated, but is not declared
   as such.

   Note: The same issue is present also for other hardware, at least for
   hantek-dso/api.c. The patch is only for hantek-6xxx though.

8 years agohantek-6xxx: sdi might be NULL - don't assign devc until !sdi is checked.
Sebastian Zagrodzki [Fri, 19 Aug 2016 13:22:35 +0000 (15:22 +0200)]
hantek-6xxx: sdi might be NULL - don't assign devc until !sdi is checked.

8 years agohantek-6xxx: Fix the device scan to not scan the NULL entry.
Mike Meyer [Mon, 11 Jul 2016 16:09:04 +0000 (11:09 -0500)]
hantek-6xxx: Fix the device scan to not scan the NULL entry.

8 years agodrivers: don't try to access the sr_driver_list section with no driver compiled.
Aurelien Jacobs [Sun, 14 Aug 2016 23:28:55 +0000 (01:28 +0200)]
drivers: don't try to access the sr_driver_list section with no driver compiled.

This closes bug #820.

8 years agohantek-6xxx: only show DC coupling for the Hantek device
Benjamin Larsson [Sat, 23 Apr 2016 19:48:05 +0000 (21:48 +0200)]
hantek-6xxx: only show DC coupling for the Hantek device

8 years agohantek-6xxx: Fix some issues by using power-of-two data sizes.
Uwe Hermann [Sun, 14 Aug 2016 21:51:49 +0000 (23:51 +0200)]
hantek-6xxx: Fix some issues by using power-of-two data sizes.

There were issues when using non-power-of-two data sizes with e.g.
the Hantek 6022BE device. For example, on Windows the acquisition would
simply hang and never complete:

  hantek-6xxx: receive_transfer(): status LIBUSB_TRANSFER_ERROR received 0 bytes

The issue was reported by Erik Montnemery on the mailing list, the
original patch was posted by "mmark" here (thanks!):

  http://www.eevblog.com/forum/testgear/sainsmart-dds120-usb-oscilloscope-(buudai-bm102)/msg911729/#msg911729

The issue has been verified by me on Windows and Linux, and also that
this change does indeed fix it (tested Hantek 6022BE and Sainsmart DDS120).

Neither PulseView nor sigrok-cli hang anymore on Windows, and on Linux
the log messages suggest improvements as well:

  -hantek-6xxx: data_amount 712
  +hantek-6xxx: data_amount: 200 (rounded to power of 2: 512)

  -hantek-6xxx: receive_transfer(): calculated samplerate == 2327ks/s
  -hantek-6xxx: receive_transfer(): status LIBUSB_TRANSFER_OVERFLOW received 512 bytes.
  +hantek-6xxx: receive_transfer(): calculated samplerate == 1969ks/s
  +hantek-6xxx: receive_transfer(): status LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED received 512 bytes.

This fixes bug #821.

8 years agoFix a segfault with input/output modules.
Uwe Hermann [Sun, 17 Jul 2016 17:39:04 +0000 (19:39 +0200)]
Fix a segfault with input/output modules.

Some functions in std.c were using

  const char *prefix = sdi->driver->name;

but were called from input/output modules as well (which don't have
a "driver" field).

As a temporary workaround, use "unknown" as prefix in such cases until
a more permanent solution is implemented.

This fixes bug #813.

8 years agoensure the only entry point of libdrivers doesn't have visibility=hidden
Aurelien Jacobs [Sat, 18 Jun 2016 19:52:31 +0000 (21:52 +0200)]
ensure the only entry point of libdrivers doesn't have visibility=hidden

This fixes the following build issue on OSX:
Undefined symbols for architecture x86_64:
  "_sr_drivers_init", referenced from:
      _sr_init in backend.o

This closes bug #802.

8 years agoAdd VID/PID for the CWAV USBee ZX.
Thomas [Mon, 29 Feb 2016 02:59:57 +0000 (18:59 -0800)]
Add VID/PID for the CWAV USBee ZX.

The hardware is identical to the SX.

This fixes bug #764.

8 years agofx2lafw: Set sr_analog_encoding.digits to 2 for now.
Uwe Hermann [Sun, 3 Jul 2016 21:38:29 +0000 (23:38 +0200)]
fx2lafw: Set sr_analog_encoding.digits to 2 for now.

8 years agofx2lafw: Fix analog scaling.
Uwe Hermann [Sun, 3 Jul 2016 21:03:52 +0000 (23:03 +0200)]
fx2lafw: Fix analog scaling.

Thanks to Patrick Remy <redacted> for the fix.

8 years agosession.c: Drop unneeded check.
Uwe Hermann [Sun, 3 Jul 2016 14:41:16 +0000 (16:41 +0200)]
session.c: Drop unneeded check.

The dev_acquisition_stop() callback is not optional and always present.

8 years agouni-t-dmm: Drop unused UNI_T_UT_D04_NEW #define.
Uwe Hermann [Sun, 3 Jul 2016 14:40:44 +0000 (16:40 +0200)]
uni-t-dmm: Drop unused UNI_T_UT_D04_NEW #define.

8 years agoagilent-dmm: add support for U128x
Aurelien Jacobs [Fri, 17 Jun 2016 20:49:46 +0000 (22:49 +0200)]
agilent-dmm: add support for U128x

8 years agoagilent-dmm: add support for Keysight branded meters
Aurelien Jacobs [Sat, 11 Jun 2016 23:48:15 +0000 (01:48 +0200)]
agilent-dmm: add support for Keysight branded meters

8 years agoagilent-dmm: add support for AC/DC flags in current mode
Aurelien Jacobs [Sat, 11 Jun 2016 23:46:52 +0000 (01:46 +0200)]
agilent-dmm: add support for AC/DC flags in current mode

8 years agoagilent-dmm: fix handling of AC/DC flags in volts mode
Aurelien Jacobs [Sat, 11 Jun 2016 23:41:26 +0000 (01:41 +0200)]
agilent-dmm: fix handling of AC/DC flags in volts mode

8 years agoagilent-dmm: output correct number of digits in analog packets
Aurelien Jacobs [Wed, 22 Jun 2016 22:35:58 +0000 (00:35 +0200)]
agilent-dmm: output correct number of digits in analog packets

8 years agoagilent-dmm: split DIOD recv_conf into model specific functions
Aurelien Jacobs [Wed, 22 Jun 2016 23:11:35 +0000 (01:11 +0200)]
agilent-dmm: split DIOD recv_conf into model specific functions

This reduce overall number of lines and facilitate computation
of significant digits.

8 years agoagilent-dmm: replace divider by exponent to ease computing of significant digits
Aurelien Jacobs [Wed, 22 Jun 2016 22:30:09 +0000 (00:30 +0200)]
agilent-dmm: replace divider by exponent to ease computing of significant digits

8 years agoanalog: add support for negative number of digits
Aurelien Jacobs [Mon, 20 Jun 2016 20:58:12 +0000 (22:58 +0200)]
analog: add support for negative number of digits

When a meter display 105.2 kΩ, libsigrok will return 105200 Ω
but it is really valuable to know that the last 2 digits are not
significant, so encoding.digits should be set to -2.
This would allow a sigrok client to display 105200 as 105.2 k
instead of 105.200 k.

8 years agoLogging: Filter out unwanted newlines
Soeren Apel [Thu, 9 Jun 2016 02:36:35 +0000 (04:36 +0200)]
Logging: Filter out unwanted newlines

055804e89ea0f6b4145040a0eeb2f4e6951692fe changed the outgoing
SCPI message termination by always adding a newline. This results
in the following log output:

sr: [00:00.003102] scpi: Opening VXI device vxi/192.168.178.43.
sr: [00:00.005648] scpi_vxi: Successfully sent SCPI command: '*IDN?
'.
sr: [00:00.005931] scpi: Got response: 'YOKOGAWA,710130,91HC30402,F3.73', length 31.

This patch restores the previous unterminated SCPI message logging:

sr: [00:00.005462] scpi: Opening VXI device vxi/192.168.178.43.
sr: [00:00.007515] scpi_vxi: Successfully sent SCPI command: '*IDN?'.
sr: [00:00.007860] scpi: Got response: 'YOKOGAWA,710130,91HC30402,F3.73', length 31.

As it's located in the general logging mechanism, we deal with any
additional (and unwanted) newlines this way.

8 years agorigol-ds: properly report which channel is enabled.
Aurelien Jacobs [Sat, 25 Jun 2016 19:37:53 +0000 (21:37 +0200)]
rigol-ds: properly report which channel is enabled.

8 years agorigol-ds: add support for getting/setting trigger level.
Aurelien Jacobs [Sat, 25 Jun 2016 16:19:47 +0000 (18:19 +0200)]
rigol-ds: add support for getting/setting trigger level.

8 years agorigol-ds: add PROBE_FACTOR support.
Aurelien Jacobs [Sun, 22 Feb 2015 23:32:01 +0000 (00:32 +0100)]
rigol-ds: add PROBE_FACTOR support.

8 years agorigol-ds: split out vertical config reading in its own function for re-use.
Aurelien Jacobs [Sat, 25 Jun 2016 15:21:20 +0000 (17:21 +0200)]
rigol-ds: split out vertical config reading in its own function for re-use.

8 years agogroup all drivers into a single object
Aurelien Jacobs [Sun, 5 Jun 2016 21:10:44 +0000 (23:10 +0200)]
group all drivers into a single object

This single object also contains the sr_drivers_init function, that will
always be referenced. That ensures that the drivers object files won't
be optimized out during static linking due to the fact that they are
not referenced directly.

This addresses (parts of) bug #802.

8 years agooutput/analog: Drop unused fancyprint() and si_printf().
Uwe Hermann [Sat, 28 May 2016 16:37:04 +0000 (18:37 +0200)]
output/analog: Drop unused fancyprint() and si_printf().

These functions were only used in the SR_DF_ANALOG_OLD case,
whereas the SR_DF_ANALOG case already used functions and lists
from src/analog.c.

This closes bug #636.

8 years agosession: Drop SR_DF_ANALOG_OLD support completely.
Uwe Hermann [Sat, 28 May 2016 16:01:13 +0000 (18:01 +0200)]
session: Drop SR_DF_ANALOG_OLD support completely.

This closes bug #728.

8 years agotransform/scale: Drop support for SR_DF_ANALOG_OLD.
Uwe Hermann [Sat, 14 May 2016 14:27:28 +0000 (16:27 +0200)]
transform/scale: Drop support for SR_DF_ANALOG_OLD.

8 years agotransform/invert: Drop support for SR_DF_ANALOG_OLD.
Uwe Hermann [Sat, 14 May 2016 14:26:56 +0000 (16:26 +0200)]
transform/invert: Drop support for SR_DF_ANALOG_OLD.

8 years agooutput/analog: Drop support for SR_DF_ANALOG_OLD.
Uwe Hermann [Sat, 14 May 2016 14:26:04 +0000 (16:26 +0200)]
output/analog: Drop support for SR_DF_ANALOG_OLD.

8 years agooutput/csv: Drop support for SR_DF_ANALOG_OLD.
Uwe Hermann [Sat, 14 May 2016 14:25:33 +0000 (16:25 +0200)]
output/csv: Drop support for SR_DF_ANALOG_OLD.

8 years agooutput/wav: Drop support for SR_DF_ANALOG_OLD.
Uwe Hermann [Sat, 14 May 2016 14:24:23 +0000 (16:24 +0200)]
output/wav: Drop support for SR_DF_ANALOG_OLD.

8 years agosession_driver.c: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 16:01:10 +0000 (18:01 +0200)]
session_driver.c: Convert to SR_DF_ANALOG.

8 years agolibsigrok-internal.h: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 16:00:14 +0000 (18:00 +0200)]
libsigrok-internal.h: Convert to SR_DF_ANALOG.

8 years agoyokogawa-dlm: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:47:45 +0000 (17:47 +0200)]
yokogawa-dlm: Convert to SR_DF_ANALOG.

8 years agouni-t-ut32x: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:47:33 +0000 (17:47 +0200)]
uni-t-ut32x: Convert to SR_DF_ANALOG.

8 years agouni-t-dmm: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:47:22 +0000 (17:47 +0200)]
uni-t-dmm: Convert to SR_DF_ANALOG.

8 years agotesto: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:47:11 +0000 (17:47 +0200)]
testo: Convert to SR_DF_ANALOG.

8 years agoteleinfo: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:47:00 +0000 (17:47 +0200)]
teleinfo: Convert to SR_DF_ANALOG.

8 years agoserial-dmm: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:46:47 +0000 (17:46 +0200)]
serial-dmm: Convert to SR_DF_ANALOG.

8 years agoscpi-pps: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:46:31 +0000 (17:46 +0200)]
scpi-pps: Convert to SR_DF_ANALOG.

8 years agomaynuo-m97: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:46:17 +0000 (17:46 +0200)]
maynuo-m97: Convert to SR_DF_ANALOG.

8 years agomotech-lps-30x: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:46:06 +0000 (17:46 +0200)]
motech-lps-30x: Convert to SR_DF_ANALOG.

8 years agolascar-el-usb: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:45:55 +0000 (17:45 +0200)]
lascar-el-usb: Convert to SR_DF_ANALOG.

8 years agokecheng-kc-330b: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:45:44 +0000 (17:45 +0200)]
kecheng-kc-330b: Convert to SR_DF_ANALOG.

8 years agohung-chang-dso-2100: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:45:33 +0000 (17:45 +0200)]
hung-chang-dso-2100: Convert to SR_DF_ANALOG.

8 years agohantek-dso: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:45:09 +0000 (17:45 +0200)]
hantek-dso: Convert to SR_DF_ANALOG.

8 years agogwinstek-gds-800: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:44:06 +0000 (17:44 +0200)]
gwinstek-gds-800: Convert to SR_DF_ANALOG.

8 years agogmc-mh-1x-2x: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:43:50 +0000 (17:43 +0200)]
gmc-mh-1x-2x: Convert to SR_DF_ANALOG.

8 years agofx2lafw: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:41:35 +0000 (17:41 +0200)]
fx2lafw: Convert to SR_DF_ANALOG.

8 years agocolead-slm: Convert to SR_DF_ANALOG.
Uwe Hermann [Fri, 27 May 2016 20:16:15 +0000 (22:16 +0200)]
colead-slm: Convert to SR_DF_ANALOG.

8 years agodemo: Convert to SR_DF_ANALOG.
Uwe Hermann [Fri, 27 May 2016 20:16:03 +0000 (22:16 +0200)]
demo: Convert to SR_DF_ANALOG.

8 years agocem-dt-885x: Convert to SR_DF_ANALOG.
Uwe Hermann [Fri, 27 May 2016 15:33:46 +0000 (17:33 +0200)]
cem-dt-885x: Convert to SR_DF_ANALOG.

8 years agofluke-dmm: Convert to SR_DF_ANALOG.
Uwe Hermann [Fri, 27 May 2016 15:31:14 +0000 (17:31 +0200)]
fluke-dmm: Convert to SR_DF_ANALOG.

8 years agobrymen-dmm: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 15:30:10 +0000 (17:30 +0200)]
brymen-dmm: Convert to SR_DF_ANALOG.

8 years agobrymen-bm86x: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 15:26:13 +0000 (17:26 +0200)]
brymen-bm86x: Convert to SR_DF_ANALOG.

8 years agobaylibre-acme: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 15:23:27 +0000 (17:23 +0200)]
baylibre-acme: Convert to SR_DF_ANALOG.

8 years agonorma-dmm: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 15:21:49 +0000 (17:21 +0200)]
norma-dmm: Convert to SR_DF_ANALOG.

8 years agoatten-pps3xxx: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 15:18:44 +0000 (17:18 +0200)]
atten-pps3xxx: Convert to SR_DF_ANALOG.

8 years agoappa-55ii: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 15:17:15 +0000 (17:17 +0200)]
appa-55ii: Convert to SR_DF_ANALOG.

8 years agoagilent-dmm: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 15:14:53 +0000 (17:14 +0200)]
agilent-dmm: Convert to SR_DF_ANALOG.

8 years agocenter-3xx: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 15:13:26 +0000 (17:13 +0200)]
center-3xx: Convert to SR_DF_ANALOG.

8 years agokern-scale: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 15:10:34 +0000 (17:10 +0200)]
kern-scale: Convert to SR_DF_ANALOG.

8 years agorigol-ds: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 15:09:14 +0000 (17:09 +0200)]
rigol-ds: Convert to SR_DF_ANALOG.

8 years agokorad-kaxxxxp: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 15:06:54 +0000 (17:06 +0200)]
korad-kaxxxxp: Convert to SR_DF_ANALOG.

8 years agohantek-6xxx: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 15:04:53 +0000 (17:04 +0200)]
hantek-6xxx: Convert to SR_DF_ANALOG.

8 years agomanson-hcs-3xxx: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 15:03:08 +0000 (17:03 +0200)]
manson-hcs-3xxx: Convert to SR_DF_ANALOG.

8 years agotondaj-sl-814: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 14:33:35 +0000 (16:33 +0200)]
tondaj-sl-814: Convert to SR_DF_ANALOG.

8 years agodmm: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:33:30 +0000 (17:33 +0200)]
dmm: Convert to SR_DF_ANALOG.

8 years agolcr: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 28 May 2016 15:48:04 +0000 (17:48 +0200)]
lcr: Convert to SR_DF_ANALOG.

8 years agoscale: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 15:11:46 +0000 (17:11 +0200)]
scale: Convert to SR_DF_ANALOG.

8 years agoinput/wav: Convert to SR_DF_ANALOG.
Uwe Hermann [Sat, 14 May 2016 14:20:55 +0000 (16:20 +0200)]
input/wav: Convert to SR_DF_ANALOG.

8 years agozeroplus: Fix config_list() wrt drvopts/devopts.
Yasushi SHOJI [Fri, 3 Jun 2016 20:39:29 +0000 (05:39 +0900)]
zeroplus: Fix config_list() wrt drvopts/devopts.

When config_list() gets NULL as sdi, it must return driver opts.
Some drivers, including zeroplus, don't check sdi and return both
driver opts and device opts.

8 years agosw_limits: Log when the sample/time limit is reached.
Uwe Hermann [Wed, 1 Jun 2016 07:24:29 +0000 (09:24 +0200)]
sw_limits: Log when the sample/time limit is reached.

8 years agoRemove unnecessary std_serial_dev_acquisition_stop() wrappers
Lars-Peter Clausen [Sat, 28 May 2016 12:13:08 +0000 (14:13 +0200)]
Remove unnecessary std_serial_dev_acquisition_stop() wrappers

Now that std_serial_dev_acquisition_stop() has the same signature as
the sr_dev_driver dev_acquisition_stop() callback it is possible to remove
the wrapper functions and use std_serial_dev_acquisition_stop() directly
has the callback function.

Signed-off-by: Lars-Peter Clausen <redacted>
8 years agostd_serial_dev_acquisition_stop(): Remove dev_close_fn parameter
Lars-Peter Clausen [Sat, 28 May 2016 11:54:08 +0000 (13:54 +0200)]
std_serial_dev_acquisition_stop(): Remove dev_close_fn parameter

All callers of std_serial_dev_acquisition_stop() currently pass the same
callback for the dev_close_fn parameter as the dev_close callback of their
sr_dev_driver struct. Remove the dev_close_fn parameter and invoke the
drivers dev_close() callback directly. This simplifies the API and ensures
consistent behaviour between different drivers.

Signed-off-by: Lars-Peter Clausen <redacted>
8 years agostd_serial_dev_acquisition_stop(): Remove serial parameter
Lars-Peter Clausen [Sat, 28 May 2016 11:41:03 +0000 (13:41 +0200)]
std_serial_dev_acquisition_stop(): Remove serial parameter

All callers of std_serial_dev_acquisition_stop() currently pass sdi->conn
for the serial parameter. And the other std_serial helper functions already
require that the conn field of the sr_driver_inst passed to the functions
points to the sr_serial_dev_inst associated with the device.

Modify std_serial_dev_acquisition_stop() to follow the same pattern and
remove the serial parameter. This simplifies the API and ensures consistent
behaviour between different drivers.

Signed-off-by: Lars-Peter Clausen <redacted>
8 years agoUse driver name as the log prefix in standard functions
Lars-Peter Clausen [Sun, 8 May 2016 13:47:35 +0000 (15:47 +0200)]
Use driver name as the log prefix in standard functions

Some of the standard helper functions take a log prefix parameter that is
used when printing messages. This log prefix is almost always identical to
the name field in the driver's sr_dev_driver struct. The only exception are
drivers which register multiple sr_dev_driver structs.

Instead of passing the log prefix as a parameter simply use the driver's
name. This simplifies the API, gives consistent behaviour between different
drivers and also makes it easier to identify where the message originates
when a driver registers sr_dev_driver structs.

Signed-off-by: Lars-Peter Clausen <redacted>
8 years agopce-322a: Pass driver dev_close callback std_serial_dev_acquisition_stop()
Lars-Peter Clausen [Sat, 28 May 2016 11:45:54 +0000 (13:45 +0200)]
pce-322a: Pass driver dev_close callback std_serial_dev_acquisition_stop()

All drivers with the exception of pce-322a pass their dev_close callback to
std_serial_dev_acquisition_stop(). The pce-322a passes std_serial_dev_close()
which is also called from its dev_close() callback and replicates the other
functionality of its dev_close() callback directly in
std_serial_dev_acquisition_stop().

Refactor this to pass the dev_close callback function directly to
std_serial_dev_acquisition_stop(). This makes sure that the driver is
consistent with other drivers and also removes duplicated code.

Signed-off-by: Lars-Peter Clausen <redacted>
8 years agosw_limits: Add documentation
Lars-Peter Clausen [Fri, 13 May 2016 11:46:44 +0000 (13:46 +0200)]
sw_limits: Add documentation

Add documentation for the software limits module.

Signed-off-by: Lars-Peter Clausen <redacted>
8 years agogmc-mh-1x-2x: Use software limits helpers
Lars-Peter Clausen [Wed, 4 May 2016 12:19:26 +0000 (14:19 +0200)]
gmc-mh-1x-2x: Use software limits helpers

Use the new software limit helper functions rather than open-coding their
functionality.

This also fixes the issue that driver the does not reset all the limit
statistics in acquisition_start().

Signed-off-by: Lars-Peter Clausen <redacted>
8 years agofluke-dmm: Use software limits helpers
Lars-Peter Clausen [Wed, 4 May 2016 12:19:04 +0000 (14:19 +0200)]
fluke-dmm: Use software limits helpers

Use the new software limit helper functions rather than open-coding their
functionality.

This also fixes the issue that the driver does not reset the limit
statistics in acquisition_start(). It also makes the time limit work, which
previously was only a stub implementation.

Signed-off-by: Lars-Peter Clausen <redacted>
8 years agoarachnid-labs-re-load-pro: Use software limit helpers
Lars-Peter Clausen [Wed, 4 May 2016 12:27:05 +0000 (14:27 +0200)]
arachnid-labs-re-load-pro: Use software limit helpers

Use the new software limit helper functions rather than open-coding their
functionality.

Signed-off-by: Lars-Peter Clausen <redacted>
8 years agoagilent-dmm: Use software limits helpers
Lars-Peter Clausen [Wed, 4 May 2016 12:18:51 +0000 (14:18 +0200)]
agilent-dmm: Use software limits helpers

Use the new software limit helper functions rather than open-coding their
functionality.

This also fixes the issue that the driver does not reset the limit
statistics in acquisition_start(). It also makes the time limit work, which
previously was only a stub implementation.

Signed-off-by: Lars-Peter Clausen <redacted>
8 years agoBuild: avoid $< in ruby bindings rules
Aurelien Jacobs [Wed, 25 May 2016 20:38:41 +0000 (22:38 +0200)]
Build: avoid $< in ruby bindings rules

This fixes building with BSD make.
This closes bug #801.