Bert Vermeulen
102f123966
Add struct sr_session parameter to all session source backends.
2014-07-21 18:34:11 +02:00
Bert Vermeulen
85b69c2b64
scpi: sr_scpi_scan_resource() never returns more than one sdi.
...
No need to always make it a one-entry GSList.
2014-07-21 06:20:56 +02:00
Martin Ling
0812c40e36
Revise session API to allow for multiple sessions in future.
2014-07-17 18:30:48 +01:00
Matthias Heidbrink
a9cf203593
serial: docs.
2014-06-30 17:00:59 +02:00
Matthias Heidbrink
d0a92abd54
Whitespace and comment improvements, no semantical changes.
2014-05-19 19:44:04 +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
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
Aurelien Jacobs
f589a6d499
scpi_usbtmc_libusb: disable all clear_halt for Rigol DS1000
2014-04-06 22:47:44 +02:00
Aurelien Jacobs
50e6311a1b
scpi_usbtmc_libusb: disable bulk_out clear_halt for Rigol DS1000
...
fix hangup issue with Rigol firmware version 00.02.02.02.00
2014-04-06 17:32:59 +02:00
Matthias Heidbrink
e83437ae20
serial-dmm: Implemented support for Voltcraft M-3650CR (driver voltcraft-m3650cr).
2014-03-24 22:57:27 +01:00
Uwe Hermann
67bd805523
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.
2014-03-20 13:10:05 +01:00
Uwe Hermann
9ad05e6cd2
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.
2014-03-11 19:48:47 +01:00
Uwe Hermann
d8cbd659ce
scpi_usbtmc_libusb.c: Consistently check for < 0 (libusb calls).
2014-03-11 19:48:00 +01:00
Matthias Heidbrink
dc05dd6069
visa: Fixed missing header warnings/uninitialized variable.
2014-03-08 10:56:16 +01:00
Daniel Elstner
d8b6b28b80
scpi_visa: Add missing callback parameter.
...
(scpi_visa_dev_inst_new): Fix serious compiler warning due to
missing drvc parameter in prototype.
2014-02-07 20:20:20 +01:00
Uwe Hermann
52f6951c4e
scpi_usbtmc_libusb: Consistent libusb error handling.
2014-02-07 19:42:27 +01:00
Uwe Hermann
ed840c8612
scpi: Disable scpi_usbtmc in favor of scpi_usbtmc_libusb for now.
...
Having both in the list will "find" the same device twice.
2014-02-07 19:01:45 +01:00
Aurelien Jacobs
2a0f6924d2
usb: remove unused sr_usb_find_usbtmc()
2014-02-07 18:53:04 +01:00
Aurelien Jacobs
20ed3ceee7
scpi: add a libusb based implementation of usbtmc
2014-02-07 18:53:04 +01:00
Aurelien Jacobs
b541f8376d
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
2014-02-07 18:53:04 +01:00
Aurelien Jacobs
17bdda5868
scpi: add a struct drv_context parameter to scpi_dev_inst_new()
2014-02-07 18:53:04 +01:00
Uwe Hermann
7ad4e2b80b
scpi_visa.c: Minor cosmetics.
2014-02-03 00:24:13 +01:00
Martin Ling
1fb2312f99
Add librevisa SCPI backend.
2014-02-02 22:42:25 +01:00
poljar (Damir Jelić)
1c873c114c
scpi: Limit the log message in get_string() to 70 characters.
2014-01-28 21:25:34 +01:00
Martin Ling
8943049cd4
scpi_serial: Reimplement to allow scpi_read_complete() to work correctly.
2014-01-23 01:42:34 +01:00
Martin Ling
a849c43a50
scpi_usbtmc: Improve debugging output.
2014-01-23 01:42:33 +01:00
Martin Ling
cf9f4bc5b0
scpi: Log responses received by sr_scpi_get_string().
2014-01-23 01:42:33 +01:00
Martin Ling
7788579e66
scpi: Remove redundant newline removal in sr_scpi_get_hw_id().
2014-01-20 00:24:57 +00:00
Martin Ling
d03dfac6b9
scpi: Strip trailing newlines in sr_scpi_get_string().
2014-01-20 00:24:57 +00:00
Uwe Hermann
dcc94340bd
usb: Fix two compiler warnings on Windows.
...
CC libsigrok_hw_common_la-usb.lo
usb.c:241:18: warning: no previous prototype for 'usb_thread'
[-Wmissing-prototypes]
SR_PRIV gpointer usb_thread(gpointer data)
^
usb.c:256:13: warning: no previous prototype for 'usb_callback'
[-Wmissing-prototypes]
SR_PRIV int usb_callback(int fd, int revents, void *cb_data)
^
2014-01-17 00:38:33 +01:00
poljar (Damir Jelić)
13dbd151fe
scpi: Use sr_atof_ascii() instead of sr_atof().
2014-01-16 16:27:35 +01:00
Aurelien Jacobs
8a2aaffa02
remove unused static functions
2014-01-14 23:39:23 +01:00
Aurelien Jacobs
d87c1766f2
change a bunch of functions from SR_PRIV to static
...
None of those functions are called across compilation units.
2014-01-14 23:39:23 +01:00
Aurelien Jacobs
613c110849
scpi: properly check for HAVE_RPC (which is always defined)
2014-01-14 00:18:31 +01:00
Aurelien Jacobs
a44a804bc6
scpi_usbtmc: does not depend on libserialport
2014-01-13 22:53:57 +01:00
Aurelien Jacobs
dc3b3be5cb
scpi_vxi: ensure the vxi link was properly opened before closing it
2014-01-12 18:46:24 +01:00
Aurelien Jacobs
104ed12553
scpi_tcp: split into scpi_tcp_raw and scpi_tcp_rigol
...
The current implementation is renamed to tcp-rigol as it seems to be
a Rigol proprietary protocol used only on Rigol VS5000 series.
A new tcp-raw implementation is introduced which simply carries raw SCPI
commands over TCP. It is probably a much more common protocol and it is
at least available on Rigol DS2000 series on port 5555.
2014-01-12 00:38:08 +01:00
Aurelien Jacobs
f754c14691
scpi: make the scpi_dev_inst_new more generic
2014-01-12 00:05:02 +01:00
Aurelien Jacobs
c3515cea44
scpi: factorize dev_inst_new calls out of individual drivers
2014-01-11 22:36:46 +01:00
Aurelien Jacobs
d5876cfb4a
scpi: add VXI transport support
2014-01-11 22:36:09 +01:00
Aurelien Jacobs
c84b6ab81c
import VXI RPC Language description
...
along with the corresponding rpcgen generated source code files
2014-01-11 22:34:51 +01:00
Uwe Hermann
ec5186f936
hardware/common/dmm: Fix debug output level.
...
Most messages from the DMM parsers are not hard errors, lower to
sr_dbg() so that the sigrok-cli output doesn't get cluttered (by default)
with debug output such as:
P1: 0.001100 V DC AUTO
sr: fs9721: Sync nibble in byte 0 (0x00) is invalid.
P1: 0.001100 V DC AUTO
(using -l 4 or -l 5 will still allow the user to see such messages)
2014-01-06 20:44:44 +01:00
Matthias Heidbrink
48d3238e66
serial: Improved docs.
2014-01-03 20:08:04 +01:00
Aurelien Jacobs
8ae157d976
scpi_usbtmc: fix reading of blocks bigger than the 2048 bytes buffer
2014-01-03 17:54:47 +01:00
Uwe Hermann
d327972b97
Add initial support for the V&A VA40B multimeter.
2014-01-02 01:46:15 +01:00
Uwe Hermann
35b904a792
es519xx.c: Fix a few compiler warnings (clang).
...
CC libsigrok_hw_common_dmm_la-es519xx.lo
es519xx.c:632:33: warning: missing field 'is_voltage' initializer
[-Wmissing-field-initializers]
struct es519xx_info info = { 0 };
^
es519xx.c:659:33: warning: missing field 'is_voltage' initializer
[-Wmissing-field-initializers]
struct es519xx_info info = { 0 };
^
es519xx.c:688:33: warning: missing field 'is_voltage' initializer
[-Wmissing-field-initializers]
struct es519xx_info info = { 0 };
^
es519xx.c:717:33: warning: missing field 'is_voltage' initializer
[-Wmissing-field-initializers]
struct es519xx_info info = { 0 };
^
es519xx.c:746:33: warning: missing field 'is_voltage' initializer
[-Wmissing-field-initializers]
struct es519xx_info info = { 0 };
^
es519xx.c:773:33: warning: missing field 'is_voltage' initializer
[-Wmissing-field-initializers]
struct es519xx_info info = { 0 };
^
es519xx.c:800:33: warning: missing field 'is_voltage' initializer
[-Wmissing-field-initializers]
struct es519xx_info info = { 0 };
^
7 warnings generated.
2013-12-31 19:20:51 +01:00
Martin Ling
9a47421157
Add blocking and nonblocking versions of serial_read and serial_write.
2013-12-30 14:19:39 +01:00
Aurelien Jacobs
cb410697fb
remove the es51922 protocol parser, superseded by the es519xx protocol parser
2013-12-29 18:46:08 +01:00
Aurelien Jacobs
29bad967a4
es519xx: correctly handle the VAHZ function
...
This handles the frequency and duty cycle display in voltage or current mode.
2013-12-29 18:46:08 +01:00
Aurelien Jacobs
c3e871dc8e
es519xx: apply the proper fixed factor in duty cycle mode
2013-12-29 18:46:08 +01:00