diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2012-01-14 18:02:33 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2012-01-14 18:02:33 +0100 |
commit | 0db89774dee57db500f270985f73f3bb2dcdbb42 (patch) | |
tree | 891591c233f3aa699de5a7817877273b38c939d7 | |
parent | 0c3089c1c49e51e588dd264abafb05efdd44d0c8 (diff) | |
download | libsigrokdecode-0db89774dee57db500f270985f73f3bb2dcdbb42.tar.gz libsigrokdecode-0db89774dee57db500f270985f73f3bb2dcdbb42.zip |
srd: SPI: Set default PD options.
-rw-r--r-- | decoders/spi.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/decoders/spi.py b/decoders/spi.py index 7e64fcf..457abb5 100644 --- a/decoders/spi.py +++ b/decoders/spi.py @@ -78,6 +78,13 @@ class Decoder(srd.Decoder): self.bytesreceived = 0 self.samplenum = -1 + # Set protocol decoder option defaults. + self.cs_active_low = Decoder.options['cs_active_low'][1] + self.clock_polarity = Decoder.options['clock_polarity'][1] + self.clock_phase = Decoder.options['clock_phase'][1] + self.bit_order = Decoder.options['bit_order'][1] + self.word_size = Decoder.options['word_size'][1] + def start(self, metadata): self.out_proto = self.add(srd.OUTPUT_PROTO, 'spi') self.out_ann = self.add(srd.OUTPUT_ANN, 'spi') |