Firmware versions starting with 00.02.04 apparently cause the in and out
bulk endpoints to end up in a HALT state. This is likely related to the
larger transfer size quirk implemented in the Linux kernel for the Rigol
DS1000: this USBTMC implementation does not have that workaround.
Instead, if the firmware version is >= 00.02.04, both endpoints have the HALT
condition cleared on device close.
This fixes bug #354.
The wrong byte was being used to test for the nano indicator.
This resulted in reported resistance and capacitance readings being off
by orders of magnitude.
This fixes bug #657.
The check for p == q is basically checking whether p/q == 1. We should
be normalising the rational before it gets here though, so in this case
we should have p == q == 1 here.
scpi-pps at line 212 assumes that an SR_OK return means that the gvar
is valid, which leads to the following error:
** GLib:ERROR:/build/glib2.0-2.45.8/./glib/gvarianttypeinfo.c:184:g_variant_type_info_check: assertion failed: (0 <= index && index < 24)
GPIO direction should be set once right after exporting. There's no need
to reset it again - in fact it's a bug which causes the probe to be reset
every time the value is read/set and gives incorrect results when reading
the GPIO values with direction == 'in'.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Revision B of ACME hardware introduces probes with on-board at24cs02
EEPROM. Extend the ACME driver to support reading the contents of
the EEPROM via linux' sysfs interface.
Also: make the driver be able to tell the difference between revisions,
add new GPIO layout and set the shunt resistance for revB at probe
registration.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Only perform a single check at initialization time to see if the probe is
equipped with a power-switch. This is done in preparation for revision B
support which has this kind of information encoded in EEPROM.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
After opening the USB device, set the device configuration to 1.
Actually, do it twice, just as the vendor driver seems to do. This
is supposed to trigger a lightweight reset of the device.
Originally, I omitted this reset sequence from the sigrok driver
because it simply did not work at all for me. However, it does seem
to work now, so that may have been a problem in libusb or the kernel
which is now fixed.
With some luck, this change may finally fix#327.
Use states SR_ST_ACTIVE and SR_ST_INACTIVE to indicate that the
device is open or closed, respectively. Do not use any of the
other state values. Improve the robustness of the open and close
methods in face of errors. Introduce a separate flag to indicate
that a running acquisition should be canceled.
Prepare the trigger masks at config_commit() time, so that the
trigger setup can be validated before starting an acquisition.
Accordingly, do actually report validation errors back to the
caller.
It turns out that g_stat() breaks apart when using 64 bit stat on
32-bit systems. Since the actual type of GStatBuf is decided when
glib/gstdio.h is included, it is thus possible for GLib itself to
be compiled with a different type than user code.
Ouch. Unfortunately going back to plain stat() also means that we
lose Unicode filename support on Windows.
The GNU libstdc++ headers use isascii(), which is not part of any
POSIX standard. On BSD, this breaks the build. It is however part
of XOPEN, which on Linux is apparently enabled implicitly for C++.
This should fix#649.
Since Autoconf places some important feature flags only into the
configuration header, it is necessary to include it globally to
guarantee a consistent build.
Disallow polling for input/error and output-ready events at the
same time, and ensure only a single FD event source is installed.
Also, do not leak if the FD event source is removed by means
other than calling serial_source_remove().