X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fspi.py;h=731c77cc3c8ae0214697cd5e0b99c4b13b5b2da6;hb=c4262fd6b2f8ef540b8cc93ac61956d89062d2be;hp=7b3d8abbb472d45586f25857d0836aa82ce0c04f;hpb=ad2dc0de10ac5c2c6c3aacff0b2835cd4dc22578;p=libsigrokdecode.git diff --git a/decoders/spi.py b/decoders/spi.py index 7b3d8ab..731c77c 100644 --- a/decoders/spi.py +++ b/decoders/spi.py @@ -43,17 +43,16 @@ class Decoder(): probes = {'sdata':0, 'sck':1} options = {} - def __init__(self, unitsize, **kwargs): - # Metadata comes in here, we don't care for now - #print kwargs - self.unitsize = unitsize - + def __init__(self): self.probes = Decoder.probes.copy() self.oldsck = True self.rxcount = 0 self.rxdata = 0 self.bytesreceived = 0 + def start(self, metadata): + self.unitsize = metadata["unitsize"] + def report(self): return "SPI: %d bytes received" % self.bytesreceived