]> sigrok.org Git - libsigrok.git/log
libsigrok.git
4 years agoserial_hid: add support for the SiLabs CP2110 chip (UT-D09, UT612)
Gerhard Sittig [Sat, 30 Sep 2017 16:29:55 +0000 (18:29 +0200)]
serial_hid: add support for the SiLabs CP2110 chip (UT-D09, UT612)

Also reported to be seen in Voltcraft devices (VC-650, VC-890).

4 years agoserial_hid: add support for the WCH CH9325 chip (UT-D04 cables, UT32x)
Gerhard Sittig [Wed, 15 Mar 2017 21:28:21 +0000 (22:28 +0100)]
serial_hid: add support for the WCH CH9325 chip (UT-D04 cables, UT32x)

4 years agoserial_hid: implement serial over HID transport
Gerhard Sittig [Fri, 17 Mar 2017 21:39:46 +0000 (22:39 +0100)]
serial_hid: implement serial over HID transport

Do implement the transport methods for serial communication underneath
the common layer, by communicating HID requests and payload data by
means of HIDAPI library calls.

This commit adds the common logic of serial-over-HID communication and
implements the full internal serial transport API, including reception
in the background. But it does not yet support a single HID chip (which
each run their own proprietary protocol).

The implementation works with either hidapi-libusb or hidapi-hidraw
variant of the HIDAPI library, but was only tested on Linux.

4 years agoserial: prepare serial over HID in common layer and build support
Gerhard Sittig [Sun, 26 Mar 2017 14:48:36 +0000 (15:48 +0100)]
serial: prepare serial over HID in common layer and build support

Search for the optional HIDAPI library. Call the library's init and exit
routine, and print version information. Extend the common serial layer's
code paths for open, list, and find USB to also support serial over HID.

This commit prepares serial over HID, but the HIDAPI specific transport
for serial communication still is empty in this implementation.

4 years agoserial: introduce local receive data buffer
Gerhard Sittig [Sat, 30 Sep 2017 12:10:10 +0000 (14:10 +0200)]
serial: introduce local receive data buffer

Add a local RX buffer to the common code of libsigrok's serial layer.
Callers of the serial layer's API won't notice, this is an internal
detail of how alternative transports receive their data from the
physical line, and pass it to read() calls emitted by device drivers.

The libserialport specific code still calls into the library, and does
not use the RX buffer. Future HID and BLE support will use the buffer.

4 years agoserial: make LCR, modbus, SCPI over serial depend on generic serial comm
Gerhard Sittig [Thu, 27 Dec 2018 13:29:00 +0000 (14:29 +0100)]
serial: make LCR, modbus, SCPI over serial depend on generic serial comm

Add guards around the implementation of ES51919 chip support for LCR, as
well as modbus and SCPI over serial. To accept when the source files get
compiled in the absence of their dependencies, end up with an empty
implementation in that case.

This approach can simplify build rules when several optional external
dependencies result in differing sets of supported communication means.

4 years agoserial: prepare for the absence of libserialport
Gerhard Sittig [Sun, 28 Jan 2018 17:07:38 +0000 (18:07 +0100)]
serial: prepare for the absence of libserialport

Only reference the libserialport header when the library is available.
Allow to always compile the serial.c source file, but optionally end
up with an empty implementation. Make the sr_serial_dev_inst symbol
available outside of HAVE_SERIAL_COMM such that empty stub code can
compile. This prepares the introduction of alternative transports for
serial communication, while all of them remain optional.

The libsigrok serial layer internally uses parity and flow control
symbols which are provided by libserialport. Optionally locally declare
these symbols when libserialport is not available.

4 years agoconfigure: make device drivers depend on "serial comm" not libserialport
Gerhard Sittig [Mon, 29 Apr 2019 16:57:04 +0000 (18:57 +0200)]
configure: make device drivers depend on "serial comm" not libserialport

A previous commit introduced the more generic "have serial communication"
condition, and adjusted the list of available libsigrok dependencies.

This commit adjusts device driver dependency declarations. This allows
to build e.g. DMM drivers in the presence of RFCOMM support but in the
absence of libserialport, because any of several optional external libs
can make serial communication available.

4 years agoserial: introduce more general "have serial comm" feature flag
Gerhard Sittig [Sun, 3 Jun 2018 04:34:27 +0000 (06:34 +0200)]
serial: introduce more general "have serial comm" feature flag

Introduce the HAVE_SERIAL_COMM identifier, which gets derived from, but
need not be identical to the HAVE_LIBSERIALPORT condition.

Derive the NEED_SERIAL automake condition from the general availability
of serial communication not the specific libserialport library.

Adjust source code references. Stick with HAVE_LIBSERIALPORT where the
specific library is meant, but switch to HAVE_SERIAL_COMM where the
availability of serial communication in general is meant.

4 years agoserial: prepare alternative transports for serial communication
Gerhard Sittig [Sat, 30 Sep 2017 23:21:08 +0000 (00:21 +0100)]
serial: prepare alternative transports for serial communication

Add an indirection between the common serial communication code and the
libserialport specific support code. Prepare the use of alternative
transports like USB HID in the future. Decide in the open() routine
which transport to use for subsequent operations (based on port names).

In theory only the transport specific layer depends on the libserialport
library's availability. In this implementation all support for serial
communication still depends on the HAVE_LIBSERIALPORT preprocessor
symbol. This needs to get addressed in later commits.

4 years agools: use serial layer's "has receive data" query
Gerhard Sittig [Sun, 3 Jun 2018 14:49:45 +0000 (16:49 +0200)]
ols: use serial layer's "has receive data" query

Eliminate a direct libserialport dependency in the OLS device driver.
Use libsigrok's internal serial layer's API instead to check for the
availability of receive data.

4 years agoserial: introduce "has receive data" query
Gerhard Sittig [Sun, 3 Jun 2018 10:17:09 +0000 (12:17 +0200)]
serial: introduce "has receive data" query

Add a serial_has_receive_data() routine to the serial layer's API which
returns the number of (known to be) available RX data bytes. Implement
support in the libserialport specific code.

4 years agoserial_libsp: move libserialport specific code to separate source file
Gerhard Sittig [Fri, 17 Mar 2017 21:15:37 +0000 (22:15 +0100)]
serial_libsp: move libserialport specific code to separate source file

Introduce a new serial_libsp.c source file, and move code from serial.c
there which is specific to libserialport. Keep the existing serial.c API
in place, this is a pure internal refactoring.

Adjust a little whitespace while we are here. Rearrange long lines to
keep related parameter groups adjacent (like pointer and size, or UART
frame length and flow control). Consistently reduce indentation of
continuation lines.

4 years agoserial: determine timeout from most recent set_params() values
Gerhard Sittig [Sun, 26 Mar 2017 15:56:36 +0000 (16:56 +0100)]
serial: determine timeout from most recent set_params() values

Store the most recent successfully applied set of parameters for serial
communication. Re-use these values as a fallback to calculate timeouts,
when the underlying transport fails to provide the current settings.

4 years agorohde-schwarz-sme-0x: remove obsolete libserialport reference
Gerhard Sittig [Mon, 29 Apr 2019 16:44:12 +0000 (18:44 +0200)]
rohde-schwarz-sme-0x: remove obsolete libserialport reference

The rohde-schwarz-sme-0x device driver used to unconditionally reference
a libserialport header file. Remove that reference, it's not needed in
this specific driver.

4 years agoagilent-dmm: fixup whitespace nit (trailing space)
Gerhard Sittig [Sun, 26 May 2019 18:43:01 +0000 (20:43 +0200)]
agilent-dmm: fixup whitespace nit (trailing space)

4 years agodoc: update manual driver addition in the HACKING document
Gerhard Sittig [Wed, 1 May 2019 04:19:55 +0000 (06:19 +0200)]
doc: update manual driver addition in the HACKING document

Build support has changed to use linker sections for driver registration.
Update the subsection in the HACKING document which discusses the manual
addition of device drivers, to match what the new-driver script does for
driver authors.

4 years agosaleae-logic16: Warn (instead of erroring out) if FPGA is unsupported
Andreas Piesk [Mon, 13 May 2019 19:33:32 +0000 (21:33 +0200)]
saleae-logic16: Warn (instead of erroring out) if FPGA is unsupported

Don't exit with an error if the FPGA is detected as unsupported.

Just issue a warning with the detected version and continue. I have such
a clone and it works with the original Saleae software and with sigrok
despite the fact that its FPGA version is 0xff.

4 years agoserial-lcr: Add MASTECH MS5308
Vitaliy Vorobyov [Sun, 5 May 2019 12:16:54 +0000 (15:16 +0300)]
serial-lcr: Add MASTECH MS5308

4 years agoFix an issue when building in directories that are symlinks.
Uwe Hermann [Wed, 1 May 2019 13:33:05 +0000 (15:33 +0200)]
Fix an issue when building in directories that are symlinks.

Explicitly use SRCDIR and BUILDDIR in Doxyfile files to reference input
files. This seems to be a sufficient fix for an issue where the build
would fail when libsigrok/ was located in a directory that was a symlink.

This fixes bug #547.

4 years agoAdd MASTECH MS2115B support.
Vitaliy Vorobyov [Wed, 1 May 2019 13:54:14 +0000 (15:54 +0200)]
Add MASTECH MS2115B support.

4 years agoagilent-dmm: add basic support for Agilent/Keysight U127x
Gerd v. Egidy [Sun, 10 Feb 2019 19:14:27 +0000 (20:14 +0100)]
agilent-dmm: add basic support for Agilent/Keysight U127x

Their commands are very similar to the U123x series, they just
add some more modes and the second channel. So use the re-functions
and just extend them where necessary.

Log reading not supported yet.

Basic testing done with a U1272A.

4 years agoagilent-dmm: fix support for Agilent/Keysight U1252A
Gerd v. Egidy [Sun, 10 Feb 2019 19:13:46 +0000 (20:13 +0100)]
agilent-dmm: fix support for Agilent/Keysight U1252A

- fix the resolution of the CONF?-response:
  the resolution is given with 6 decimal places
  (instead of 8) like this:

  VOLT +5.000000E+00,+1.000000E-04

- add more measurement modes that are possible with the meter:
  CONT,COND,TEMP,PULS

5 years agoserial: rename variable to reflect it's related to libserialport
Gerhard Sittig [Sun, 3 Jun 2018 10:24:55 +0000 (12:24 +0200)]
serial: rename variable to reflect it's related to libserialport

Rename the rather generic 'data' struct member to 'sp_data', to better
reflect that it contains details which are specific to libserialport.

5 years agoserial: update doxygen comments (flush vs drain, in vs out params)
Gerhard Sittig [Sun, 19 Mar 2017 15:11:56 +0000 (16:11 +0100)]
serial: update doxygen comments (flush vs drain, in vs out params)

It's important to remain aware that the serial layer's flush and drain
semantics differs from e.g. filesystem calls. The libserialport API is
said to follow the termios example.

Extend comments in the libsigrok API, to not depend on the libserialport
layer and the availability of its documentation. This raises awareness
during maintenance of sigrok device drivers, as well as the pending
addition of alternative transports for serial communication.

Adjust the doxygen comment for the read line routine while we are here.
Add "in" and "out" attributes for routine parameters.

5 years agolibsigrok-internal.h: fix source file references in comments
Gerhard Sittig [Mon, 22 Apr 2019 08:28:07 +0000 (10:28 +0200)]
libsigrok-internal.h: fix source file references in comments

The src/hardware/ subdirectory exclusively contains device drivers these
days, while common support code has moved to the src/dmm/, src/lcr/,
src/scale/, etc directories or src/ itself. Adjust comments in the
libsigrok-internal.h declaration blocks which reference source files.

5 years agolibsigrok-internal.h: nit, alpha-sort include directives
Gerhard Sittig [Mon, 22 Apr 2019 08:08:32 +0000 (10:08 +0200)]
libsigrok-internal.h: nit, alpha-sort include directives

5 years agodevice: rephrase sizeof() calls for reduced redundancy, use malloc0
Gerhard Sittig [Mon, 2 Oct 2017 15:26:52 +0000 (16:26 +0100)]
device: rephrase sizeof() calls for reduced redundancy, use malloc0

Just allocate the memory needed to hold the very variable's size. No
need to duplicate the variable's type. Reduces redundancy and increases
robustness during maintenance.

Use g_malloc0() in sr_serial_new() to make sure all of the structure is
initialized.

5 years agoConsistently use the "Sysclk" spelling everywhere.
Uwe Hermann [Mon, 22 Apr 2019 11:26:47 +0000 (13:26 +0200)]
Consistently use the "Sysclk" spelling everywhere.

We use this spelling (not "SysClk") in most of the rest of the code-base,
as well as in the wiki.

5 years agoudev: Add Sysclk SLA50232 entry.
Uwe Hermann [Wed, 24 Apr 2019 14:11:36 +0000 (16:11 +0200)]
udev: Add Sysclk SLA50232 entry.

5 years agosysclk-sla5032: Minor asterisk placement consistency fixes.
Uwe Hermann [Wed, 24 Apr 2019 16:23:11 +0000 (18:23 +0200)]
sysclk-sla5032: Minor asterisk placement consistency fixes.

5 years agosysclk-sla5032: Make a few functions static.
Uwe Hermann [Wed, 24 Apr 2019 15:29:36 +0000 (17:29 +0200)]
sysclk-sla5032: Make a few functions static.

5 years agosysclk-sla5032: Merge sla5032.[ch] into protocol.[ch].
Uwe Hermann [Wed, 24 Apr 2019 15:22:05 +0000 (17:22 +0200)]
sysclk-sla5032: Merge sla5032.[ch] into protocol.[ch].

5 years agosysclk-sla5032: Shorten sla5032_start_sample() a bit.
Uwe Hermann [Wed, 24 Apr 2019 14:49:12 +0000 (16:49 +0200)]
sysclk-sla5032: Shorten sla5032_start_sample() a bit.

5 years agosysclk-sla5032: Shorten a few code snippets a bit.
Uwe Hermann [Mon, 22 Apr 2019 11:17:20 +0000 (13:17 +0200)]
sysclk-sla5032: Shorten a few code snippets a bit.

5 years agosysclk-sla5032: Fix compiler warnings (max vs. MAX).
Uwe Hermann [Mon, 22 Apr 2019 11:12:20 +0000 (13:12 +0200)]
sysclk-sla5032: Fix compiler warnings (max vs. MAX).

  src/hardware/sysclk-sla5032/protocol.c: In function ‘la_start_acquisition’:
  src/hardware/sysclk-sla5032/protocol.c:244:8: warning: implicit declaration of function ‘max’ [-Wimplicit-function-declaration]
    pre = max(pre, 2);
          ^~~

5 years agoAdd initial Sysclk SLA5032 driver.
Vitaliy Vorobyov [Mon, 22 Apr 2019 10:24:47 +0000 (12:24 +0200)]
Add initial Sysclk SLA5032 driver.

5 years agokorad-kaxxxxp: Added support for TENMA 72-2535 V2.1
Dewelde Anthony [Tue, 16 Apr 2019 15:12:33 +0000 (17:12 +0200)]
korad-kaxxxxp: Added support for TENMA 72-2535 V2.1

5 years agoscpi-pps: Fix typos and minor cosmetics.
Uwe Hermann [Wed, 17 Apr 2019 15:42:18 +0000 (17:42 +0200)]
scpi-pps: Fix typos and minor cosmetics.

5 years agoscpi-pps: Fix "aquisition" typo everywhere.
Uwe Hermann [Wed, 17 Apr 2019 15:32:26 +0000 (17:32 +0200)]
scpi-pps: Fix "aquisition" typo everywhere.

5 years agosr_session_send_meta(): Drop unneeded check.
Uwe Hermann [Wed, 17 Apr 2019 15:09:17 +0000 (17:09 +0200)]
sr_session_send_meta(): Drop unneeded check.

As of right now, sr_config_new() "cannot fail" and will never return NULL.

5 years agoscpi-pps: Don't use SCPI_CMD_REMOTE and SCPI_CMD_LOCAL for HP 66xxB devices when...
Frank Stettner [Thu, 11 Apr 2019 11:04:22 +0000 (13:04 +0200)]
scpi-pps: Don't use SCPI_CMD_REMOTE and SCPI_CMD_LOCAL for HP 66xxB devices when in GPIB mode.

5 years agoscpi-pps: Add various HP power supplies:
Frank Stettner [Wed, 10 Apr 2019 12:53:39 +0000 (14:53 +0200)]
scpi-pps: Add various HP power supplies:

HP 6632A, HP 6634A, HP 6611C, HP 6612C, HP 6613C and HP 6614C

5 years agoscpi-pps: Implement init_acquisition() and update_status() for HP 66xxA power supplies.
Frank Stettner [Wed, 10 Apr 2019 10:10:39 +0000 (12:10 +0200)]
scpi-pps: Implement init_acquisition() and update_status() for HP 66xxA power supplies.

5 years agoscpi-pps: Add config keys SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE,
Frank Stettner [Wed, 10 Apr 2019 09:54:37 +0000 (11:54 +0200)]
scpi-pps: Add config keys SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE,
SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE and
SR_CONF_OVER_TEMPERATURE_PROTECTION_ACTIVE to HP 66xxA power supplies.

5 years agoscpi-pps: Add SR_CONF_REGULATION for HP 66xxA power supplies.
Frank Stettner [Wed, 10 Apr 2019 09:39:55 +0000 (11:39 +0200)]
scpi-pps: Add SR_CONF_REGULATION for HP 66xxA power supplies.

5 years agoscpi-pps: Seperate existing HP 66xxA and 66xxB profiles.
Frank Stettner [Wed, 10 Apr 2019 09:12:00 +0000 (11:12 +0200)]
scpi-pps: Seperate existing HP 66xxA and 66xxB profiles.

5 years agoscpi-pps: Add missing frequency channel settings for acquisition.
Frank Stettner [Wed, 10 Apr 2019 08:28:06 +0000 (10:28 +0200)]
scpi-pps: Add missing frequency channel settings for acquisition.

5 years agoscpi-pps: Set device and channel group feature for HP 66xxB.
Frank Stettner [Tue, 9 Apr 2019 15:43:30 +0000 (17:43 +0200)]
scpi-pps: Set device and channel group feature for HP 66xxB.

5 years agoscpi-pps: Add configurable sr_mqflags.
Frank Stettner [Tue, 9 Apr 2019 15:41:29 +0000 (17:41 +0200)]
scpi-pps: Add configurable sr_mqflags.

5 years agoscpi-pps: Implement init_acquisition() and update_status() for HP 66xxB power supplies.
Frank Stettner [Tue, 9 Apr 2019 14:57:50 +0000 (16:57 +0200)]
scpi-pps: Implement init_acquisition() and update_status() for HP 66xxB power supplies.

5 years agoscpi_libgpib: Add mutex to SPoll.
Frank Stettner [Thu, 11 Apr 2019 12:33:19 +0000 (14:33 +0200)]
scpi_libgpib: Add mutex to SPoll.

5 years agoscpi: Add enum scpi_transport_layer.
Frank Stettner [Thu, 11 Apr 2019 11:03:11 +0000 (13:03 +0200)]
scpi: Add enum scpi_transport_layer.

5 years agoscpi-pps: Add init_acquisition() and update_status() for device specific
Frank Stettner [Tue, 9 Apr 2019 14:13:32 +0000 (16:13 +0200)]
scpi-pps: Add init_acquisition() and update_status() for device specific
acquisition functions.

5 years agoscpi-pps: Add config keys SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE,
Frank Stettner [Tue, 9 Apr 2019 13:47:19 +0000 (15:47 +0200)]
scpi-pps: Add config keys SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE,
SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE and
SR_CONF_OVER_TEMPERATURE_PROTECTION_ACTIVE to HP 66xxB power supplies.

5 years agoscpi-pps: Add SR_CONF_REGULATION for HP 66xxB power supplies.
Frank Stettner [Tue, 9 Apr 2019 13:29:30 +0000 (15:29 +0200)]
scpi-pps: Add SR_CONF_REGULATION for HP 66xxB power supplies.

5 years agoscpi-pps: Add enum pps_scpi_dialect and add to struct scpi_pps,
Frank Stettner [Tue, 9 Apr 2019 13:27:09 +0000 (15:27 +0200)]
scpi-pps: Add enum pps_scpi_dialect and add to struct scpi_pps,
preset with reasonable values.

5 years agosession: Add helper sr_session_send_meta() to send SR_DF_META packages.
Frank Stettner [Tue, 9 Apr 2019 12:12:31 +0000 (14:12 +0200)]
session: Add helper sr_session_send_meta() to send SR_DF_META packages.

Replace individual functions in drivers for arachnid-labs-re-load-pro
and lcr/es51919 with sr_session_send_meta() helper function.

5 years agodemo: Minor cosmetics.
Uwe Hermann [Fri, 29 Mar 2019 15:23:21 +0000 (16:23 +0100)]
demo: Minor cosmetics.

5 years agokorad-kaxxxxp: Add another KA3005P with 0xBC as extra byte in the model ID.
Frank Stettner [Thu, 21 Mar 2019 22:04:58 +0000 (23:04 +0100)]
korad-kaxxxxp: Add another KA3005P with 0xBC as extra byte in the model ID.

5 years agokorad-kaxxxxp: Add SR_MQFLAG_DC flag to the current channel package.
Frank Stettner [Thu, 21 Mar 2019 17:43:39 +0000 (18:43 +0100)]
korad-kaxxxxp: Add SR_MQFLAG_DC flag to the current channel package.

5 years agoscpi: Add connenction_id() function to all scpi drivers.
Frank Stettner [Sat, 16 Mar 2019 22:44:38 +0000 (23:44 +0100)]
scpi: Add connenction_id() function to all scpi drivers.

5 years agodemo: Get/Set new config key offset.
Frank Stettner [Thu, 21 Feb 2019 15:47:25 +0000 (16:47 +0100)]
demo: Get/Set new config key offset.

5 years agoAdd new config key OFFSET.
Frank Stettner [Thu, 21 Feb 2019 15:46:36 +0000 (16:46 +0100)]
Add new config key OFFSET.

5 years agodemo: Get/Set amplitude while data acquisition is running.
Frank Stettner [Thu, 21 Feb 2019 15:34:17 +0000 (16:34 +0100)]
demo: Get/Set amplitude while data acquisition is running.

5 years agodemo: Get/Set measurement quantity for the analog channels.
Frank Stettner [Wed, 20 Feb 2019 19:32:04 +0000 (20:32 +0100)]
demo: Get/Set measurement quantity for the analog channels.

5 years agodemo: Set an initial mq, mq flag and digits to the analog package.
Frank Stettner [Wed, 20 Feb 2019 17:58:13 +0000 (18:58 +0100)]
demo: Set an initial mq, mq flag and digits to the analog package.

Without a measured quantity in packet.meaning->mq the C++ binding function
sigrok::Analog::mq() throws an exception and there is no way to check if
there is any measured quantity set in the analog package.

5 years agoFree sr_config and sr_config lists in meta datafeeds correctly.
Frank Stettner [Tue, 19 Feb 2019 15:57:48 +0000 (16:57 +0100)]
Free sr_config and sr_config lists in meta datafeeds correctly.

5 years agoinput/trace32_ad: Add support for new file format (BINHDR2)
Soeren Apel [Sun, 24 Mar 2019 20:33:54 +0000 (21:33 +0100)]
input/trace32_ad: Add support for new file format (BINHDR2)

5 years agoinput/trace32_ad: Use only hex offsets
Soeren Apel [Sun, 24 Mar 2019 12:48:44 +0000 (13:48 +0100)]
input/trace32_ad: Use only hex offsets

5 years agochronovu-la: Fix broken triggering.
Uwe Hermann [Thu, 21 Mar 2019 23:59:39 +0000 (00:59 +0100)]
chronovu-la: Fix broken triggering.

This fixes bug #1369.

5 years agokorad-kaxxxxp: support for Stamos S-LS-31 power supply
Thomas Andres [Sun, 17 Mar 2019 16:06:28 +0000 (17:06 +0100)]
korad-kaxxxxp: support for Stamos S-LS-31 power supply

5 years agomanson-hcs-3xxx: Add HCS-3300 / DPPS-32-15 / HCS-3302 support.
Michael Klengel [Wed, 13 Feb 2019 09:50:19 +0000 (10:50 +0100)]
manson-hcs-3xxx: Add HCS-3300 / DPPS-32-15 / HCS-3302 support.

Manson HCS-3300 (1-16 V, 30 A):

  $ sigrok-cli --show -d manson-hcs-3xxx:conn=/dev/cu.SLAB_USBtoUART5
  [...]
  sr: manson-hcs-3xxx: Unknown model ID 'HCS-3300' detected, aborting.

Voltcraft DPPS-32-15 (1-32 V, 15 A), identical to Manson HCS-3302:

  $ sigrok-cli --show -d manson-hcs-3xxx:conn=/dev/cu.SLAB_USBtoUART
  [...]
  sr: manson-hcs-3xxx: Unknown model ID 'HCS-3302' detected, aborting.

5 years agomanson-hcs-3xxx: Whitespace changes for models[].
Michael Klengel [Wed, 13 Feb 2019 09:50:18 +0000 (10:50 +0100)]
manson-hcs-3xxx: Whitespace changes for models[].

5 years agohp-3478a: Check via GPIB serial poll if new data is available.
Frank Stettner [Fri, 1 Feb 2019 11:18:46 +0000 (12:18 +0100)]
hp-3478a: Check via GPIB serial poll if new data is available.

When just reading the data without check, the bus is blocked until new
data is available.

5 years agoipdbg-la: Minor cosmetic and comment fixes.
Uwe Hermann [Tue, 29 Jan 2019 22:15:37 +0000 (23:15 +0100)]
ipdbg-la: Minor cosmetic and comment fixes.

5 years agoipdbg-la: improve speed
Daniel Anselmi [Fri, 18 Jan 2019 02:03:02 +0000 (03:03 +0100)]
ipdbg-la: improve speed

5 years agoipdbg-la: working on windows
danselmi [Thu, 17 Jan 2019 11:31:23 +0000 (12:31 +0100)]
ipdbg-la: working on windows

5 years agools: add feature to support >256K memory
Wolfram Sang [Wed, 2 Jan 2019 12:15:25 +0000 (13:15 +0100)]
ols: add feature to support >256K memory

Add support for the Pepino-style of accessing >256K of memory. Because
this the only known extension of accessing >256K currently, we apply it
as soon as the sample size is bigger than 256K.  Let's hope other
devices (if any) will follow this style. If not, we need to add support
depending on the device name later.

Signed-off-by: Wolfram Sang <redacted>
5 years agopipistrello: rename registers to match actual function
Wolfram Sang [Wed, 2 Jan 2019 12:15:24 +0000 (13:15 +0100)]
pipistrello: rename registers to match actual function

Magnus (creator of the Pipistrello) confirmed that he mixed up the
register names. The code was doing it correctly nonetheless but was
confusing to read because of this. Fix it to make it easier to
comprehend.

Signed-off-by: Wolfram Sang <redacted>
5 years agools: mention compatible devices in driver name
Wolfram Sang [Wed, 2 Jan 2019 12:15:23 +0000 (13:15 +0100)]
ols: mention compatible devices in driver name

Signed-off-by: Wolfram Sang <redacted>
5 years agools: extend reponse delay when scanning device
Wolfram Sang [Wed, 2 Jan 2019 12:15:22 +0000 (13:15 +0100)]
ols: extend reponse delay when scanning device

My Pepino needs 15ms instead of 10ms, so let's use 20ms to be on the
safe side.

Signed-off-by: Wolfram Sang <redacted>
5 years agools: sort commands according to their hex value
Wolfram Sang [Wed, 2 Jan 2019 12:15:21 +0000 (13:15 +0100)]
ols: sort commands according to their hex value

Makes adding new ones easier.

Signed-off-by: Wolfram Sang <redacted>
5 years agools: refactor using max_channels
Wolfram Sang [Wed, 2 Jan 2019 12:15:20 +0000 (13:15 +0100)]
ols: refactor using max_channels

Let max_channels really carry the number of maximum channels the
hardware supports. We will handle the limitation of only half the
channels available in 200MHz mode later. Note that there won't be a
regression because we only set the variable but never check it. The
desired result of this patch is the removal of the NUM_CHANNELS macro.
The number of channels needs to be dealt with at runtime.

Signed-off-by: Wolfram Sang <redacted>
5 years agools: refactor channel initialization
Wolfram Sang [Wed, 2 Jan 2019 12:15:19 +0000 (13:15 +0100)]
ols: refactor channel initialization

We needs this twice so put it into a seperate function, so updates to it
will automatically handled for both callers.

Signed-off-by: Wolfram Sang <redacted>
5 years agools: simplify calculation of readcount
Wolfram Sang [Wed, 2 Jan 2019 12:15:18 +0000 (13:15 +0100)]
ols: simplify calculation of readcount

Somewhen we probably want DIV_ROUND_UP from the Kernel.

Signed-off-by: Wolfram Sang <redacted>
5 years agools: drop wrong usage of macro
Wolfram Sang [Wed, 2 Jan 2019 12:15:17 +0000 (13:15 +0100)]
ols: drop wrong usage of macro

commit f51acd69 ("ols: combine demux samples") wrongly replaced the bit
pattern of 0x20 with the number of channels which just happens to be 32
as well. So, the code works but is confusing to read. Reword the
for-loop to make it more comprehensible.

Signed-off-by: Wolfram Sang <redacted>
5 years agools: use 32bit for handling sample counts
Wolfram Sang [Wed, 2 Jan 2019 12:15:16 +0000 (13:15 +0100)]
ols: use 32bit for handling sample counts

The OLS protocol sends 16bit values to specify the sample count and
delay count. However, this 16bit value is the number of 32bit words to
be sampled, so the actual sample count is 4 times larger and does not
fit into a uint16_t. Extend it to support the full range of 256K
(LogicShrimp will need this) and to prepare support for devices with
even more memory (Pepino).

Signed-off-by: Wolfram Sang <redacted>
5 years agools: remove needless initialization
Wolfram Sang [Wed, 2 Jan 2019 12:15:15 +0000 (13:15 +0100)]
ols: remove needless initialization

channel_mask is recalculated before it gets accessed, so this
initialization is not needed.

Signed-off-by: Wolfram Sang <redacted>
5 years agools: remove unused define
Wolfram Sang [Wed, 2 Jan 2019 12:15:14 +0000 (13:15 +0100)]
ols: remove unused define

Signed-off-by: Wolfram Sang <redacted>
5 years agouni-t-ut32x: rephrase the receive buffer and packets relation
Gerhard Sittig [Thu, 5 Oct 2017 23:38:26 +0000 (01:38 +0200)]
uni-t-ut32x: rephrase the receive buffer and packets relation

The previous implementation assumed that a receive data chunk ends
exactly with a sensor packet's end. Yet the buffer had 32 bytes while
the packets have 19 bytes.

Separate the data reception from the packet processing. Collect whatever
chunks the USB connection provides, and scan the resulting buffer for
packets. Cope with either incomplete or corrupt or misaligned packets as
well as with multiple packets in receive chunks. The latter might happen
upon initial synchronization, when a device already sends data or the
serial port buffered previously communicated data.

In the regular case, the computer will process so fast that each single
character will be handled individually. We don't mind. The frequency is
some 60 times per second, and the data volume is 19 bytes. The software
works for the regular case, and synchronizes fast at startup or after
comm errors.

5 years agouni-t-ut32x: improve robustness of packet parser, more diagnostics
Gerhard Sittig [Thu, 5 Oct 2017 22:34:05 +0000 (00:34 +0200)]
uni-t-ut32x: improve robustness of packet parser, more diagnostics

Always print the data bytes of received buffers in the packet parser,
then check some more fixed fields to not process invalid packets, then
process the packet content as the previous implementation did.

Call the packet parser for incomplete packets and discarded input
buffers as well (initial synchronization, re-sync after comm errors).
This results in the availability of more diagnostics during development.

Pass the packet's location and size from outside. This prepares the
logic to cope with situations where the receive buffer contains multiple
(potentially incomplete) packets.

5 years agouni-t-ut32x: use ASCII literals in packet parser, symbols for magic numbers
Gerhard Sittig [Thu, 5 Oct 2017 22:09:44 +0000 (00:09 +0200)]
uni-t-ut32x: use ASCII literals in packet parser, symbols for magic numbers

Slightly unobfuscate the UT32x packet parser. The protocol is mostly
ASCII based, checks for hex numbers may be unexpected. Use symbolic
identifiers for the packet length and some special characters.

5 years agouni-t-ut32x: comment on the "T1-T2" channel name (looks like a range)
Gerhard Sittig [Thu, 5 Oct 2017 21:26:38 +0000 (23:26 +0200)]
uni-t-ut32x: comment on the "T1-T2" channel name (looks like a range)

5 years agouni-t-ut32x: use common code for sw limits, minor data type fixup (data source)
Gerhard Sittig [Thu, 5 Oct 2017 21:16:50 +0000 (23:16 +0200)]
uni-t-ut32x: use common code for sw limits, minor data type fixup (data source)

5 years agouni-t-ut32x: pre-set to default conn= spec
Gerhard Sittig [Thu, 5 Oct 2017 09:35:25 +0000 (11:35 +0200)]
uni-t-ut32x: pre-set to default conn= spec

The previous implementation of the UT32x driver expected to see a conn=
spec, without it no device is found. Default to the USB identification
of the CH9325 chip, to make the driver work out of the box. Users still
can provide conn= specs and override the default for other cables.

5 years agodoc: update README.devices (USB detection, enable serial comm)
Gerhard Sittig [Sun, 30 Dec 2018 11:31:20 +0000 (12:31 +0100)]
doc: update README.devices (USB detection, enable serial comm)

Slightly rephrase README.devices since there is no strict distinction
into "fully automatic" and "always manual". Some drivers _accept_ conn=
specs when provided, _and_ support automatic detection of enumerable
devices, _and_ might implement defaults but also support overrides.

Nit, numerically sort the list of Uni-T cables (which is about to grow
in the future) for improved readability.

Add two more devices which require users to manually enable the serial
communication (Brymen BM257s, EEVBlog 121GW).

5 years agobindings: Add Output::format()
Martin Ling [Sun, 30 Dec 2018 03:01:21 +0000 (04:01 +0100)]
bindings: Add Output::format()

5 years agorigol-ds: Fix memory buffer readout on DS4000 series.
Martin Ling [Sat, 29 Dec 2018 02:18:05 +0000 (03:18 +0100)]
rigol-ds: Fix memory buffer readout on DS4000 series.

5 years agoAdd support for YiXingDianZi MDSO in hantek-6xxx driver.
majekw [Sun, 2 Dec 2018 12:49:44 +0000 (13:49 +0100)]
Add support for YiXingDianZi MDSO in hantek-6xxx driver.