Commit Graph

246 Commits

Author SHA1 Message Date
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
Aurelien Jacobs e1f9f1e1f2 es519xx: fix switching between frequency and duty cycle mode on 14 bytes chips
Here is what the datasheet says about this:
  "If judge bit is 1, it means frequency mode. If judge bit is 0,
   it means duty cycle mode."
But this is plain wrong. Reality proves this is the other way around.
2013-12-29 18:46:08 +01:00
Aurelien Jacobs 4d2630e63a es519xx: correctly handle the voltage factor in diode mode 2013-12-29 18:46:08 +01:00
Aurelien Jacobs a7c01629f6 es519xx: fix continuity mode handling
Depending on the chip, the limit value for the buzzer is between 25 and 35 Ω,
so this code set the limit for continuity to 25 Ω to be on the safe side.
2013-12-29 18:46:03 +01:00
Martin Ling bc7b7eb196 scpi: Strip trailing newline from *IDN response if present. 2013-12-29 13:22:31 +01:00
Martin Ling 05c644ea08 Revise SCPI read API to allow backend-independent data handling. 2013-12-29 04:26:36 +01:00
Martin Ling 77c16c0463 scpi: Log IDN? result. 2013-12-29 00:26:54 +01:00
Uwe Hermann b95dd7619d log prefixes: Cosmetics, consistency fixes, typo fixes. 2013-12-27 13:17:20 +01:00
Martin Ling 3544f848e0 Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
Martin Ling 34ea7f9695 Windows usb: don't try to resume thread if shut down in callback. 2013-12-22 17:38:24 +00:00
Martin Ling 6640324f7f usb: Enforce that there can only be one USB event source for now. 2013-12-22 17:27:13 +00:00
Martin Ling b5328e1dfa Windows usb: Unlock mutex when shutting down wait thread. 2013-12-22 17:10:57 +00:00
Martin Ling 589edd9b81 Winsock2.h must be included before anything that includes Winsock.h. 2013-12-22 14:59:43 +00:00
Martin Ling 5321ac6b52 Implement usb_source_add and usb_source_remove for Windows. 2013-12-22 07:16:56 +00:00
Martin Ling 6c60facc19 Use common usb_source_add and usb_source_remove functions. 2013-12-21 23:09:23 +00:00
Martin Ling ba1949f583 Use new libserialport event set API to make GPollFDs for serial sources. 2013-12-21 19:38:45 +00:00
Uwe Hermann 95ecc76546 bbcgm-m2110: Minor cosmetics. 2013-12-19 00:40:31 +01:00
Matthias Heidbrink 825da8b20f serial-dmm: Add BBC Goerz Metrawatt M2110 DMM driver. 2013-12-19 00:40:31 +01:00
Uwe Hermann cb7b165b3d serial.c: Show both error code and error message.
This is helpful in many cases, e.g. when trying to identify which of the
16000 system error codes from

  http://msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx

has been encountered (which is not trivial if you only have an,
e.g. German, string message alone).
2013-12-17 17:46:24 +01:00
Matthias Heidbrink 04cb915716 Improved doxygen docs. 2013-12-09 15:17:17 +01:00
Martin Ling b6eb8252e5 Remove now-unused fd field from struct sr_serial_dev_inst. 2013-12-07 19:43:47 +00:00
Martin Ling 64ecf7ee52 Eliminate internal usage of serial->fd in serial.c. 2013-12-07 19:43:47 +00:00
Martin Ling a0a4c0fb09 Use sp_get_port_handle to get an fd for adding/removing serial sources. 2013-12-07 19:43:47 +00:00
Martin Ling 7faa3e8821 Route sr_source_remove for all serial devices through a wrapper. 2013-12-07 19:43:47 +00:00
Martin Ling abc4b3356d Route sr_source_add for all serial devices through a serial_source_add wrapper. 2013-12-07 19:43:47 +00:00