From: Uwe Hermann Date: Sat, 21 Jul 2012 19:04:20 +0000 (+0200) Subject: srd: maxim_ds28ea00: Fix to only handle DS28EA00. X-Git-Tag: libsigrokdecode-0.1.1~39 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commitdiff_plain;h=0afa64aefc96649c74770dbcbbcfb5934d99fe18 srd: maxim_ds28ea00: Fix to only handle DS28EA00. --- diff --git a/decoders/maxim_ds28ea00/__init__.py b/decoders/maxim_ds28ea00/__init__.py index c6f063d..590ee63 100644 --- a/decoders/maxim_ds28ea00/__init__.py +++ b/decoders/maxim_ds28ea00/__init__.py @@ -19,38 +19,13 @@ ## ''' -1-Wire protocol decoder. +Maxim DS28EA00 protocol decoder. -The 1-Wire protocol enables bidirectional communication over a single wire (and -ground) between a single master and one or multiple slaves. The protocol is -layered. -- Link layer (reset, presence detection, reading/writing bits) -- Network layer (skip/search/match device ROM addresses) -- Transport layer (transport data between 1-Wire master and device) +The Maxim DS28EA00 is a 1-Wire digital thermometer with Sequence Detect +and PIO functionality. -Transport layer - -The transport layer is the largest and most complex part of the protocol, since -it is very device specific. The decoder is parsing only a small part of the -protocol. - -Annotations: -The next link layer annotations are shown: -- RESET/PRESENCE True/False - The event is marked from the signal negative edge to the end of the reset - high period. It is also reported if there are any devices attached to the - bus. -The next network layer annotations are shown: -- ROM val - The 64bit value of the addressed device is displayed: - family code (1B) + serial number (6B) + CRC (1B) -- FUNCTION COMMAND val name - The requested FUNCTION command is displayed as an 8bit HEX value and by name. -- DATA val - Data intended for the transport layer is displayed as an 8bit HEX value. - -TODO: -- add CRC checks for transport layer +Details: +TODO ''' from .maxim_ds28ea00 import * diff --git a/decoders/maxim_ds28ea00/maxim_ds28ea00.py b/decoders/maxim_ds28ea00/maxim_ds28ea00.py index 96a5aab..9801138 100644 --- a/decoders/maxim_ds28ea00/maxim_ds28ea00.py +++ b/decoders/maxim_ds28ea00/maxim_ds28ea00.py @@ -18,7 +18,7 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -# 1-Wire protocol decoder +# Maxim DS28EA00 protocol decoder import sigrokdecode as srd @@ -47,17 +47,22 @@ command = { class Decoder(srd.Decoder): api_version = 1 id = 'maxim_ds28ea00' - name = '1-Wire transport layer' - longname = '1-Wire serial communication bus' - desc = 'Bidirectional, half-duplex, asynchronous serial bus.' + name = 'Maxim DS28EA00' + longname = 'Maxim DS28EA00 1-Wire digital thermometer' + desc = '1-Wire digital thermometer with Sequence Detect and PIO' license = 'gplv2+' inputs = ['onewire_network'] - outputs = [] + outputs = ['maxim_ds28ea00'] probes = [] - optional_probes = [] + optional_probes = [ + {'id': 'pioa', 'name': 'PIOA/DONE#', + 'desc': 'PIOA channel and chain output'}, + {'id': 'piob', 'name': 'PIOB/EN#', + 'desc': 'PIOB channel and chain output'}, + ] options = {} annotations = [ - ['Transport', 'Transport layer events'], + ['Text', 'Human-readable text'], ] def __init__(self, **kwargs): @@ -69,7 +74,7 @@ class Decoder(srd.Decoder): self.rom = 0x0000000000000000 def start(self, metadata): - self.out_ann = self.add(srd.OUTPUT_ANN , 'onewire_transport') + self.out_ann = self.add(srd.OUTPUT_ANN , 'maxim_ds28ea00') def report(self): pass