Martin Ling
16aca7661b
rigol-ds: Fix wrong channel group malloc size.
2015-03-19 23:01:50 +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
a7d7f93c1b
fx2lafw: scan/firmware support for DSLogic.
2015-03-19 18:25:55 +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
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
d9c3331d12
asix-sigma: Use the more portable g_usleep().
2015-02-26 11:15:02 +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
Uwe Hermann
3d14ce49e4
baylibre-acme: Fix vendor/device name.
2015-02-17 17:03:41 +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
Bartosz Golaszewski
61f2b7f74c
baylibre-acme: Add support for probe factor setting.
...
Implement support for SR_CONF_PROBE_FACTOR setting in BayLibre ACME
driver. Given the channel-group parameter this allows to set the
shunt resistance for each probe.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2015-02-16 01:20:08 +01:00
Bartosz Golaszewski
6b80b80dcf
baylibre-acme: Driver implementation.
...
Implement basic functionalities for baylibre-acme. Add support
for common config options, device detection and sample reading.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2015-02-16 01:20:07 +01:00
Bartosz Golaszewski
dfaee1de17
baylibre-acme: Initial driver skeleton.
...
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2015-02-16 01:20:07 +01:00
Aurelien Jacobs
96cb7faac3
rigol-ds: fix the smallest supported vdiv for the DS2000 series.
2015-02-15 21:15:27 +01:00
Aurelien Jacobs
81b85663f3
rigol-ds: return the actual hardware num_vdiv and vdiv list.
2015-02-15 21:15:21 +01:00
Aurelien Jacobs
c33ff3771b
rigol-ds: fix search for the closest vdiv.
...
We try to find the smallest diff by comparing each diff with
the previously known smallest diff, so initially, this smallest diff
should be INFINITY so that we are sure to find a smaller one.
This fixes the following exception:
sr: rigol-ds: Negative vdiv index: -1.
Caught exception: not applicable
2015-02-15 21:15:04 +01:00
Uwe Hermann
f44f7e61a3
rigol-ds: Add missing "break" statements.
2015-02-14 19:32:25 +01:00
Uwe Hermann
d50725e012
rigol-ds: Add missing 20/50/100V vdiv entries.
...
These are available on e.g. Rigol DS1102E (or "upgraded" DS1052E).
Without this, if one of the channels happens to have been set to
one of the missing vdiv settings frontends (e.g. PulseView) will
have some trouble using the scope:
sr: hwdriver: sr_config_get(): key 30012 (vdiv) sdi 0x11bcb70 cg CH1
sr: rigol-ds: Negative vdiv index: -1.
std::exception
2015-02-14 19:32:15 +01:00
Uwe Hermann
e1b5b7e735
rigol-ds: Add more debug output.
2015-02-14 18:34:04 +01:00
Aurelien Jacobs
d5c4144e2c
rigol-ds: handle full word trigger slope in config_get().
...
Some scope can return POSITIVE/NEGATIVE instead of POS/NEG,
so accept this as well.
This closes bug #558 .
2015-02-13 16:37:24 +01:00
Aurelien Jacobs
b0c9d1d1c2
rigol-ds: SR_CONF_TRIGGER_SLOPE is actually listable.
2015-02-12 17:58:32 +01:00
Daniel Elstner
57ba5f3d56
sysclk-lwla: Widen constant to 64 bit before shifting
...
(lwla_convert_trigger): Fix trigger mask computation bug introduced
by recent change: Widen constant to 64 bit before shifting so that
channel nunmbers beyond 32 are processed correctly.
2015-01-31 21:09:01 +01:00
Bartosz Golaszewski
7a8a1aba37
demo: implement averaging support
...
Add support for averaging and avg_samples option to the demo device.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2015-01-25 18:00:42 +01:00
Mathias Katzer
f62f595bfc
hameg-hmo: Fix double-free issue.
2015-01-11 01:43:12 +01:00
Mathias Katzer
a1b61e6e04
hameg-hmo: Set SR_CONF_GET | SR_CONF_SET for frame limit.
...
Reading analog data from an HMO1024 (Firmware 04.527) failed because the
frame limit could not be set.
2015-01-11 01:43:12 +01:00
Bert Vermeulen
974fb0fffa
saleae-logic16: Show libusb transfer status name instead of code.
2014-11-28 00:21:56 +01:00
Uwe Hermann
a11e10ec91
saleae-logic16: Change two errors into warnings.
...
Related to #466 , convert two more sanity checks from errors into warnings.
This may allow more devices to work with libsigrok.
2014-11-27 23:22:05 +01:00
Bert Vermeulen
5cfcab6603
saleae-logic16: Clearer error message.
2014-11-27 01:01:13 +01:00
Aurelien Jacobs
e743a47d6d
beaglelogic: Add SR_CONF_CAPTURE_RATIO support.
2014-11-25 22:13:36 +01:00
Aurelien Jacobs
5a971f66a3
saleae-logic16: Add SR_CONF_CAPTURE_RATIO support.
2014-11-25 22:13:36 +01:00
Aurelien Jacobs
7bfcb25cf1
fx2lafw: Add SR_CONF_CAPTURE_RATIO support.
2014-11-25 16:56:34 +01:00
Aurelien Jacobs
fe5a735553
soft-trigger: Add support for pre-triggering.
2014-11-25 16:56:34 +01:00
Uwe Hermann
b6085eb179
manson-hcs-3xxx: Fix incorrect SR_CONF_SCAN_OPTIONS handling.
...
The SR_CONF_SCAN_OPTIONS key must be listable with or without sdi,
otherwise the device will not be detected by frontends.
2014-11-23 21:13:16 +01:00
Tim Hatch
cd3c4df35a
saleae-logic16: Downgrade error during capture to a message.
...
Some clone doesn't set this to the exact same value, and both bits in 0x48 are
marked as unknown at
http://sigrok.org/wiki/Saleae_Logic16/Firmware#FPGA_variables
This fixes bug #466 .
2014-11-23 13:47:45 +01:00
Uwe Hermann
91219afc75
Use g_malloc0() consistently, simplify error handling.
...
Use g_malloc0() for small allocations and assume they always
succeed. Simplify error handling in a few places accordingly.
Don't always sanity-check parameters for non-public (SR_PRIV)
functions, we require the developers to invoke them correctly.
This allows further error handling simplifications.
2014-11-22 17:02:57 +01:00
Uwe Hermann
c368e6f3d2
Don't check sr_channel_new() return value (always succeeds).
...
We now use g_malloc0() for the allocation and assume the allocation
will always succeed, thus sr_channel_new() will always return a
valid new channel.
2014-11-21 12:10:05 +01:00
Uwe Hermann
f57d8ffe66
Consistently use g_malloc0() for allocating devc.
...
We assume the allocation will always succeed, hence no need for
checking the returned value.
2014-11-21 12:09:01 +01:00
Uwe Hermann
aac29cc192
Eliminate sr_dev_inst_new().
2014-11-21 02:01:36 +01:00
Aurelien Jacobs
cf0280fa1b
yokogawa-dlm: Publish driver options.
2014-11-19 23:54:01 +01:00
Aurelien Jacobs
413f1944d1
motech-lps-30x: Publish driver options.
2014-11-19 23:53:35 +01:00
Aurelien Jacobs
f3ba3c119c
manson-hcs-3xxx: Publish driver options.
2014-11-19 23:53:10 +01:00
Aurelien Jacobs
6ec3ef9b92
hameg-hmo: Publish driver options.
2014-11-19 23:52:51 +01:00
Uwe Hermann
e07edc83d6
mic-985xx: Correctly report SR_CONF_THERMOMETER/_HYGROMETER.
...
Some models only log temperature, others log temperature and humidity
(so they need different drvopts).
2014-11-18 23:43:38 +01:00
Uwe Hermann
20a7cd07c9
mic-985xx: Drop unneeded #define.
2014-11-18 23:26:10 +01:00
Uwe Hermann
d6e1e6c4e1
mic-985xx: Publish driver options.
2014-11-18 23:26:10 +01:00
Uwe Hermann
489c338884
center-3xx: Drop unneeded #define.
2014-11-18 23:20:09 +01:00
Uwe Hermann
6685e9a6b3
center-3xx: Publish driver options.
2014-11-18 23:20:09 +01:00
Bert Vermeulen
5c868fef43
Revert "victor-dmm: Set spec digits to 3, matching the display."
...
This reverts commit 28b4243493
.
2014-11-18 18:10:19 +01:00
Bert Vermeulen
63ea6141b6
ols: Publish driver options.
2014-11-18 17:41:36 +01:00
Bert Vermeulen
f9dada0b60
agilent-dmm: Now really fix driver options.
2014-11-18 17:31:58 +01:00
Bert Vermeulen
42a47a9a4b
appa-55ii: Publish driver options.
2014-11-18 16:50:47 +01:00
Bert Vermeulen
5ecd9049e5
hantek-dso: Fix driver options.
2014-11-18 16:46:39 +01:00
Bert Vermeulen
1f889afd61
atten-pps3xxx: Fix driver options.
2014-11-18 16:44:58 +01:00
Bert Vermeulen
023c73ae05
cem-dt-885x: Fix driver options.
2014-11-18 16:44:14 +01:00
Bert Vermeulen
9d9cf1c4b9
scpi-pps: Fix driver options.
2014-11-18 16:44:14 +01:00
Bert Vermeulen
2ff11e50a5
asix-sigma: Fix driver options.
2014-11-18 16:30:47 +01:00
Bert Vermeulen
1e4a7cace2
demo: Fix driver options.
2014-11-18 15:39:46 +01:00
Bert Vermeulen
ff6b76a145
fx2lafw: Publish driver options.
2014-11-18 15:35:30 +01:00
Bert Vermeulen
ce4bd05256
agilent-dmm: Publish driver options.
2014-11-18 15:34:52 +01:00
Bert Vermeulen
5533392828
victor-dmm: Publish driver options.
2014-11-18 14:34:02 +01:00
Bert Vermeulen
28b4243493
victor-dmm: Set spec digits to 3, matching the display.
2014-11-18 00:24:08 +01:00
Aurelien Jacobs
41caa31909
Add a sr_analog_init() API to initialize sr_datafeed_analog2 struct.
...
It fills the fields with reasonable default values that should suit
most of the drivers. Drivers are obviously free to override the fields
they want after initializing.
2014-11-17 22:04:24 +01:00
Aurelien Jacobs
62f155f0c7
demo: Fix analog output at low samplerate.
2014-11-17 13:39:53 +01:00
Aurelien Jacobs
3772c04990
demo: Fix square pattern output shorter than other patterns.
2014-11-17 13:39:53 +01:00
Bert Vermeulen
4b664cd6ce
demo: Use allocation for model string.
2014-11-14 11:37:11 +01:00
Uwe Hermann
676877f6ce
mic-985xx: Convert to use SR_DF_ANALOG2.
2014-11-13 22:51:39 +01:00
Uwe Hermann
a84a26d98a
victor-dmm: Convert to use SR_DF_ANALOG2.
2014-11-13 22:51:39 +01:00
Uwe Hermann
0af636bed9
Change sr_dev_inst_new() to take no parameters.
...
Change all callers to set the fields manually as needed.
2014-11-12 17:18:46 +01:00
Uwe Hermann
6508992d04
Brymen BM25x: Drop unneeded _ser/_SER suffix.
...
There's only one cable for this DMM, thus there's no need for a
_ser/_SER suffix or for specifying the cable name.
2014-11-02 16:40:40 +01:00
Uffe Jakobsen
bce75f947d
ols: Fix a serial port related issue on FreeBSD.
...
Add sp_drain() to ensure bytes have actually been transmitted
over the wire.
This fixes bug #414 .
2014-11-01 19:44:36 +01:00
Uwe Hermann
aab4b8cb70
fx2lafw: Fix wide (16bit) sampling case.
...
This fixes bug #373 .
2014-10-29 22:46:57 +01:00
Bert Vermeulen
e3594306a9
zeroplus-logic-cube: Add support for AKIP-9101.
...
Thanks to Nikita Nazarenko for the patch.
2014-10-29 13:26:57 +01:00
Bert Vermeulen
933defaa03
hantek-dso: Fix driver/global/channel group config keys.
...
This was way behind and did not yet support channel groups.
2014-10-27 17:09:57 +01:00
Bert Vermeulen
e7ba5a994b
asix-sigma: Publish driver options.
2014-10-27 17:09:47 +01:00
Bert Vermeulen
a258204e00
scpi-pps: Publish driver options.
2014-10-27 17:09:47 +01:00
Bert Vermeulen
390795c099
demo: Rearrange driver and device options.
2014-10-27 17:09:47 +01:00
Bert Vermeulen
d7125bfa1e
cem-dt-885x: Publish driver options.
2014-10-27 17:09:47 +01:00
Bert Vermeulen
d6fa8ace94
atten-pps3xxx: Publish driver options.
2014-10-27 17:09:47 +01:00
Uwe Hermann
8769478c07
Add support for the UNI-T UT71x series (aka Voltcraft VC-920/940/960).
...
Tested on the Voltcraft VC-920 and VC-940 (both UT-D02 and UT-D04
cables), but it should work for all devices in this series without
any changes.
2014-10-25 17:14:30 +02:00
Bert Vermeulen
cf49d66bc6
hantek-dso: Properly zero out MQ flags.
2014-10-22 22:19:41 +02:00
Bert Vermeulen
c3eadb0760
scpi-pps: Add support for Fluke/Philips PM2800 series.
2014-10-18 23:21:37 +02:00
Bert Vermeulen
c1d56d2013
scpi-pps: Move non-standard data type processing to SCPI parser.
2014-10-18 23:21:37 +02:00
Bert Vermeulen
4a471029c2
scpi-pps: Add channel probe facility to scan.
...
If the number and specs of the device's channels are not static, i.e.
need to be probed, this facility is needed.
Initially this will be used for the Philips PM2800 series, where only
the model returned by *IDN? is needed. However this could also be used
to do actual discovery with vendor-specific SCPI commands.
2014-10-18 23:21:37 +02:00
Soeren Apel
d1314831e4
yokogawa-dlm: Populate sdi->serial_num and sdi->version
2014-10-17 03:02:52 +02:00
Soeren Apel
b3fccc851b
rigol-ds: Populate sdi->serial_num
2014-10-17 03:02:52 +02:00
Soeren Apel
b33db61c48
hameg-hmo: Populate sdi->serial_num
2014-10-17 03:02:52 +02:00
Soeren Apel
d08667c53b
scpi-pps: Populate sdi->serial_num and fix hw_info mem leak
2014-10-17 03:02:52 +02:00
Soeren Apel
0699ccdd92
sysclk-lwla: Let the sdi getter populate sdi->connection_id
...
This fixes bug #441 .
2014-10-17 03:02:52 +02:00
Soeren Apel
c962d07cba
ikalogic-scanalogic2: Let the sdi getter popuplage sdi->connection_id
...
This fixes bug #440 .
2014-10-17 03:02:52 +02:00
Bert Vermeulen
984e4b0db8
scpi-pps: Start acquisition on the first enabled channel.
2014-10-17 03:00:55 +02:00