X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fmx25lxx05d%2Fmx25lxx05d.py;h=eb0e798403ba64ccaf1d62ef1b6971124526a964;hb=3e3c03309ee21d839f85e981d361ca77b08d5ba0;hp=801ab809c09aa3146a4f98dc764252bf732c9461;hpb=156509ca42f0df2380c9f205f9aad337e1a07802;p=libsigrokdecode.git diff --git a/decoders/mx25lxx05d/mx25lxx05d.py b/decoders/mx25lxx05d/mx25lxx05d.py index 801ab80..eb0e798 100644 --- a/decoders/mx25lxx05d/mx25lxx05d.py +++ b/decoders/mx25lxx05d/mx25lxx05d.py @@ -98,8 +98,7 @@ class Decoder(srd.Decoder): id = 'mx25lxx05d' name = 'MX25Lxx05D' longname = 'Macronix MX25Lxx05D' - desc = 'Macronix MX25Lxx05D SPI flash chip decoder' - longdesc = 'TODO' + desc = 'SPI (NOR) flash chip protocol.' license = 'gplv2+' inputs = ['spi', 'logic'] outputs = ['mx25lxx05d'] @@ -110,7 +109,7 @@ class Decoder(srd.Decoder): ] options = {} # TODO annotations = [ - ['TODO', 'TODO'], + ['Text', 'Human-readable text'], ] def __init__(self, **kwargs): @@ -125,7 +124,7 @@ class Decoder(srd.Decoder): pass def putx(self, data): - # Simplification, most annotations span extactly one SPI byte/packet. + # Simplification, most annotations span exactly one SPI byte/packet. self.put(self.ss, self.es, self.out_ann, data) def handle_wren(self, mosi, miso): @@ -210,7 +209,7 @@ class Decoder(srd.Decoder): self.putx([0, ['%s ID' % d]]) elif self.cmdstate == 6: # Byte 6: Slave sends device ID (or manufacturer ID). - self.ids += [miso] + self.ids.append(miso) d = 'Manufacturer' if self.manufacturer_id_first else 'Device' self.putx([0, ['%s ID' % d]]) else: @@ -233,7 +232,7 @@ class Decoder(srd.Decoder): ptype, mosi, miso = data - if ptype != 'data': + if ptype != 'DATA': return cmd = mosi