diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2013-08-13 21:30:04 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2013-08-14 09:21:27 +0200 |
commit | 1cb844734958781fea47b7884db6e56d8a83c000 (patch) | |
tree | 394fe64f03387c6f8e9e54751b3ff6dcb44ddf4c /decoders/lpc | |
parent | cded73ba6a9a2095d06e92912a7e6f6ccb22307e (diff) | |
download | libsigrokdecode-1cb844734958781fea47b7884db6e56d8a83c000.tar.gz libsigrokdecode-1cb844734958781fea47b7884db6e56d8a83c000.zip |
lpc: Bugfix: Sample data at rising clock edges.
Diffstat (limited to 'decoders/lpc')
-rw-r--r-- | decoders/lpc/pd.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/decoders/lpc/pd.py b/decoders/lpc/pd.py index 7da0dd8..61c6383 100644 --- a/decoders/lpc/pd.py +++ b/decoders/lpc/pd.py @@ -301,7 +301,6 @@ class Decoder(srd.Decoder): self.tarcount = 0 self.state = 'IDLE' - # TODO: At which edge of the clock is data latched? Falling? def decode(self, ss, es, data): for (samplenum, pins) in data: @@ -316,11 +315,11 @@ class Decoder(srd.Decoder): # TODO: Handle optional pins. (lframe, lreset, lclk, lad0, lad1, lad2, lad3) = pins - # Only look at the signals upon falling LCLK edges. - # TODO: Rising? - ## if not (self.oldlclk == 1 and lclk == 0): - ## self.oldlclk = lclk - ## continue + # Only look at the signals upon rising LCLK edges. The LPC clock + # is the same as the PCI clock (which is sampled at rising edges). + if not (self.oldlclk == 0 and lclk == 1): + self.oldlclk = lclk + continue # Store LAD[3:0] bit values (one nibble) in local variables. # Most (but not all) states need this. |