]> sigrok.org Git - libsigrokdecode.git/log
libsigrokdecode.git
10 years agoDrop outdated report: this should be handled by a frontend.
Bert Vermeulen [Thu, 14 Nov 2013 20:55:09 +0000 (21:55 +0100)]
Drop outdated report: this should be handled by a frontend.

10 years agoUse the new Decoder.register() API
Bert Vermeulen [Thu, 14 Nov 2013 16:25:53 +0000 (17:25 +0100)]
Use the new Decoder.register() API

10 years agoEmit meta bitrate
Bert Vermeulen [Thu, 14 Nov 2013 13:55:09 +0000 (14:55 +0100)]
Emit meta bitrate

10 years agoEmit meta bitrate
Bert Vermeulen [Wed, 13 Nov 2013 23:36:16 +0000 (00:36 +0100)]
Emit meta bitrate

10 years agoPrune dead code
Bert Vermeulen [Wed, 13 Nov 2013 23:32:03 +0000 (00:32 +0100)]
Prune dead code

10 years agoImplement OUTPUT_META
Bert Vermeulen [Wed, 13 Nov 2013 23:19:28 +0000 (00:19 +0100)]
Implement OUTPUT_META

This replaces the Decoder.add() method with Decoder.register().
The first argument is still output type, but all arguments are now
optional:

  Decoder.register(output_type,
        id='someid',
        meta=(object-type, 'Name', 'Description'))

'id' defaults to the protocol decoder instance id, and only needs changing
if a decoder chain needs to fork.
'object-type' refers to a Python object, such as int or str.

After registering, the PD submits data as usual with Decoder.put(), with
the only argument a value of the registered object-type.

10 years agoSplit annotation-specific output to another struct
Bert Vermeulen [Thu, 7 Nov 2013 21:38:47 +0000 (22:38 +0100)]
Split annotation-specific output to another struct

struct srd_proto_data was supposed to be independent of the output
type, but a field specific to annotations snuck in there.

10 years agoMinor code cleanup
Bert Vermeulen [Thu, 7 Nov 2013 14:02:10 +0000 (15:02 +0100)]
Minor code cleanup

10 years agoRename inter-PD output type to SRD_OUTPUT_PYTHON
Bert Vermeulen [Tue, 5 Nov 2013 10:21:33 +0000 (11:21 +0100)]
Rename inter-PD output type to SRD_OUTPUT_PYTHON

This better reflects what it is: a python object generated and
processed by python code.

10 years agounittests: Update to recent API changes.
Uwe Hermann [Thu, 31 Oct 2013 11:25:58 +0000 (12:25 +0100)]
unittests: Update to recent API changes.

srd_session_config_set() is now called srd_session_metadata_set(), and
SRD_CONF_NUM_PROBES and SRD_CONF_UNITSIZE are dropped.

10 years agoThe start() method no longer takes a metadata parameter
Bert Vermeulen [Wed, 30 Oct 2013 21:35:41 +0000 (22:35 +0100)]
The start() method no longer takes a metadata parameter

10 years agoReceive samplerate via metadata(), not start()
Bert Vermeulen [Wed, 30 Oct 2013 21:25:45 +0000 (22:25 +0100)]
Receive samplerate via metadata(), not start()

10 years agoPass metadata to PDs only at runtime, not at decoder start
Bert Vermeulen [Wed, 30 Oct 2013 15:30:05 +0000 (16:30 +0100)]
Pass metadata to PDs only at runtime, not at decoder start

The SRD_CONF_NUM_PROBES metadata key was removed. It wasn't actually
used for anything, since this is trivially available via the configured
(or default) probe list.

The SRD_CONF_UNITSIZE key was removed. The unit size is instead derived
from the probe list: the number of probes packed into the least amount
of space possible defines the unit size.

PD changes:
* The start() method no longer takes a 'metadata' parameter.
* Metadata now comes in only via the metadata() method, which takes
  a key and value. The only key defined so far is SRD_CONF_SAMPLERATE,
  which is exported into the module namespace.

API changes:
* srd_session_send() now takes an end_samplenum parameter, and had its
  options rearranged.
* srd_session_config_set() is now srd_session_metadata_set(). This keeps
  "config" options for a future feature to allow PDs or frontends to
  configure each other's options on the fly, up and down the stack.

10 years agoDocumentation and coding style fixes
Bert Vermeulen [Wed, 30 Oct 2013 14:22:10 +0000 (15:22 +0100)]
Documentation and coding style fixes

10 years agoAdd a 'guess_bitrate' protocol decoder.
Uwe Hermann [Wed, 23 Oct 2013 17:59:50 +0000 (19:59 +0200)]
Add a 'guess_bitrate' protocol decoder.

This PD tries to guess / detect / estimate a bitrate of e.g. some
UART communication snippet or other protocols.

10 years agocontroller.c: Add checks for srd_inst_option_set().
Uwe Hermann [Wed, 23 Oct 2013 17:23:40 +0000 (19:23 +0200)]
controller.c: Add checks for srd_inst_option_set().

This also fixes some unit tests that were previously failing.

10 years agotestsuite: Add some decoder instance related tests.
Uwe Hermann [Wed, 23 Oct 2013 17:21:45 +0000 (19:21 +0200)]
testsuite: Add some decoder instance related tests.

10 years agoparallel: Limit number of probes to 8 for now.
Uwe Hermann [Mon, 21 Oct 2013 20:59:25 +0000 (22:59 +0200)]
parallel: Limit number of probes to 8 for now.

This will be increased again at some later point.

10 years agosession: Add some more parameter checks, minor other fixes.
Uwe Hermann [Sun, 20 Oct 2013 21:09:46 +0000 (23:09 +0200)]
session: Add some more parameter checks, minor other fixes.

Some of these also fix unit tests that were previously failing.

10 years agotestsuite: Add a few session related unit tests.
Uwe Hermann [Fri, 18 Oct 2013 17:39:30 +0000 (19:39 +0200)]
testsuite: Add a few session related unit tests.

10 years agoAdd initial sync parallel bus decoder.
Uwe Hermann [Sat, 19 Oct 2013 19:36:49 +0000 (21:36 +0200)]
Add initial sync parallel bus decoder.

10 years agoReport invalid module name on decoder load
Bert Vermeulen [Thu, 17 Oct 2013 21:52:15 +0000 (23:52 +0200)]
Report invalid module name on decoder load

10 years agotestsuite: Add a few more unit tests.
Uwe Hermann [Thu, 17 Oct 2013 20:44:29 +0000 (22:44 +0200)]
testsuite: Add a few more unit tests.

10 years agoMinor cosmetics, typos, Doxygen updates/fixes.
Uwe Hermann [Thu, 17 Oct 2013 20:42:34 +0000 (22:42 +0200)]
Minor cosmetics, typos, Doxygen updates/fixes.

10 years agoAvoid clobbering class variables when setting instance options
Bert Vermeulen [Thu, 17 Oct 2013 14:27:54 +0000 (16:27 +0200)]
Avoid clobbering class variables when setting instance options

10 years agoDon't release borrowed reference
Bert Vermeulen [Thu, 17 Oct 2013 14:26:58 +0000 (16:26 +0200)]
Don't release borrowed reference

10 years ago.gitignore: Add some missing entries.
Uwe Hermann [Thu, 17 Oct 2013 00:05:09 +0000 (02:05 +0200)]
.gitignore: Add some missing entries.

10 years agotestsuite: Add some basic tests for loading PDs.
Uwe Hermann [Wed, 16 Oct 2013 23:48:08 +0000 (01:48 +0200)]
testsuite: Add some basic tests for loading PDs.

10 years agoAdd a testsuite for libsigrokdecode.
Uwe Hermann [Wed, 16 Oct 2013 17:37:44 +0000 (19:37 +0200)]
Add a testsuite for libsigrokdecode.

This uses the Check unit testing framework, just like libsigrok.
For now, only a few very basic unit tests are included.

Invocation:

  make check

10 years agoProperly return error on exception in srd_inst_option_set()
Bert Vermeulen [Wed, 16 Oct 2013 09:10:27 +0000 (11:10 +0200)]
Properly return error on exception in srd_inst_option_set()

10 years agoMove all decoder instances and callbacks into a session struct
Bert Vermeulen [Thu, 12 Sep 2013 21:54:43 +0000 (23:54 +0200)]
Move all decoder instances and callbacks into a session struct

The struct srd_session also holds configuration parameters formerly
passed to srd_session_start().

The new call srd_session_new() takes a pointer where a newly allocated
pointer to struct srd_session will be stored. This pointer must be
passed as the first argument to all functions that require it.

The SRD_CONF_NUM_PROBES, SRD_CONF_UNITSIZE and SRD_CONF_SAMPLERATE
keys must be configured with srd_config_set() before srd_session_start()
is called.

A new call srd_session_destroy() is also available. This cleans up all
resources the session holds. This is also called from srd_exit() for
all sessions.

10 years agoCode cleanup
Bert Vermeulen [Wed, 11 Sep 2013 10:35:17 +0000 (12:35 +0200)]
Code cleanup

10 years agoi2s_dump: Fix bug in the WAV output format generation.
Uwe Hermann [Sun, 13 Oct 2013 16:32:52 +0000 (18:32 +0200)]
i2s_dump: Fix bug in the WAV output format generation.

10 years agoAdd new i2s_dump protocol decoder.
Uwe Hermann [Sun, 13 Oct 2013 15:30:32 +0000 (17:30 +0200)]
Add new i2s_dump protocol decoder.

This stacks of top of the 'i2s' decoder and outputs the audio data to
file (or stdout) in various formats. Currently only WAV is supported.

This is work in progress, it has various hard-coded assumptions.

10 years agotlc5620: Output short/long annotations.
Uwe Hermann [Wed, 9 Oct 2013 17:10:29 +0000 (19:10 +0200)]
tlc5620: Output short/long annotations.

This fixes (the remaining parts of) bug #168.

10 years agotlc5620: Use annotation types.
Uwe Hermann [Wed, 9 Oct 2013 16:59:30 +0000 (18:59 +0200)]
tlc5620: Use annotation types.

This fixes parts of bug #168.

10 years agolpc: Initial start-/end-sample support.
Uwe Hermann [Wed, 9 Oct 2013 20:20:18 +0000 (22:20 +0200)]
lpc: Initial start-/end-sample support.

This fixes (parts of) bug #163.

10 years agolpc: Use annotation types.
Uwe Hermann [Wed, 9 Oct 2013 18:02:39 +0000 (20:02 +0200)]
lpc: Use annotation types.

This fixes (parts of) bug #163.

10 years agolpc: Make the RESET# pin optional.
Uwe Hermann [Wed, 9 Oct 2013 17:48:17 +0000 (19:48 +0200)]
lpc: Make the RESET# pin optional.

10 years agolpc: Fix handling of optional probes.
Uwe Hermann [Wed, 9 Oct 2013 17:24:48 +0000 (19:24 +0200)]
lpc: Fix handling of optional probes.

10 years agolpc: Add annotation helper method.
Uwe Hermann [Wed, 9 Oct 2013 17:21:39 +0000 (19:21 +0200)]
lpc: Add annotation helper method.

This fixes (parts of) bug #163.

10 years agousb_signalling: Drop packet handling.
Uwe Hermann [Thu, 10 Oct 2013 20:44:02 +0000 (22:44 +0200)]
usb_signalling: Drop packet handling.

The usb_signalling PD should not care about packets, only symbols and bits.
The new (fixed) usb_packet PD constructs packets out of individual bits now.

10 years agousb_packet: Major rewrite, e.g. to prepare for GUI usage.
Uwe Hermann [Fri, 4 Oct 2013 09:35:56 +0000 (11:35 +0200)]
usb_packet: Major rewrite, e.g. to prepare for GUI usage.

Restructure the PD into a state machine, output individual packet
components as separate annotations, define a protocol output format and
implement it (so that other PDs can stack on top of this one), and fix
various other isses in the PD.

10 years agoRename usb_protocol to usb_packet.
Uwe Hermann [Wed, 2 Oct 2013 17:29:54 +0000 (19:29 +0200)]
Rename usb_protocol to usb_packet.

There will be further PDs that are stacked on top of usb_packet.

10 years agousb_signalling: Document protocol output format.
Uwe Hermann [Wed, 2 Oct 2013 17:13:44 +0000 (19:13 +0200)]
usb_signalling: Document protocol output format.

Also, add missing output for some packet types.

10 years agoonewire_link: Provide short/long annotations.
Uwe Hermann [Tue, 8 Oct 2013 22:34:41 +0000 (00:34 +0200)]
onewire_link: Provide short/long annotations.

10 years agoonewire_link: Fix typos.
Uwe Hermann [Tue, 8 Oct 2013 22:30:35 +0000 (00:30 +0200)]
onewire_link: Fix typos.

10 years agoonewire_link: Split "reset" and "presence" annotations.
Uwe Hermann [Tue, 8 Oct 2013 22:23:49 +0000 (00:23 +0200)]
onewire_link: Split "reset" and "presence" annotations.

This needs a few more fixes later, but it's a start.

10 years agoonewire_link: Default the 'overdrive' option to 'no'.
Uwe Hermann [Tue, 8 Oct 2013 21:20:15 +0000 (23:20 +0200)]
onewire_link: Default the 'overdrive' option to 'no'.

10 years agoonewire_link: Use defaults for the PD options.
Uwe Hermann [Tue, 8 Oct 2013 21:06:39 +0000 (23:06 +0200)]
onewire_link: Use defaults for the PD options.

This also simplifies the PD code a bit.

10 years agoonewire_link: Drop PD info not useful for the user.
Uwe Hermann [Tue, 8 Oct 2013 15:56:01 +0000 (17:56 +0200)]
onewire_link: Drop PD info not useful for the user.

10 years agoonewire_link: Use annotation types.
Uwe Hermann [Tue, 8 Oct 2013 15:49:55 +0000 (17:49 +0200)]
onewire_link: Use annotation types.

This fixes bug #147.

10 years agoonewire_link: Add/use annotation helpers.
Uwe Hermann [Tue, 8 Oct 2013 15:46:59 +0000 (17:46 +0200)]
onewire_link: Add/use annotation helpers.

10 years agoi2s: Add shorter and longer annotations for GUI use.
Uwe Hermann [Mon, 7 Oct 2013 22:41:28 +0000 (00:41 +0200)]
i2s: Add shorter and longer annotations for GUI use.

This fixes (the remaining parts of) bug #162.

10 years agoi2s: Define/use common proto out format.
Uwe Hermann [Mon, 7 Oct 2013 22:26:54 +0000 (00:26 +0200)]
i2s: Define/use common proto out format.

10 years agoi2s: Add helper methods for annotation/proto output.
Uwe Hermann [Mon, 7 Oct 2013 14:34:51 +0000 (16:34 +0200)]
i2s: Add helper methods for annotation/proto output.

10 years agoi2s: Use annotation types.
Uwe Hermann [Mon, 7 Oct 2013 14:32:11 +0000 (16:32 +0200)]
i2s: Use annotation types.

This fixes parts of bug #162.

10 years agoAdd initial MIDI protocol decoder.
Uwe Hermann [Thu, 18 Jul 2013 19:31:47 +0000 (21:31 +0200)]
Add initial MIDI protocol decoder.

This supports a certain number of MIDI messages already, but not yet all
of them. More will be added later.

10 years agousb_signalling: Fix packet annotation.
Uwe Hermann [Sun, 29 Sep 2013 18:22:51 +0000 (20:22 +0200)]
usb_signalling: Fix packet annotation.

10 years agousb_signalling: Fix EOP handling and annotation.
Uwe Hermann [Sun, 29 Sep 2013 18:19:21 +0000 (20:19 +0200)]
usb_signalling: Fix EOP handling and annotation.

10 years agousb_signalling: Properly use different annotation types.
Uwe Hermann [Sun, 29 Sep 2013 18:05:13 +0000 (20:05 +0200)]
usb_signalling: Properly use different annotation types.

10 years agousb_signalling: Fix decode of individual bits.
Uwe Hermann [Sat, 28 Sep 2013 22:18:24 +0000 (00:18 +0200)]
usb_signalling: Fix decode of individual bits.

After a Start of Packet (SOP) has been detected, "sample" the individual
USB symbolѕ/bits in the middle of the respective bittime (depending on
whether full-speed or low-speed signalling is used).

This fixes various incorrectly decoded cases (bug #158).

10 years agousb_signalling: Simplify symbols handling a bit.
Uwe Hermann [Fri, 20 Sep 2013 14:28:33 +0000 (16:28 +0200)]
usb_signalling: Simplify symbols handling a bit.

10 years agousb_signalling: Refactor/simplify bitrate/bitwidth handling.
Uwe Hermann [Fri, 20 Sep 2013 14:22:33 +0000 (16:22 +0200)]
usb_signalling: Refactor/simplify bitrate/bitwidth handling.

10 years agousb_signalling: Fix start/end sample numbers.
Uwe Hermann [Sun, 15 Sep 2013 18:46:56 +0000 (20:46 +0200)]
usb_signalling: Fix start/end sample numbers.

This makes the decoder suitable for GUI usage.

This fixes bug #155.

10 years agodcf77: Fix date parity check.
Uwe Hermann [Sun, 15 Sep 2013 18:07:03 +0000 (20:07 +0200)]
dcf77: Fix date parity check.

The parity check for certain DCF77 fields/bits was incorrect. It has to be
an even parity over bits 36-58. This is fixed now.

This fixes bug #157.

10 years agodcf77: Provide short and long annotations.
Uwe Hermann [Sun, 15 Sep 2013 16:12:45 +0000 (18:12 +0200)]
dcf77: Provide short and long annotations.

10 years agodcf77: Fix multi-bit DCF77 field annotations.
Uwe Hermann [Sun, 15 Sep 2013 14:50:15 +0000 (16:50 +0200)]
dcf77: Fix multi-bit DCF77 field annotations.

10 years agodcf77: Consistency renames.
Uwe Hermann [Sun, 15 Sep 2013 14:39:59 +0000 (16:39 +0200)]
dcf77: Consistency renames.

10 years agodcf77: Drop PON pin handling.
Uwe Hermann [Sun, 15 Sep 2013 14:33:32 +0000 (16:33 +0200)]
dcf77: Drop PON pin handling.

The PON pin is specific to the Pollin "DCF1 module", but has nothing to
do with DCF77 itself. Thus, drop it from this PD. It can be part of
another stacked PD if needed.

This fixes bug #153.

10 years agodcf77: Use proper annotations for DCF77 components.
Uwe Hermann [Sun, 15 Sep 2013 14:31:00 +0000 (16:31 +0200)]
dcf77: Use proper annotations for DCF77 components.

10 years agodcf77: Fix bug in handling of DCF77 bit 0.
Uwe Hermann [Sat, 14 Sep 2013 21:20:48 +0000 (23:20 +0200)]
dcf77: Fix bug in handling of DCF77 bit 0.

10 years agodcf77: Fix start-/end-sample numbers.
Uwe Hermann [Sat, 14 Sep 2013 21:17:10 +0000 (23:17 +0200)]
dcf77: Fix start-/end-sample numbers.

This fixes bug #154.

10 years agoi2c: Drop unneeded 'addressing' option.
Uwe Hermann [Sat, 14 Sep 2013 18:28:40 +0000 (20:28 +0200)]
i2c: Drop unneeded 'addressing' option.

This (unimplemented so far) option is not needed at all, since the
decoder will be able to detect 7/10 bit slave addresses automatically,
the user doesn't have to specify slave address sizes.

10 years agoi2c: Drop obsolete TODOs.
Uwe Hermann [Sat, 14 Sep 2013 18:10:01 +0000 (20:10 +0200)]
i2c: Drop obsolete TODOs.

10 years agoi2c: Move OUTPUT_PROTO docs to pd.py.
Uwe Hermann [Sat, 14 Sep 2013 17:07:20 +0000 (19:07 +0200)]
i2c: Move OUTPUT_PROTO docs to pd.py.

10 years agoi2c: Moved extensive protocol docs to the wiki.
Uwe Hermann [Sat, 14 Sep 2013 17:06:05 +0000 (19:06 +0200)]
i2c: Moved extensive protocol docs to the wiki.

10 years agoi2c: Various fixes to make the PD suitable for GUIs.
Uwe Hermann [Fri, 13 Sep 2013 17:08:34 +0000 (19:08 +0200)]
i2c: Various fixes to make the PD suitable for GUIs.

The output format of the slave address is now a PD option. It can be
"shifted" or "unshifted", i.e. bit 0 (which contains a read/write
marker) is either shifted out or not, i.e., the slave address is
displayed as 8bit or 7bit number (or 11bit/10bit number for 10bit slave
addresses).

Data bytes (not address bytes) are always shown as 8bit values, of course.

Add annotation types for the individual I2C components such as
start conditions, stop conditions, ACK/NACK, address read/writes,
data read/writes and so on.

This fixes bug #151.

10 years agospi: Add some documentation, move OUTPUT_PROTO docs.
Uwe Hermann [Thu, 12 Sep 2013 19:22:09 +0000 (21:22 +0200)]
spi: Add some documentation, move OUTPUT_PROTO docs.

Add a short help text for the PD and move the OUTPUT_PROTO docs to pd.py
since they're not meant for the user too see.

10 years agospi: Make CS# optional and use it if supplied.
Uwe Hermann [Thu, 12 Sep 2013 19:19:55 +0000 (21:19 +0200)]
spi: Make CS# optional and use it if supplied.

The CS# pin is now optional, it can either be supplied to the PD or not.

If it _is_ supplied, reset the PD state every time it changes. This has
the effect that "incomplete" SPI frames and those where CS# is not
asserted are ignored and not decoded.

This fixes bug #152.

10 years agospi: Refactor code, use a state machine.
Uwe Hermann [Thu, 12 Sep 2013 19:14:06 +0000 (21:14 +0200)]
spi: Refactor code, use a state machine.

10 years agospi: Provide multiple annotation types.
Uwe Hermann [Thu, 12 Sep 2013 19:05:22 +0000 (21:05 +0200)]
spi: Provide multiple annotation types.

For now SPI gets the following annotation types:

 - MISO/MOSI SPI data
 - MISO SPI data
 - MOSI SPI data

(i.e. you can see either MISO, or MOSI, or both; the latter is most
useful for CLI usage)

Also, show the hex values as e.g. F5 (upper-case letters, no "0x" prefix).

10 years agospi: Fix start-/end-sample numbers.
Uwe Hermann [Thu, 12 Sep 2013 18:57:04 +0000 (20:57 +0200)]
spi: Fix start-/end-sample numbers.

This now makes the SPI decoder suitable for use in GUIs.

This fixes bug #150.

10 years agospi: Make data format a PD option, add annotation types.
Uwe Hermann [Thu, 12 Sep 2013 18:45:02 +0000 (20:45 +0200)]
spi: Make data format a PD option, add annotation types.

The data format can be specified via the PD's "format" option now, it is
no longer an annotation type.

Also, add and use two annotation types: "Data" and "Warnings".

10 years agocan: Use proper annotation types for the CAN fields.
Uwe Hermann [Thu, 12 Sep 2013 14:36:25 +0000 (16:36 +0200)]
can: Use proper annotation types for the CAN fields.

This allows GUIs to show different fields in different colors.

10 years agouart: Output data in separate RX and TX annotation types.
Uwe Hermann [Thu, 12 Sep 2013 07:40:40 +0000 (09:40 +0200)]
uart: Output data in separate RX and TX annotation types.

There is one annotation type for the RX side of the communication/data
output now, and another one for the TX side.

This allows GUIs to show them in two different traces, and/or show them in
the same trace but with different colors.

This also has the additional benefit that it is clear which databyte
belongs to which direction. Previously the annotations had to look like
"RX: 5F" or "TX: 11001011", but the "RX: " and "TX: " prefixes are now
no longer required, making the GUI traces (and CLI output too) much more
readable.

10 years agouart: Use same length for data output in all cases.
Uwe Hermann [Thu, 12 Sep 2013 07:32:28 +0000 (09:32 +0200)]
uart: Use same length for data output in all cases.

Until now you could get e.g. "d" or "df" as hex output from the UART PD.

This will now be a common-length "0D" and "DF". When all data byte
annotations are of the same lengths the readability in GUI traces is a lot
better. Also, hardcode hex characters to be upper-case (for now).

The same applies to oct ("021" instead of "21") and bin output
("00001001" instead of "1001").

10 years agouart: Put annotations into proper annotation types.
Uwe Hermann [Thu, 12 Sep 2013 07:17:12 +0000 (09:17 +0200)]
uart: Put annotations into proper annotation types.

There are now extra annotation types for data, start/stop/parity bits and
for warnings (e.g. "invalid parity" or "frame error" or such).

This allows users to select which of the annotation types they want to
see (they can select one/multiple/all annotations as needed), and also
allows them to use different visual representation for the different
annotation types in GUIs (e.g. different colors for the blobs, different
fonts, rectangle/round/elliptic blobs, and so on; how the annotation
blobs are displayed is entirely up to the GUI and its configuration by
the user).

10 years agouart: Move OUTPUT_PROTO format description to pd.py.
Uwe Hermann [Thu, 12 Sep 2013 07:07:53 +0000 (09:07 +0200)]
uart: Move OUTPUT_PROTO format description to pd.py.

This is information that a user (when viewing PD info in a GUI/CLI)
should not see (and doesn't care to see), it is meant for developers only.

Thus, make it a comment in pd.py instead.

10 years agouart: Drop extensive protocol info (moved to wiki).
Uwe Hermann [Thu, 12 Sep 2013 07:01:52 +0000 (09:01 +0200)]
uart: Drop extensive protocol info (moved to wiki).

Move the full details of the protocol to the wiki, the docs in the PD
itself should only be a short description and/or a collection of notes
that could be useful for a user in a GUI (or CLI) to decide which
PD to select, which options to set how, what PDs to stack where, and so on.

The full protocol description (including photos, examples, ...) is here:

  http://sigrok.org/wiki/Protocol_decoder:Uart

10 years agouart: Make data format selection a PD option.
Uwe Hermann [Thu, 12 Sep 2013 06:31:59 +0000 (08:31 +0200)]
uart: Make data format selection a PD option.

Until now we (ab)used annotation types for outputting the same data
(numbers) in different formats (hex, ascii, binary, and so on).

Turn this into a proper PD option, since annotation types should rather be
used for different _types_ of annotations (e.g. "CRC", "Stop bit",
"Preamble", "Sequence counter", "Warnings", and similar things), not
different _formats_ for the same annotation type.

Old sigrok-cli invocation for hex output:

  sigrok-cli ... -P uart:rx=0:tx=1 -A uart=hex

New:

  sigrok-cli ... -P uart:rx=0:tx=1:format=hex

In GUIs there is now a new "Data format" option where the user can
select the output format for UART data (default is 'ascii').

10 years agouart: Use T for stop bit, P for parity bit.
Uwe Hermann [Thu, 12 Sep 2013 06:20:03 +0000 (08:20 +0200)]
uart: Use T for stop bit, P for parity bit.

The short(est) annotations for "Stop bit" and "Parity bit" have both
been "P" until now, which is confusing for users (on certain zoom levels
in GUIs). Use "T" for stop bits now instead.

10 years agouart: Don't prefix databyte output numbers.
Uwe Hermann [Wed, 11 Sep 2013 17:53:31 +0000 (19:53 +0200)]
uart: Don't prefix databyte output numbers.

Previously the output was 0x41 or 0o101 or 0b1000001, now it is 41 or
101 or 1000001. We drop these prefixes, since they decrease the readability
of the PD output (especially when displayed in GUIs) and are not needed
anyway since the user knowingly selected the number format before running
the respective PD.

10 years agouart: Fix corner-case that can occur with LA triggers.
Uwe Hermann [Wed, 11 Sep 2013 17:20:15 +0000 (19:20 +0200)]
uart: Fix corner-case that can occur with LA triggers.

Assume that the initial pin state is 1/high for the RX and TX lines.

This fixes the decode when an LA triggers on e.g. TX=low (the first
sample would be low in that case, so the falling edge for the start bit
would be missed by the decoder).

10 years agouart: Fix start-/end-sample numbers.
Uwe Hermann [Wed, 11 Sep 2013 17:15:51 +0000 (19:15 +0200)]
uart: Fix start-/end-sample numbers.

This now makes the UART decoder suitable for use in GUIs.

This fixes bug #148.

10 years agocan: Use annotation abbreviations.
Uwe Hermann [Tue, 10 Sep 2013 07:33:11 +0000 (09:33 +0200)]
can: Use annotation abbreviations.

Supply long, middle, and short versions for most annotations, so that
GUIs can show nicely readable and useful annotations on various zoom
levels.

10 years agocan: Fix annotation start/end samples.
Uwe Hermann [Mon, 9 Sep 2013 19:48:42 +0000 (21:48 +0200)]
can: Fix annotation start/end samples.

With this change pretty much all CAN annotations that are currently
output should have the correct values, including single-bit and
multi-bit fields, standard and extended CAN frames, and so on.

This fixes #146.

10 years agocan: Prepare for fixing annotation start/end samples.
Uwe Hermann [Mon, 9 Sep 2013 17:38:38 +0000 (19:38 +0200)]
can: Prepare for fixing annotation start/end samples.

10 years agoi2c: Fix corner-case that can occur with LA triggers.
Uwe Hermann [Sun, 8 Sep 2013 13:16:11 +0000 (15:16 +0200)]
i2c: Fix corner-case that can occur with LA triggers.

Until now the I2C PD was basically ignoring the very first sample, and
using that as the initial 'oldscl'/'oldsda' value.

However, if your logic analyzers trigger on, say, SDA=low that will
result in a file where the first sample is really important since it
is the one which the PD will need to know that there's a falling edge
on SDA.

Thus, assume both SCL and SDA are high/1 when the PD starts. This is
a good assumption since both pins have pullups on them in practice
and are thus high/1 when the bus is idle.

Later on we might want to have config options to let the PD assume
other states of SDA/SCL initially.

10 years agoi2s: Fixed annotation sample numbers
Joel Holdsworth [Tue, 3 Sep 2013 15:36:44 +0000 (16:36 +0100)]
i2s: Fixed annotation sample numbers