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).
Daniel Elstner [Wed, 26 Aug 2015 12:07:39 +0000 (14:07 +0200)]
Build: Define feature test macro _DEFAULT_SOURCE
This basically makes glibc expose the same set of features as
if gcc was invoked without any restricting -std=c* option. Unlike
_GNU_SOURCE however, it does not enable GNU-specific extensions.
So, with this macro defined the behavior of Linux with glibc
should match that of other platforms.
Daniel Elstner [Wed, 26 Aug 2015 11:01:16 +0000 (13:01 +0200)]
Build: Use TESTS prefix instead of CHECK for flag variables
In order to avoid confusion of the flags-gathering pkg-config
result with the actual test for the availability of "check",
change the pkg-config output variable prefix from CHECK to TESTS.
Daniel Elstner [Mon, 24 Aug 2015 19:09:47 +0000 (21:09 +0200)]
Build: Reduce autogen.sh to trivial stub
Use autoreconf instead of invoking the various Auto tools
separately. Get rid of the Darwin-specific guesswork -- it does
not make sense to handle this at the level of libsigrokdecode.
People should set up their ACLOCAL_PATH themselves as appropriate
for their own system; just as they already need to set up various
other paths.
Uwe Hermann [Thu, 20 Aug 2015 17:36:12 +0000 (19:36 +0200)]
Pass unitsize per sample chunk.
Don't pass unitsize to srd_inst_channel_set_all(), have that only
set the channel map. Instead, srd_session_send() now has a parameter
for the unitsize which is passed with every new chunk to be decoded.
This is in preparation to fix issues with devices or files which
have a unitsize != 1 and where the "guessed" unitsize based on the
number of channels is not correct.
This also allows for (potential) future changes where every chunk can
indeed have a different unitsize.
Uwe Hermann [Thu, 6 Aug 2015 17:27:04 +0000 (19:27 +0200)]
Add initial SD card (SD mode) decoder.
In the current state the decoder can decode the following commands:
CMD0, CMD2, CMD3, CMD6, CMD7, CMD8, CMD9, CMD10, CMD13, CMD16, CMD55,
ACMD6, ACMD13, ACMD41, ACMD51.
Other commands (and more details for existing commands) will be added later.
Karl Palsson [Wed, 27 May 2015 01:25:16 +0000 (01:25 +0000)]
Add a Microchip MRF24J40 802.15.4 2.4GHz RF tranceiver decoder.
No interpretation of register bits, nor attempting to decode packet contents,
but all shifted register addresses and long register memory regions are
decoded.
Andreas Sandberg [Fri, 13 Feb 2015 21:42:01 +0000 (21:42 +0000)]
spi: Don't decode data lines if CS isn't asserted
Avoid decoding and outputting data from the SPI bus if the CS pin
hasn't been asserted. This avoids confusing both users and stacked
decoders which otherwise end up seeing traffic intended for other
chips (or just noise).
Note: The old behavior of decoding all traffic is still in place if
no CS pin has been wired up to the decoder.
Petteri Aimonen [Sat, 7 Mar 2015 13:55:18 +0000 (15:55 +0200)]
Fix a few decoding bugs with arm_etmv3.
Fixed:
- wrong address decoding for some branches
- error in annotation lists for exception entry/exit
- exception was being thrown for 0E0N p-header packets
- fixes to objdump output parsing, better function name & source code matching
New features:
- added decoding of IRQ names for branch exception info
- added support for -C option to objdump to decode C++ symbol names
- put branches on the "Exceptions" annotation row when they contain exception info.