summaryrefslogtreecommitdiff
path: root/decoders/i2c/pd.py
AgeCommit message (Collapse)Author
2017-03-03Drop obsolete workarounds in PDs.Uwe Hermann
Some PDs were using a temporary workaround for (as it turned out) a refcounting issue that was fixed in 066fbafdc3ba734a73b5f7fcfa1dbae67ddebf8a.
2017-01-07license: remove FSF postal address from boiler plate license textGerhard Sittig
Remove the FSF postal address as it might change (it did in the past). Reference the gnu.org website instead which is more stable.
2016-12-07i2c: Convert to PD API version 3.Uwe Hermann
2016-05-15Use consistent __init__() format across all PDs.Uwe Hermann
The previous **kwargs some PDs had is not actually ever used, so drop it.
2015-12-24Use a Python list (not tuple) for OUT_BINARY.Uwe Hermann
This is more consistent with annotation syntax and looks slightly better in most cases.
2014-10-13All PDs: More consistent names for ss/es variables.Uwe Hermann
Use self.ss/self.es, or if there's a need to differentiate them a bit more, use self.ss_<suffix>/self.es_<suffix> consistently. Also, drop some unused variables.
2014-07-15All PDs: Minor whitespace and consistency fixes.Uwe Hermann
- No newlines at the end of files. - No trailing ';' characters. - Comparison with None: Use 'is None' or 'is not None'. - Comparison with True/False: Use 'if cond:' or 'if not cond:'. - Various minor whitespace fixes.
2014-07-09Various PDs: Throw SamplerateError instead of Exception.Uwe Hermann
Also, 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.
2014-06-23i2c: Generate proper exception for missing samplerate, and test for it.Bert Vermeulen
Also remove some dead code.
2014-04-15All PDs: More consistent OUTPUT_PYTHON format docs.Uwe Hermann
2014-04-15All PDs: Bump api_version to 2.Uwe Hermann
Older libsigrokdecode versions are no longer able to use the current versions of the PDs (various changes in syntax etc).
2014-04-13Rename 'probe' to 'channel' everywhere.Uwe Hermann
Variables of type 'struct srd_channel *' are consistently named 'pdch' to make them easily distinguishable from libsigrok's 'struct sr_channel *' variables that are consistently named 'ch'.
2014-03-10Probes, optional probes and annotations now take a tuple.Bert Vermeulen
Annotation entries also consist of a tuple, not a list.
2014-03-10Remove unused probes and optionsBert Vermeulen
2014-03-10Change PD options to be a tuple of dictionaries.Bert Vermeulen
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.
2014-02-09i2c: Emit per-bit annotations/packets and define annotation rows.Uwe Hermann
2014-01-30s/out_proto/out_python/.Uwe Hermann
The output type is now called OUTPUT_PYTHON, adapt all PDs to that.
2014-01-28All PDs: Drop unneeded comments.Uwe Hermann
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.
2013-12-28i2c: Replaced I2C with I²CJoel Holdsworth
2013-12-13i2c: Avoid obsolete method.Bert Vermeulen
2013-12-12Use new binary class definition format.Bert Vermeulen
2013-12-10Add protocol decoder testing framework.Bert Vermeulen
This adds a tool in the tests directory, called pdtest. It uses the "test/" directory in every PD directory, if present, to run the PD against dumps found in the sigrok-dumps repository, and compares the output against ".output" files in the "test/" directory. The file "test/test.conf" is used to configure which tests to run. A separate tool (tests/runtc.c) is used to run the actual decoding and report output. To get an overview of the options, run tests/pdtest without any options.
2013-11-15Use OUTPUT_BINARY with four classes.Bert Vermeulen
2013-11-15Drop obsolete report() method.Bert Vermeulen
2013-11-15Emit meta bitrateBert Vermeulen
2013-11-07Rename inter-PD output type to SRD_OUTPUT_PYTHONBert Vermeulen
This better reflects what it is: a python object generated and processed by python code.
2013-10-30The start() method no longer takes a metadata parameterBert Vermeulen
2013-09-14i2c: Drop unneeded 'addressing' option.Uwe Hermann
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.
2013-09-14i2c: Drop obsolete TODOs.Uwe Hermann
2013-09-14i2c: Move OUTPUT_PROTO docs to pd.py.Uwe Hermann
2013-09-14i2c: Various fixes to make the PD suitable for GUIs.Uwe Hermann
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.
2013-09-08i2c: Fix corner-case that can occur with LA triggers.Uwe Hermann
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.
2013-04-23GPL headers: Use correct project name.Uwe Hermann
2012-11-24Fix bugs in "Invalid state" printing/exceptions.Uwe Hermann
2012-11-24All PDs: Name the files pd.py consistently.Uwe Hermann
The Python module name is determined by the directory name (e.g. dcf77), the *.py file names in that directory don't matter and can be kept consistent.