]> sigrok.org Git - libsigrokdecode.git/log
libsigrokdecode.git
8 years agoUse a Python list (not tuple) for OUT_BINARY.
Uwe Hermann [Wed, 23 Dec 2015 19:00:45 +0000 (20:00 +0100)]
Use a Python list (not tuple) for OUT_BINARY.

This is more consistent with annotation syntax and looks slightly
better in most cases.

8 years agoDrop obsolete support for annotation tuples (only support lists).
Uwe Hermann [Sun, 20 Dec 2015 16:49:31 +0000 (17:49 +0100)]
Drop obsolete support for annotation tuples (only support lists).

None of the PDs use this.

8 years agoem4100: Simplify the code a bit.
Uwe Hermann [Fri, 18 Dec 2015 16:42:16 +0000 (17:42 +0100)]
em4100: Simplify the code a bit.

8 years agoem4100: Use ss/es naming for consistency across PDs.
Uwe Hermann [Fri, 18 Dec 2015 16:29:10 +0000 (17:29 +0100)]
em4100: Use ss/es naming for consistency across PDs.

8 years agoem4100: Eliminate some unnecessary int()s.
Uwe Hermann [Fri, 18 Dec 2015 16:21:47 +0000 (17:21 +0100)]
em4100: Eliminate some unnecessary int()s.

8 years agoem4100: Change annotation setup a bit, decode more protocol details.
Uwe Hermann [Fri, 18 Dec 2015 17:14:06 +0000 (18:14 +0100)]
em4100: Change annotation setup a bit, decode more protocol details.

8 years agoAdd RFID EM4100 protocol decoding
Benjamin Larsson [Tue, 15 Dec 2015 00:00:01 +0000 (01:00 +0100)]
Add RFID EM4100 protocol decoding

8 years agousb_power_delivery: Use "if not self.samplerate" form.
Uwe Hermann [Wed, 16 Dec 2015 17:14:30 +0000 (18:14 +0100)]
usb_power_delivery: Use "if not self.samplerate" form.

Use the "if not self.samplerate" form, which catches both the case
where self.samplerate is None, as well as the case where it is 0.

This is also consistent with all the other PDs.

8 years agousb_power_delivery: convert double quotes to single quotes
Vincent Palatin [Wed, 25 Nov 2015 17:19:58 +0000 (09:19 -0800)]
usb_power_delivery: convert double quotes to single quotes

For consistency with other decoders, convert all the double quotes around
strings to single quotes.

Signed-off-by: Vincent Palatin <redacted>
8 years agoinit: Don't let Python override signal handlers
Marcus Comstedt [Fri, 4 Dec 2015 21:36:17 +0000 (22:36 +0100)]
init: Don't let Python override signal handlers

This fixes bug #461.

8 years agousb*: Minor cosmetics.
Uwe Hermann [Fri, 4 Dec 2015 21:11:14 +0000 (22:11 +0100)]
usb*: Minor cosmetics.

8 years agousb_signalling: detect PREamble PID
Stefan Brüns [Tue, 1 Dec 2015 05:44:43 +0000 (06:44 +0100)]
usb_signalling: detect PREamble PID

PID decoding is normally done in the packet layer, but the signalling
layer has to switch behaviour on detection of an PREamble PID.

8 years agousb_signalling: add signaling states needed after LS PREamble PID
Stefan Brüns [Tue, 1 Dec 2015 05:48:02 +0000 (06:48 +0100)]
usb_signalling: add signaling states needed after LS PREamble PID

8 years agousb_{packet,request}: handle PREamble transmissions
Stefan Brüns [Tue, 1 Dec 2015 04:53:32 +0000 (05:53 +0100)]
usb_{packet,request}: handle PREamble transmissions

9 years agousb_signalling: fix SOP detection after an error condition
Stefan Brüns [Sun, 29 Nov 2015 23:35:11 +0000 (00:35 +0100)]
usb_signalling: fix SOP detection after an error condition

If the oldsym is not set to 'J' before entering IDLE state, the SOP
detection will never trigger

9 years agousb_packet: handle errors from usb_signalling
Stefan Brüns [Sun, 29 Nov 2015 23:00:03 +0000 (00:00 +0100)]
usb_packet: handle errors from usb_signalling

If a packet had any errors, the usb_signalling PD will not send an EOP
but an ERR message. Wait for the next SOP in both cases.

9 years agousb_request: Handle transmission timeouts
Stefan Brüns [Sun, 29 Nov 2015 22:56:53 +0000 (23:56 +0100)]
usb_request: Handle transmission timeouts

If a device or host did not receive a handshake 18 bit times after the
EOP, there was a transmission error and the host may repeat the
transmission

9 years agousb_signalling: add option to automatically set signalling speed
Stefan Brüns [Fri, 13 Nov 2015 06:15:36 +0000 (07:15 +0100)]
usb_signalling: add option to automatically set signalling speed

In automatic mode, the bus is assumed to be in IDLE state. After a
RESET, the bus state is checked again.

9 years agousb_signalling: decode RESET and Keep-Alive signalling conditions
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

9 years agousb_signalling: use explicit positions for packet start/end
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.

9 years agousb_signalling: handle symbol errors in EOP state
Stefan Brüns [Fri, 13 Nov 2015 03:55:56 +0000 (04:55 +0100)]
usb_signalling: handle symbol errors in EOP state

Only SE0 and J are valid symbols during EOP

9 years agousb_signalling: remove unneeded syms array
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.

9 years agousb_signalling: remove unused ss_sop member
Stefan Brüns [Fri, 13 Nov 2015 03:20:54 +0000 (04:20 +0100)]
usb_signalling: remove unused ss_sop member

9 years agousb_signalling: detect bit stuffing errors
Stefan Brüns [Fri, 13 Nov 2015 03:11:37 +0000 (04:11 +0100)]
usb_signalling: detect bit stuffing errors

More than six consecutive 1's are an error

9 years agousb_signalling: consolidate symbol output
Stefan Brüns [Fri, 13 Nov 2015 03:05:24 +0000 (04:05 +0100)]
usb_signalling: consolidate symbol output

No need to replicate the symbol formatting in several places

9 years agospi: Add a 'TRANSFER' output type.
Paul "LeoNerd" Evans [Sun, 8 Nov 2015 00:49:08 +0000 (00:49 +0000)]
spi: Add a 'TRANSFER' output type.

9 years agoFix documentation comment in SPI decoder
Paul "LeoNerd" Evans [Sat, 7 Nov 2015 23:39:59 +0000 (23:39 +0000)]
Fix documentation comment in SPI decoder

9 years agousb_power_delivery: Minor typo and whitespace fixes.
Uwe Hermann [Sat, 21 Nov 2015 19:18:47 +0000 (20:18 +0100)]
usb_power_delivery: Minor typo and whitespace fixes.

9 years agousb_power_delivery: Use the same license header format as other PDs.
Uwe Hermann [Sat, 21 Nov 2015 18:35:15 +0000 (19:35 +0100)]
usb_power_delivery: Use the same license header format as other PDs.

9 years agoUSB Power Delivery protocol decoder
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.

Signed-off-by: Vincent Palatin <redacted>
9 years agospiflash: Fix incorrect 'inputs' field.
Uwe Hermann [Sat, 21 Nov 2015 17:43:06 +0000 (18:43 +0100)]
spiflash: Fix incorrect 'inputs' field.

(this PD is indeed stacked on top of SPI)

9 years agoInitial attempt at MAX7219/MAX7221 decoder
Paul "LeoNerd" Evans [Tue, 3 Nov 2015 14:02:11 +0000 (14:02 +0000)]
Initial attempt at MAX7219/MAX7221 decoder

9 years agosrd_decoder_unload(): Remove PD from the internal list.
Uwe Hermann [Tue, 3 Nov 2015 01:12:49 +0000 (02:12 +0100)]
srd_decoder_unload(): Remove PD from the internal list.

This issue was discovered via the newly added unit tests.

9 years agotests/decoder.c: Add some srd_decoder_unload*() tests.
Uwe Hermann [Tue, 3 Nov 2015 01:12:29 +0000 (02:12 +0100)]
tests/decoder.c: Add some srd_decoder_unload*() tests.

9 years agoUART: Handle framing errors better
Elrond [Wed, 21 Oct 2015 14:17:19 +0000 (16:17 +0200)]
UART: Handle framing errors better

1. Show Frame Error on the Start bit
2. Don't overwrite framing errors with (valid) start/stop bit info

9 years agoexception: Decorate catch function with format attribute
Daniel Elstner [Tue, 6 Oct 2015 20:42:52 +0000 (22:42 +0200)]
exception: Decorate catch function with format attribute

9 years agobuild: Require GLib 2.28.0
Daniel Elstner [Tue, 6 Oct 2015 19:08:36 +0000 (21:08 +0200)]
build: Require GLib 2.28.0

This is needed for e.g. g_slist_free_full(), which incidentally
has been in use for a while already.

9 years agoutil: Factor out Python module load
Daniel Elstner [Tue, 6 Oct 2015 20:30:14 +0000 (22:30 +0200)]
util: Factor out Python module load

Create a utility function for loading a Python module by its name
in UTF-8.

9 years agodecoder: Refactor loading code and plug leaks
Daniel Elstner [Tue, 6 Oct 2015 19:07:47 +0000 (21:07 +0200)]
decoder: Refactor loading code and plug leaks

9 years agoPython: Restrict code to stable ABI subset
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.

9 years agousb_request: USB transaction decoder and PCAP generator
Stefan Brüns [Sat, 3 Oct 2015 22:43:38 +0000 (00:43 +0200)]
usb_request: USB transaction decoder and PCAP generator

The new decoder stacks on top of the usb_packet PD. It adds one new
annotation row, and is able to save the decoded data as PCAP trace.

It has been successfully tested against all traces in sigrok-dumps and
some more traces.

9 years agousb_packet: Document CRC5 ERROR and CRC16 ERROR packets.
Uwe Hermann [Tue, 6 Oct 2015 06:29:56 +0000 (08:29 +0200)]
usb_packet: Document CRC5 ERROR and CRC16 ERROR packets.

9 years agousb_{signalling,packet}: Minor cosmetics.
Uwe Hermann [Tue, 6 Oct 2015 06:28:03 +0000 (08:28 +0200)]
usb_{signalling,packet}: Minor cosmetics.

9 years agousb_signalling: Track USB symbol width to compensate frequency errors
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.

9 years agousb_packet: calculate and check CRC5/CRC16
Stefan Brüns [Wed, 30 Sep 2015 22:12:29 +0000 (00:12 +0200)]
usb_packet: calculate and check CRC5/CRC16

In case CRC validation fails, an crc5-err/crc16-err annotation is issued,
instead of crc5-ok/crc16-ok, and the error is noted in the annotation
text.

9 years agorfm12: fix small typo
Roland Hieber [Sun, 4 Oct 2015 21:04:02 +0000 (23:04 +0200)]
rfm12: fix small typo

There is a small typo in the rfm12 protocol decoder that I just noticed:

9 years agotests: Do not reference parent directory in includes
Daniel Elstner [Sat, 3 Oct 2015 12:28:43 +0000 (14:28 +0200)]
tests: Do not reference parent directory in includes

Rely on the compiler include path instead.

9 years agotests: Rename DECODERS_DIR to DECODERS_TESTDIR
Daniel Elstner [Sat, 3 Oct 2015 12:21:01 +0000 (14:21 +0200)]
tests: Rename DECODERS_DIR to DECODERS_TESTDIR

Avoid confusion resulting from using the same macro name for
different purposes.

9 years agobuild: Do not hard-code decoders location on Windows
Daniel Elstner [Sat, 3 Oct 2015 12:17:07 +0000 (14:17 +0200)]
build: Do not hard-code decoders location on Windows

9 years agoinit: Also look for decoders in XDG data directories
Daniel Elstner [Sat, 3 Oct 2015 11:18:09 +0000 (13:18 +0200)]
init: Also look for decoders in XDG data directories

9 years agoinit: Simplify srd_decoder_searchpath_add()
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.

9 years agojitter, pwm: Avoid Unicode string literals
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.

This fixes bug #569.

9 years agocan: Improve stuff bit annotation placement.
Uwe Hermann [Mon, 14 Sep 2015 17:05:54 +0000 (19:05 +0200)]
can: Improve stuff bit annotation placement.

9 years agocan: Emit bit value annotations.
Uwe Hermann [Mon, 14 Sep 2015 16:25:02 +0000 (18:25 +0200)]
can: Emit bit value annotations.

9 years agoMakefile.am: Shorten ChangeLog target a bit.
Uwe Hermann [Mon, 14 Sep 2015 15:56:46 +0000 (17:56 +0200)]
Makefile.am: Shorten ChangeLog target a bit.

9 years agolog: Use GLib printf for consistency
Daniel Elstner [Sun, 13 Sep 2015 21:05:42 +0000 (23:05 +0200)]
log: Use GLib printf for consistency

Just as in libsigrok, use g_vfprintf() in the log callback to make
sure we are linking to a standard-conforming printf implementation.

9 years agoBuild: Move _POSIX_C_SOURCE definition to config.h
Daniel Elstner [Sun, 13 Sep 2015 20:10:54 +0000 (22:10 +0200)]
Build: Move _POSIX_C_SOURCE definition to config.h

Do not redefine it though when already set, so that it can be
overridden by the user, or indirectly by the compiler settings.

9 years agoBuild: Include <config.h> first in all source files
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.

9 years agoFix srd_log() format warnings
Daniel Elstner [Sun, 13 Sep 2015 20:01:34 +0000 (22:01 +0200)]
Fix srd_log() format warnings

9 years agolog: Enable varargs format warnings
Daniel Elstner [Sun, 13 Sep 2015 19:32:27 +0000 (21:32 +0200)]
log: Enable varargs format warnings

Decorate srd_log() with the GCC format printf attribute so that the
compiler can check the format string and arguments for consistency.

Also remove the srd_err(), sr_warn(), etc. functions and replace
them with macro wrappers around srd_log().

9 years agolog: Remove srd_log_logdomain_{get,set} from the API
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.

9 years agoinstance.c: Don't use 'di' before NULL-checking it.
Uwe Hermann [Thu, 10 Sep 2015 16:19:47 +0000 (18:19 +0200)]
instance.c: Don't use 'di' before NULL-checking it.

9 years agoBuild: Put --no-print-directory into GNUMAKEFLAGS
Daniel Elstner [Thu, 10 Sep 2015 16:45:50 +0000 (18:45 +0200)]
Build: Put --no-print-directory into GNUMAKEFLAGS

Also output the compiler version in the configuration summary.

9 years agosigrok.m4: Update with latest version from libsigrok
Daniel Elstner [Thu, 10 Sep 2015 16:44:55 +0000 (18:44 +0200)]
sigrok.m4: Update with latest version from libsigrok

9 years agolibsigrokdecode.pc: Publish decodersdir variable
Daniel Elstner [Sun, 6 Sep 2015 08:53:54 +0000 (10:53 +0200)]
libsigrokdecode.pc: Publish decodersdir variable

This is so that downstream modules can find the install location
of the decoders.

9 years agoBuild: Show CC and CFLAGS in configuration summary
Daniel Elstner [Sun, 6 Sep 2015 08:51:22 +0000 (10:51 +0200)]
Build: Show CC and CFLAGS in configuration summary

9 years agojtag_stm32: Decode IDCODE contents as strings (not just hex vals).
Uwe Hermann [Thu, 3 Sep 2015 07:19:56 +0000 (09:19 +0200)]
jtag_stm32: Decode IDCODE contents as strings (not just hex vals).

9 years agojtag_stm32: Decode more fields, improve IDCODE handling.
Uwe Hermann [Thu, 3 Sep 2015 06:36:21 +0000 (08:36 +0200)]
jtag_stm32: Decode more fields, improve IDCODE handling.

9 years agojtag_stm32: Cleanups, shorter code.
Uwe Hermann [Wed, 2 Sep 2015 19:06:01 +0000 (21:06 +0200)]
jtag_stm32: Cleanups, shorter code.

9 years agojtag_stm32: Update to reflect change in jtag OUT_PYTHON.
Uwe Hermann [Wed, 2 Sep 2015 18:49:47 +0000 (20:49 +0200)]
jtag_stm32: Update to reflect change in jtag OUT_PYTHON.

9 years agojtag: Submit bit samplenumbers together with the bits.
Uwe Hermann [Wed, 2 Sep 2015 18:49:20 +0000 (20:49 +0200)]
jtag: Submit bit samplenumbers together with the bits.

9 years agojtag_stm32: Fix incorrect handling of registers.
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).

9 years agojtag: Add more annotations, fix a SHIFT-IR/-DR issue.
Uwe Hermann [Sat, 15 Aug 2015 22:37:34 +0000 (00:37 +0200)]
jtag: Add more annotations, fix a SHIFT-IR/-DR issue.

The code was previously not decoding a bit for the first state change
to SHIFT-IR/-DR, which was incorrect.

9 years agojtag: Fix/enable OUT_PYTHON output.
Uwe Hermann [Fri, 14 Aug 2015 18:05:34 +0000 (20:05 +0200)]
jtag: Fix/enable OUT_PYTHON output.

9 years agoReplace another -D_DEFAULT_SOURCE with -D_POSIX_C_SOURCE=200112L.
Uwe Hermann [Fri, 28 Aug 2015 17:25:09 +0000 (19:25 +0200)]
Replace another -D_DEFAULT_SOURCE with -D_POSIX_C_SOURCE=200112L.

9 years agoBuild: Go back to _POSIX_C_SOURCE=200112L
Uwe Hermann [Fri, 28 Aug 2015 16:34:34 +0000 (18:34 +0200)]
Build: Go back to _POSIX_C_SOURCE=200112L

9 years agoconfigure: Enable largefile support on 32-bit systems
Daniel Elstner [Wed, 26 Aug 2015 21:12:28 +0000 (23:12 +0200)]
configure: Enable largefile support on 32-bit systems

9 years agoBuild: Define feature test macro _DEFAULT_SOURCE
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.

9 years agoBuild: Use TESTS prefix instead of CHECK for flag variables
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.

9 years agoClean up .gitignore
Daniel Elstner [Tue, 25 Aug 2015 01:06:33 +0000 (03:06 +0200)]
Clean up .gitignore

9 years agoBuild: Adopt new Autotools magic
Daniel Elstner [Tue, 25 Aug 2015 00:59:48 +0000 (02:59 +0200)]
Build: Adopt new Autotools magic

9 years agoBuild: Reduce autogen.sh to trivial stub
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.

9 years agoBuild: Add copy of libsigrok Autoconf macro file
Daniel Elstner [Mon, 24 Aug 2015 19:07:42 +0000 (21:07 +0200)]
Build: Add copy of libsigrok Autoconf macro file

9 years agonunchuk: Fix inverted button press logic.
Uwe Hermann [Fri, 21 Aug 2015 12:50:04 +0000 (14:50 +0200)]
nunchuk: Fix inverted button press logic.

The buttons are pressed if the respective bit is 0.

9 years agoPass unitsize per sample chunk.
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.

This fixes (parts of) bug #352.

9 years agomrf24j40: Fix a register address typo.
Uwe Hermann [Tue, 18 Aug 2015 06:24:29 +0000 (08:24 +0200)]
mrf24j40: Fix a register address typo.

9 years agotlc5620: Add options for per-DAC Vref, show voltages.
Uwe Hermann [Mon, 17 Aug 2015 20:04:46 +0000 (22:04 +0200)]
tlc5620: Add options for per-DAC Vref, show voltages.

Instead of showing raw values in the annotations, calculate the
actual voltage (based on raw value, gain, and Vref) and use that.

9 years agotlc5620: Handle the case of less than 11 bits in a command.
Uwe Hermann [Mon, 17 Aug 2015 20:05:06 +0000 (22:05 +0200)]
tlc5620: Handle the case of less than 11 bits in a command.

9 years agotlc5620: Properly handle LOAD and LDAC based operations.
Uwe Hermann [Mon, 17 Aug 2015 20:01:37 +0000 (22:01 +0200)]
tlc5620: Properly handle LOAD and LDAC based operations.

- If LOAD goes low *and* LDAC is already low, the voltage is set
  immediately.

- If LOAD goes low but LDAC is high, the value is only written into
  an internal register, but the voltage is not changed (yet).

- If LDAC goes low, all four DAC voltages (DAC A/B/C/D) are set
  according to the respective register values at the same time.

9 years agotlc5620: Only decode the last 11 bits, ignore the rest.
Uwe Hermann [Mon, 17 Aug 2015 19:46:22 +0000 (21:46 +0200)]
tlc5620: Only decode the last 11 bits, ignore the rest.

9 years agotlc5620: Fix incorrect DAC selection decode, add more annotations.
Uwe Hermann [Mon, 17 Aug 2015 19:28:21 +0000 (21:28 +0200)]
tlc5620: Fix incorrect DAC selection decode, add more annotations.

9 years agousb_packet: Handle invalid packets more gracefully.
Uwe Hermann [Fri, 14 Aug 2015 17:01:39 +0000 (19:01 +0200)]
usb_packet: Handle invalid packets more gracefully.

Previously the PD was blindly trying to decode any packet, no matter
whether it was too short (and/or bogus) or not, causing issues like this:

  srd: Calling usb_packet decode(): IndexError: list index out of range

Such cases of invalid input are now handled better by emitting "UNKNOWN"
and "Invalid packet" annotations.

This fixes bug #186.

9 years agousb_packet: Fix incorrect DATA*/MDATA handling.
Uwe Hermann [Fri, 14 Aug 2015 11:48:08 +0000 (13:48 +0200)]
usb_packet: Fix incorrect DATA*/MDATA handling.

Thanks to Pavel Sukortsev for the bug report and fix.

This fixes bug #623.

9 years agoAdd initial SD card (SD mode) decoder.
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.

9 years agoSlightly more verbose logging in srd_inst_decode().
Uwe Hermann [Thu, 23 Jul 2015 15:12:41 +0000 (17:12 +0200)]
Slightly more verbose logging in srd_inst_decode().

9 years agoBump version to 0.4.0 (the upcoming next major release).
Uwe Hermann [Sat, 18 Jul 2015 16:04:08 +0000 (18:04 +0200)]
Bump version to 0.4.0 (the upcoming next major release).

9 years agoAppend "-git" to the version string.
Uwe Hermann [Sat, 18 Jul 2015 15:59:19 +0000 (17:59 +0200)]
Append "-git" to the version string.

This avoids confusion with the released tarballs.

9 years agoAdd protocol decoder for Modbus RTU.
Bart de Waal [Mon, 13 Jul 2015 21:59:55 +0000 (23:59 +0200)]
Add protocol decoder for Modbus RTU.

9 years agoqi: Add Qi charger protocol decoder
Josef Gajdusek [Thu, 9 Jul 2015 10:54:28 +0000 (12:54 +0200)]
qi: Add Qi charger protocol decoder

9 years agoAdd an MDIO/SMI decoder.
Aurelien Jacobs [Sat, 6 Jun 2015 20:05:06 +0000 (22:05 +0200)]
Add an MDIO/SMI decoder.