X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fmaxim_ds28ea00%2Fpd.py;h=2492c6bcfeb270f799615e7557c15a1187aa372c;hp=026457e5783a7cc66c8bf54951e0ce311d003373;hb=da9bcbd9f45b0153465c55ec726a0d76f6d7f01e;hpb=24c74fd30fb161837c5f8b01baf3c0fe2dfa4ed5 diff --git a/decoders/maxim_ds28ea00/pd.py b/decoders/maxim_ds28ea00/pd.py index 026457e..2492c6b 100644 --- a/decoders/maxim_ds28ea00/pd.py +++ b/decoders/maxim_ds28ea00/pd.py @@ -1,5 +1,5 @@ ## -## This file is part of the sigrok project. +## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2012 Iztok Jeras ## @@ -18,8 +18,6 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -# Maxim DS28EA00 protocol decoder - import sigrokdecode as srd # Dictionary of FUNCTION commands and their names. @@ -40,23 +38,21 @@ command = { class Decoder(srd.Decoder): api_version = 1 id = 'maxim_ds28ea00' - name = 'Maxim DS28EA00' + name = 'DS28EA00' longname = 'Maxim DS28EA00 1-Wire digital thermometer' - desc = '1-Wire digital thermometer with Sequence Detect and PIO' + desc = '1-Wire digital thermometer with Sequence Detect and PIO.' license = 'gplv2+' inputs = ['onewire_network'] 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 = [ - ['Text', 'Human-readable text'], - ] + ) + annotations = ( + ('text', 'Human-readable text'), + ) def __init__(self, **kwargs): self.trn_beg = 0 @@ -64,11 +60,8 @@ class Decoder(srd.Decoder): self.state = 'ROM' self.rom = 0x0000000000000000 - def start(self, metadata): - self.out_ann = self.add(srd.OUTPUT_ANN, 'maxim_ds28ea00') - - def report(self): - pass + def start(self): + self.out_ann = self.register(srd.OUTPUT_ANN) def putx(self, data): self.put(self.ss, self.es, self.out_ann, data)