X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fmx25lxx05d.py;h=4a87fa4b4b57476978936527f9244cd04cdfb54d;hp=0f2f73b8cbcbe43eeab62ef986a60874bef4953b;hb=d0e93c76e381eff58ca23949301f781b24ba4a8b;hpb=958f394e13a2f34f3451e10ec0a85743d6cde70a diff --git a/decoders/mx25lxx05d.py b/decoders/mx25lxx05d.py index 0f2f73b..4a87fa4 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,13 @@ class Decoder(sigrokdecode.Decoder): options = {} # TODO def __init__(self, **kwargs): - self.output_protocol = None - self.output_annotation = None self.state = IDLE self.cmdstate = 1 # TODO self.out = [] def start(self, metadata): - # self.output_protocol = self.output_new(2) - self.output_annotation = self.output_new(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 +349,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)