X-Git-Url: http://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Flpc%2Fpd.py;h=5e25db4779ba886070fecd752ecf848926eec966;hp=3cfe29e8cec1d7dcf12711ef5954deb8e21dfd9d;hb=HEAD;hpb=2787cf2abc0187679e87d3735ca3e64c2a1a91c8 diff --git a/decoders/lpc/pd.py b/decoders/lpc/pd.py index 3cfe29e..2a88e30 100644 --- a/decoders/lpc/pd.py +++ b/decoders/lpc/pd.py @@ -102,7 +102,7 @@ class Decoder(srd.Decoder): desc = 'Protocol for low-bandwidth devices on PC mainboards.' license = 'gplv2+' inputs = ['logic'] - outputs = ['lpc'] + outputs = [] tags = ['PC'] channels = ( {'id': 'lframe', 'name': 'LFRAME#', 'desc': 'Frame'}, @@ -122,7 +122,7 @@ class Decoder(srd.Decoder): {'id': 'lsmi', 'name': 'LSMI#', 'desc': 'System Management Interrupt'}, ) annotations = ( - ('warnings', 'Warnings'), + ('warning', 'Warning'), ('start', 'Start'), ('cycle-type', 'Cycle-type/direction'), ('addr', 'Address'), @@ -132,7 +132,7 @@ class Decoder(srd.Decoder): ('tar2', 'Turn-around cycle 2'), ) annotation_rows = ( - ('data', 'Data', (1, 2, 3, 4, 5, 6, 7)), + ('data-vals', 'Data', (1, 2, 3, 4, 5, 6, 7)), ('warnings', 'Warnings', (0,)), ) @@ -142,7 +142,6 @@ class Decoder(srd.Decoder): def reset(self): self.state = 'IDLE' self.oldlclk = -1 - self.samplenum = 0 self.lad = -1 self.addr = 0 self.cur_nibble = 0 @@ -316,13 +315,9 @@ class Decoder(srd.Decoder): self.state = 'IDLE' def decode(self): + conditions = [{i: 'e'} for i in range(6)] while True: - # TODO: Come up with more appropriate self.wait() conditions. - pins = self.wait() - - # If none of the pins changed, there's nothing to do. - if self.oldpins == pins: - continue + pins = self.wait(conditions) # Store current pin values for the next round. self.oldpins = pins