Bert Vermeulen [Sun, 9 Mar 2014 22:48:27 +0000 (23:48 +0100)]
Change PD options to be a tuple of dictionaries.
Each option consists of a dictionary with the following keys:
id The option id, which is passed in when setting a value.
desc A description of the option, suitable for display.
def The default value for this option.
values (optional) If present, a tuple containing values the option
may take. They must be of the same type as the default.
Valid types for the options are UTF-8-encoded strings, integers, and
floating point values.
Daniel Elstner [Thu, 27 Feb 2014 21:07:58 +0000 (22:07 +0100)]
z80: Output jump offsets relative to instruction start.
Most assemblers recognize the symbol $ for the address of the
current instruction. Make use of this to output relative jump
instructions using the $[+-]offset syntax, with offset being
the displacement minus the instruction length.
Daniel Elstner [Thu, 27 Feb 2014 20:31:10 +0000 (21:31 +0100)]
z80: Format hex numbers with leading zero if necessary.
Assembler syntax requires that all numbers start with a decimal
digit. Introduce a custom 'H' format for prefixing a leading 0
to hexadecimal numbers that would otherwise start with a letter.
In the 'sdcard_spi' PD/case the SD spec specifically differentiates between
a so-called "SPI mode" and "SD mode" (both being well-defined terms from
the spec), thus the "SPI mode" in the name and description of that PD.
For 'rgb_led_spi' however there's no such distinction for "modes"
really, so shorten the name/description to just 'RGB LED (SPI)'.
Uwe Hermann [Wed, 19 Feb 2014 14:09:22 +0000 (15:09 +0100)]
rgb_led: Rename PD to rgb_led_spi.
There are a number of other RGB LED protocols (simple or more advanced
ones, and various ones not based on SPI), so use a more distinguishable
name for this PD.
Uwe Hermann [Fri, 31 Jan 2014 15:59:22 +0000 (16:59 +0100)]
Add support for annotation rows.
An annotation row is a list of annotation classes that should all be
displayed in the same "row" in GUIs.
For example, the UART decoder would have at least two rows (for decoded
RX and TX data/startbits/stopbits/paritybits), the SPI decoder would have
at least two rows (for decoded MISO and MOSI data), and so on.
Each annotation row has a short ID string (mostly for use in
command-line frontends), a description string (mostly for use by GUIs),
and a tuple/list of annotation class IDs belonging to this row.
If no annotation rows are provided by the decoder, frontends can
consider this as the "trivial" case of all annotation classes being
displayed on the same (only) row.
Uwe Hermann [Thu, 30 Jan 2014 14:26:06 +0000 (15:26 +0100)]
uart: Better fix for ASCII output.
This is a temporary thing, later there'll be some facility to let
frontends handle any annotations marked as "this is a number" (as opposed
to "this is a string") in a generic manner and display them in any
supported (by that frontend) format, e.g. ascii, hex, oct, decimal,
binary, big-endian vs. little-endian, and so on.
Uwe Hermann [Wed, 22 Jan 2014 21:47:18 +0000 (22:47 +0100)]
All PDs: Drop unneeded comments.
The single comment re-stating the PD's name / description / purpose in
each pd.py file is not really needed, that info is available in the
Decoder class' attributes already.
Uwe Hermann [Mon, 20 Jan 2014 20:52:15 +0000 (21:52 +0100)]
transitioncounter: Drop PD (obsolete).
This decoder was just a simple test case for early libsigrokdecode
development and testing, it is neither useful nor properly working
currently, so drop it.