X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fmx25lxx05d.py;h=72e1e1b679e1c559eba11d2d7f1cd92f2793652f;hp=1f45dc47bbe22123ce0ad144fd36579b25e2ed1f;hb=677d597b072c0a1d2df81c5c193cd3678aef8d03;hpb=2fd89a85c4a1131ca259d794a43b26b8bd84b6a0 diff --git a/decoders/mx25lxx05d.py b/decoders/mx25lxx05d.py index 1f45dc4..72e1e1b 100644 --- a/decoders/mx25lxx05d.py +++ b/decoders/mx25lxx05d.py @@ -30,7 +30,7 @@ # http://www.macronix.com/QuickPlace/hq/PageLibrary4825740B00298A3B.nsf/h_Index/3F21BAC2E121E17848257639003A3146/$File/MX25L1605D-3205D-6405D-1.5.pdf # -import sigrokdecode +import sigrokdecode as srd # States IDLE = -1 @@ -157,7 +157,7 @@ miso_packets = [ {'type': 'D', 'range': (10, 11), 'data': 0xff, 'ann': ''}, ] -class Decoder(sigrokdecode.Decoder): +class Decoder(srd.Decoder): id = 'mx25lxx05d' name = 'Macronix MX25Lxx05D' longname = 'Macronix MX25Lxx05D SPI flash chip decoder' @@ -172,15 +172,15 @@ class Decoder(sigrokdecode.Decoder): options = {} # TODO def __init__(self, **kwargs): - self.output_protocol = None - self.output_annotation = None + self.out_proto = None + self.out_ann = None self.state = IDLE self.cmdstate = 1 # TODO self.out = [] def start(self, metadata): - # self.output_protocol = self.add(2) - self.output_annotation = self.add(1) + # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'mx25lxx05d') + self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'mx25lxx05d') def report(self): pass @@ -351,6 +351,6 @@ class Decoder(sigrokdecode.Decoder): pass if self.out != []: - # self.put(0, 0, self.output_protocol, out_proto) - self.put(0, 0, self.output_annotation, self.out) + # self.put(0, 0, self.out_proto, out_proto) + self.put(0, 0, self.out_ann, self.out)