This changes the library filename (e.g. on Linux) from
libsigrokdecode.so.3.0.0 to libsigrokdecode.so.3.0.1, the SONAME
(+symlink) stays at libsigrokdecode.so.3, though.
Gerhard Sittig [Sun, 20 Nov 2016 15:51:47 +0000 (16:51 +0100)]
build support: sort list of installed items, factor out pretty printer
Alpha-sort the list of installed items, to support developers which scan
the list for newly added items. Factor out the logic which pretty prints
installed items while maintaining a maximum screen output line length.
Gerhard Sittig [Sun, 16 Oct 2016 16:25:29 +0000 (18:25 +0200)]
Print error messages when decoders fail load time checks
Several checks get applied when loading externally provided protocol
decoders. Print error messages when checks fail, so that developers can
better resolve issues.
The sequence of tests terminates upon the first failed check, while
decoders may suffer from several issues at the same time. This is
considered acceptable, as it reduces the commit's size and the code's
complexity. This commit only adds error messages, and does not change
logic/behaviour.
Failed API version checks result in two messages: One specific message
which reflects the decoder's version and what's supported by the loader,
and a generic message that the API version check has failed. This is
done to simplify the logic of a rarely used error code path.
This commit addresses libsigrokdecode Bug 704, and allows to identify
decoders from parallel installations of differing version.
Uwe Hermann [Fri, 29 Jan 2016 22:32:37 +0000 (23:32 +0100)]
Bump libtool version (not package version) to 3:0:0.
The last release (0.3.0) had the libtool version (current:revision:age)
set to 2:0:0. Since this release removes and changes interfaces, the new
version is 3:0:0.
This changes the library filename (e.g. on Linux) from
libsigrokdecode.so.2.0.0 to libsigrokdecode.so.3.0.0, the SONAME
(+symlink) becomes libsigrokdecode.so.3.
Daniel Thompson [Fri, 22 Jan 2016 08:29:09 +0000 (08:29 +0000)]
uart: Optimize handling of samples when tx and rx are both idle
Re-enable the fast path for identical samples but only when both
pins are waiting for the start bit. For sparse data sets (I tested
UT61E capture log) the optimization results in a >4x decode
improvement.
Petteri Aimonen [Sun, 10 Jan 2016 17:23:55 +0000 (19:23 +0200)]
arm_itm: Use objdump instead of addr2line.
This improves speed and fixes bug 564. Code is somewhat
of a copypaste from the arm_etm counterpart, but there
are enough differences that it is easier to keep separate
copy of the objdump parsing in each.
Stefan Brüns [Fri, 13 Nov 2015 04:39:10 +0000 (05:39 +0100)]
usb_signalling: decode RESET and Keep-Alive signalling conditions
Resets are at least 10ms at the root hub downstream facing port and
2.5us at the device (root hub reset may be shortened by itermediate
hubs).
Keep-alive is a low-speed only signalling condition, as low-speed has no
SOFs to inhibit devices to enter suspend
Stefan Brüns [Fri, 13 Nov 2015 04:20:22 +0000 (05:20 +0100)]
usb_signalling: use explicit positions for packet start/end
Instead of centering the block around the sampleposition, which shows
some visual glitches due to rounding, use the edge positions already
known. Remove unused halfbit symbol.
Stefan Brüns [Fri, 13 Nov 2015 03:52:53 +0000 (04:52 +0100)]
usb_signalling: remove unneeded syms array
Do not call get_eop() from get_bit(), but directly issue the symbol. As
get_eop() is only called during the GET EOP state, the SE0 is implicit and
there is no need to save it into the syms array.
Vincent Palatin [Thu, 29 May 2014 13:51:13 +0000 (06:51 -0700)]
USB Power Delivery protocol decoder
Decode and packetize the Biphase Mark Coding (aka differential Manchester)
as used in the Universal Serial Bus Power Delivery Specification Revision 2.0
v1.1, then decode the packet content.
Daniel Elstner [Sun, 4 Oct 2015 23:53:43 +0000 (01:53 +0200)]
Python: Restrict code to stable ABI subset
Limit usage of the Python C API to the stable ABI subset as defined
by PEP 384. This removes some type definitions and functions which
libsigrokdecode made use of. Convert all affected code to suitable
API alternatives. Also fix a few leaks that became apparent while
working on the code.
The most visible change is that PyTypeObject is now an opaque type.
Thus, the custom Decoder and srd_logic types are now created on the
heap via an alternative API. Unfortunately, since tp_name is now
inaccessible, type names had to be removed from the log output.
Stack traces after Python exceptions are now formatted by calling
into Python, since the trace object C API is no longer available.
Stefan Brüns [Tue, 29 Sep 2015 22:24:24 +0000 (00:24 +0200)]
usb_signalling: Track USB symbol width to compensate frequency errors
USB low/full speed allows for frequency tolerance of 1.5%/0.25%. At
maximum packet size (sync + PID + data + CRC16) of 12 bytes/1027 bytes
this amounts to 1.4 bits/20 bits, so the decoder has to lock to the
actual symbol frequency to avoid any symbol misdetections.
The signal is sampled twice, once at the symbol center and once at
the expected edge position. Comparing the symbol at both positions gives
an indication if the current bit width is too low or too high. Adjust
accordingly.
Daniel Elstner [Sat, 3 Oct 2015 09:40:33 +0000 (11:40 +0200)]
init: Simplify srd_decoder_searchpath_add()
Don't mess with colon-separated search path strings -- instead,
simply prepend items to the sys.path list object. Also keep the
internal decoder path list in the same order as the items added
to sys.path.
Daniel Elstner [Tue, 15 Sep 2015 09:42:05 +0000 (11:42 +0200)]
jitter, pwm: Avoid Unicode string literals
It seems the Python we ship along our Windows binaries does not
support u"..." strings, even though it's been a language feature
since Python 2. Remove the "u" prefix to avoid a syntax error.
Also, consistently use format "%.1f" at all scales.
Daniel Elstner [Sun, 13 Sep 2015 20:07:11 +0000 (22:07 +0200)]
Build: Include <config.h> first in all source files
Since Autoconf places some important feature flags only into the
configuration header, it is necessary to include it globally to
guarantee a consistent build.
Daniel Elstner [Sun, 13 Sep 2015 19:10:40 +0000 (21:10 +0200)]
log: Remove srd_log_logdomain_{get,set} from the API
The confusingly named srd_log_logdomain_set() simply set a global
string prefixed to the log message by the default log callback.
This is pretty much useless, misleadingly named, and not used by
either sigrok-cli or PulseView.
Uwe Hermann [Tue, 1 Sep 2015 18:13:27 +0000 (20:13 +0200)]
jtag_stm32: Fix incorrect handling of registers.
The STM32F10xxx has two serially connected JTAG TAPs, the boundary scan tap
(5 bits) and the Cortex-M3 TAP (4 bits). See UM 31.5 "STM32F10xxx JTAG TAP
connection" for details.
Due to this, we need to ignore the last bit of each data shift (and we
currently ignore the 5 bits of the boundary scan tap).