Commit Graph

229 Commits

Author SHA1 Message Date
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
Martin Ling 721fc2272e scpi_serial: Iterate serial_write as necessary to send full commands. 2013-12-07 19:43:47 +00:00
Martin Ling 0f4a435057 scpi_tcp: must define _WIN32_WINNT to 0x0501 or higher to get getaddrinfo(). 2013-12-06 03:24:30 +00:00
Martin Ling 987a053084 scpi_tcp: Fix building on Windows. 2013-12-06 02:33:05 +01:00
Bert Vermeulen 91e406b921 scpi/usbtmc: Prototype fixes. 2013-12-05 00:16:11 +01:00
Bert Vermeulen bc03a7cc2c scpi/serial: Use stubs for all SCPI functions.
Avoids some gcc warnings, since the SCPI prototypes don't exactly
match serial_*.
2013-12-05 00:09:34 +01:00
Martin Ling b8705e99e4 scpi_tcp: Adjust to observed protocol for Rigol VS5000 series. 2013-12-04 21:32:47 +00:00
Martin Ling 08a359138b Add implementation for SCPI over TCP. 2013-12-04 20:59:20 +00:00
Martin Ling 9dfeb81b09 scpi_serial: Flush buffers after opening port. 2013-12-04 13:03:23 +00:00
Martin Ling 87c410830d Add sr_scpi_send_variadic() function. 2013-12-04 10:53:51 +00:00
Martin Ling 504f40a574 Make sr_scpi_send() take printf-style arguments. 2013-12-04 10:30:43 +00:00
Martin Ling a1ff9c1897 Add sr_scpi_read() operation for reading arbitrary data. 2013-12-03 23:18:37 +00:00
Martin Ling 31034792da Implement SCPI over USBTMC. 2013-12-03 22:25:33 +00:00
Martin Ling 23f43dff15 Make SCPI functions device independent, with separate serial backend. 2013-12-03 22:00:31 +00:00
Uwe Hermann d5976d8be5 scpi.c: Minor cleanups, cosmetics. 2013-12-03 16:08:59 +01:00
poljar (Damir Jelić) 1bd9e678ac serial: Add function to extract serial options.
This patch adds a function for a common operation of all serial based drivers.
It extracts the serial options from the options linked list that is passed down
to every hardware driver.
2013-12-03 15:10:01 +01:00
poljar (Damir Jelić) 1a323dd887 scpi: Add function to fetch uint8_t.
This patch adds a function to read and parse a SCPI response which contains a
comma separated list of unsignet 8-bit integer numbers (e.g "1,0,64").

This is particularly useful if the instrument sends digital measurement data
in this format.
2013-12-03 15:10:01 +01:00
poljar (Damir Jelić) 8acbb89a1d scpi: Add function to get an array of floats.
This patch adds a function to read and parse a SCPI response which contains a
comma-separated list of floating-point numbers (e.g. "1.0e-5,2.0e-4,3.0e-3").

This is particularly useful if the instrument sends analog measurement
data in this format.
2013-12-03 15:10:01 +01:00