diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2011-12-04 20:59:56 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2011-12-04 20:59:56 +0100 |
commit | 1c8ac5bf07e0ded582234c9ef50ba10f042bae52 (patch) | |
tree | 8bb0cddb5ac81aa6da9edaf159bdfc22e6f1dce2 /decoders/spi.py | |
parent | b2c19614a6c4eaa0170971d1261a1bb25212e277 (diff) | |
download | libsigrokdecode-1c8ac5bf07e0ded582234c9ef50ba10f042bae52.tar.gz libsigrokdecode-1c8ac5bf07e0ded582234c9ef50ba10f042bae52.zip |
srd: Update decoders to changed API.
Diffstat (limited to 'decoders/spi.py')
-rw-r--r-- | decoders/spi.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/decoders/spi.py b/decoders/spi.py index 9c0be9a..a363b5a 100644 --- a/decoders/spi.py +++ b/decoders/spi.py @@ -31,7 +31,7 @@ def sampleiter(data, unitsize): for i in range(0, len(data), unitsize): yield(Sample(data[i:i+unitsize])) -class Decoder(): +class Decoder(sigrok.Decoder): id = 'spi' name = 'SPI' desc = '...desc...' @@ -89,12 +89,10 @@ class Decoder(): 'display':('%02X' % self.rxdata), 'type':'spi', } - sigrok.put(outdata) + self.put(outdata) # Reset decoder state self.rxdata = 0 self.rxcount = 0 # Keep stats for summary self.bytesreceived += 1 -sigrok.register(Decoder) - |