Commit Graph

3528 Commits

Author SHA1 Message Date
Uwe Hermann 1a8639164e Minor cosmetics, cleanups. 2015-03-21 18:28:02 +01:00
Uwe Hermann 8852eb75d1 serial-dmm: Drop obsolete extern declaration. 2015-03-21 13:17:51 +01:00
Martin Ling bcbef5ed70 serial-dmm: Declare each meter type in only one place. 2015-03-21 13:13:34 +01:00
Martin Ling 4f840ce965 Pass driver struct pointer to driver callbacks.
This lays the groundwork for subdrivers to share callbacks without
needing a separate wrapper function for each subdriver.
2015-03-21 13:09:40 +01:00
Martin Ling 9e60a31fb9 Construct driver array at runtime, from an array of per-file arrays.
This lays the groundwork for drivers to define their own array of
subdrivers, rather than having to list each subdriver here.
2015-03-21 13:09:39 +01:00
Martin Ling 702f42e8eb rigol-ds: Add DS1000Z series support.
Tested on an MSO1104Z with firmware 00.04.02.SP4.

The analog channels are captured correctly. For the MSO series, with digital
channels, there are two outstanding issues:

1. Logic data is retrieved per-channel, one byte per sample, with the value
   in the LSB of each byte. The current datafeed logic format doesn't allow
   this format to be passed on directly. I suggest we resolve that rather than
   making the driver buffer and interleave the data.

   As stands, the code will retrieve data for all channels and pass it onto
   the datafeed with unitsize=1. Channel D0 can used correctly if selected
   alone. For other channels, data is passed to the frontend but the API does
   not provide a way to associate it with the correct channel.

2. Channels CH3 and CH4 are multiplexed with D0-7 and D8-15 respectively, so
   enabling these is mutually exclusive. We don't currently have a way to
   express this constraint to the frontend.
2015-03-21 01:55:55 +01:00
Uwe Hermann c36f78f772 Add initial Voltcraft VC-870 support.
There are a few details that have yet to be implemented or
reverse engineered and tested.
2015-03-20 21:27:04 +01:00
Uwe Hermann ded3e5087c libsigrok.h: Add SR_MQ_POWER_FACTOR and SR_MQ_APPARENT_POWER. 2015-03-20 20:58:43 +01:00
Bartosz Golaszewski 350b8b07f0 baylibre-acme: Fix a double free in bl_acme_set_shunt().
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2015-03-20 16:54:02 +01:00
Martin Ling cfcdf57677 scpi-pps: Add profile for Rigol DP821A. 2015-03-20 15:33:49 +01:00
Martin Ling 7d4f1741e3 scpi-pps: Initialise sdi with status SR_ST_INACTIVE.
Without this change a segfault occurs at exit after scan, because
dev_close() is called and the device is believed to be open.
2015-03-20 15:33:49 +01:00
Martin Ling 40c2c9159c rigol-ds: Fix broken channel group check in config_list(). 2015-03-19 23:01:50 +00:00
Martin Ling f579d08bc5 rigol-ds: Data source is a device option, not per channel group. 2015-03-19 23:01:50 +00:00
Martin Ling 98bfc4741f rigol-ds: Use sr_scpi_get_bool(). 2015-03-19 23:01:50 +00:00
Martin Ling bff16ba817 rigol-ds: Fix double free.
std_dev_clear() frees all channel groups, so this one is not required.
2015-03-19 23:01:50 +00:00
Martin Ling 16aca7661b rigol-ds: Fix wrong channel group malloc size. 2015-03-19 23:01:50 +00:00
Martin Ling 6f1346fbd7 Change API of channel accessor functions to take struct sr_channel *. 2015-03-19 21:57:31 +00:00
Martin Ling 837b08660a Add sdi pointer to struct sr_channel. 2015-03-19 21:41:51 +00:00
Martin Ling 5e23fcab88 Simplify channel creation.
We always follow sr_channel_new() with a call to add the channel to the sdi.
Tidy up a bit by adding this functionality to sr_channel_new() instead.
2015-03-19 21:37:33 +00:00
Uwe Hermann bc49777251 fx2lafw: Replace obsoleted strncmp() calls.
The fixed lengths for strncmp() can no longer be used since strings of
various lengths can be passed to match_manuf_prod(). Use strcmp() instead.
2015-03-19 18:25:55 +01:00
eightdot 6fcf3f0a22 Various fixes/updates to make the driver compile.
This patchset was originally done by eightdot <gituser@eightdot.eu> by
manually forward-porting parts of the changes done by Bert Vermeulen (see
previous commits), but then heavily modified by Uwe Hermann to be based on
top off the (git-)rebased patches from Bert Vermeulen instead.

Note: This initial DSLogic code is *not* yet in a working or usable
state. It should be considered as a basis for further work only, for now.
2015-03-19 18:25:55 +01:00
Bert Vermeulen b9d530920f fx2lafw: Basic acquisition support for DSLogic. 2015-03-19 18:25:55 +01:00
Bert Vermeulen 0e6510b8fc Add udev rule for DSLogic. 2015-03-19 18:25:55 +01:00
Bert Vermeulen a7d7f93c1b fx2lafw: scan/firmware support for DSLogic. 2015-03-19 18:25:55 +01:00
Bartosz Golaszewski c04cf9aa81 output: Accept analog packets in csv output module.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2015-03-16 13:05:45 +01:00
Uwe Hermann f7ab2f231a ols: Fix a compiler warning (unused variable).
CC       src/hardware/openbench-logic-sniffer/api.lo
  ../src/hardware/openbench-logic-sniffer/api.c: In function 'scan':
  ../src/hardware/openbench-logic-sniffer/api.c:103:10: warning: unused
  variable 'probefd' [-Wunused-variable]
    GPollFD probefd;
            ^
2015-03-13 19:12:47 +01:00
Uwe Hermann ed936ccc7c ols: Fix detection and acquisition on Windows.
Use the more portable sp_input_waiting() instead of g_poll() with FDs.
Thanks to Martin Ling for the hints. This is tested on Linux and Win7
using an OLS; scanning for the device and starting an acquisition works.

Also, add some more debug output.

This fixes bug #562.
2015-03-13 18:08:49 +01:00
Bartosz Golaszewski 5fabeeac6a baylibre-acme: correctly handle channel group options
Split device options into general and channel group settings, and
adjust config_list() callback appropriately.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2015-03-11 18:23:41 +01:00
Martin Ling bf622e6d00 Rename SR_CONF_NUM_TIMEBASE to SR_CONF_NUM_HDIV. 2015-03-02 12:24:12 +01:00
Uwe Hermann 6df8e239de ut372: Minor cosmetics. 2015-03-02 12:23:32 +01:00
Martin Ling 12318aab96 ut372: Support count mode. 2015-03-01 23:30:48 +00:00
Martin Ling b9c10ae18b Add SR_MQ_COUNT for event count measurements. 2015-03-01 23:26:33 +00:00
Martin Ling 8c9092b00b ut372: Handle flags correctly.
Packets will now be rejected if the device is not displaying RPM.
2015-03-01 23:26:33 +00:00
Martin Ling 118268a2fe ut372: Break out character-pair decoding to a separate function. 2015-03-01 22:54:45 +00:00
Martin Ling 472bef3990 ut372: Implement initial protocol parser.
For now this only works correctly if the device is in the default
state showing current RPM. The flags are not checked.
2015-03-01 22:36:52 +00:00
Martin Ling f3cde30904 ut372: Initial sub-driver skeleton. 2015-03-01 22:30:57 +00:00
Baruch Even 2cb63065f5 serial-dmm: Add MASTECH MS8250B as a supported DMM.
It is an alias and uses the FS9721 driver.
2015-02-27 15:10:19 +01:00
Uwe Hermann 2560941223 configure.ac: Two more fixes for the baylibre-acme detection. 2015-02-26 18:55:17 +01:00
Uwe Hermann d9c3331d12 asix-sigma: Use the more portable g_usleep(). 2015-02-26 11:15:02 +01:00
Vladislav Ivanov f80b3fe234 configure.ac: Fix baylibre-acme OS check. 2015-02-26 11:14:55 +01:00
Bartosz Golaszewski 380ee96fdf baylibre-acme: don't report ACME as detected if no probes are present
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2015-02-20 11:22:26 +01:00
Bartosz Golaszewski b1e034f758 Doxyfile: Make exclude patterns more specific.
Current exclude patterns lead to unwanted exclusion of all paths
containing common directory names like output, bindings etc. even
if those names occur higher in the directory structure.

Make exclude patterns more specific by prefixing them with src/.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2015-02-20 11:12:31 +01:00
Uwe Hermann 3d14ce49e4 baylibre-acme: Fix vendor/device name. 2015-02-17 17:03:41 +01:00
Uwe Hermann e00b3f5897 Various Doxygen updates. 2015-02-17 15:57:21 +01:00
Uwe Hermann 02a2bf688f unit tests: Drop unneeded check_ filename prefix. 2015-02-17 15:24:28 +01:00
Uwe Hermann d258022db0 baylibre-acme: Drop unneeded comment.
There's indeed no g_fclose() unfortunately. The g_*() wrappers for file
handling are mainly there to deal with portability issues in file names
(encoding, character sets, etc) on different platforms.
2015-02-16 01:57:35 +01:00
Uwe Hermann 3452785431 baylibre-acme: Fix a compiler warning.
Use PRIu64 to avoid the following compiler warning:

    CC       src/hardware/baylibre-acme/gpio.lo
  protocol.c: In function 'bl_acme_set_shunt':
  protocol.c:341:2: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t' [-Wformat=]
    g_fprintf(fd, "%llu\n", MOHM_TO_UOHM(shunt));
    ^
2015-02-16 01:57:35 +01:00
Uwe Hermann 391e23a97f baylibre-acme: Minor coding-style, cosmetics. 2015-02-16 01:57:35 +01:00
Bartosz Golaszewski 740ad48ac8 baylibre-acme: Add support for SR_CONF_POWER_OFF.
Allow to remotely cut the power at ACME probe level.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2015-02-16 01:20:08 +01:00
Bartosz Golaszewski 289eebd7ca baylibre-acme: Add Linux-specific GPIO helpers.
These functions allow to export, read and set GPIOs using Linux
sysfs interface.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2015-02-16 01:20:08 +01:00