# 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
{'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'
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.add(2)
- self.output_annotation = self.add(1)
+ # self.out_proto = self.add(srd.OUTPUT_PROTO, 'mx25lxx05d')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'mx25lxx05d')
def report(self):
pass
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)