summaryrefslogtreecommitdiff
path: root/decoders/spi.py
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2012-01-14 15:18:41 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2012-01-14 15:23:32 +0100
commit4917bb31c6a1e3e77418ac446650a6d9aa3e528b (patch)
tree7e77b4013d7b5070d39c0e16af869285682054ea /decoders/spi.py
parenta10bfc48b04de832a62a474b34b23f8f24662e9a (diff)
downloadlibsigrokdecode-4917bb31c6a1e3e77418ac446650a6d9aa3e528b.tar.gz
libsigrokdecode-4917bb31c6a1e3e77418ac446650a6d9aa3e528b.zip
srd: SPI: s/rxdata/mosidata/.
Diffstat (limited to 'decoders/spi.py')
-rw-r--r--decoders/spi.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/decoders/spi.py b/decoders/spi.py
index 9fb6036..eaf60ef 100644
--- a/decoders/spi.py
+++ b/decoders/spi.py
@@ -43,7 +43,7 @@ class Decoder(srd.Decoder):
def __init__(self):
self.oldsck = 1
self.bitcount = 0
- self.rxdata = 0
+ self.mosidata = 0
self.bytesreceived = 0
def start(self, metadata):
@@ -73,7 +73,7 @@ class Decoder(srd.Decoder):
# Receive bit into our shift register.
if sdata == 1:
- self.rxdata |= 1 << (7 - self.bitcount)
+ self.mosidata |= 1 << (7 - self.bitcount)
self.bitcount += 1
@@ -82,10 +82,10 @@ class Decoder(srd.Decoder):
continue
# self.put(0, 0, self.out_proto, out_proto) # TODO
- self.put(0, 0, self.out_ann, [0, ['0x%02x' % self.rxdata]])
+ self.put(0, 0, self.out_ann, [0, ['0x%02x' % self.mosidata]])
# Reset decoder state.
- self.rxdata = 0
+ self.mosidata = 0
self.bitcount = 0
# Keep stats for summary.