def __init__(self):
self.oldsck = 1
self.bitcount = 0
- self.rxdata = 0
+ self.mosidata = 0
self.bytesreceived = 0
def start(self, metadata):
# Receive bit into our shift register.
if sdata == 1:
- self.rxdata |= 1 << (7 - self.bitcount)
+ self.mosidata |= 1 << (7 - self.bitcount)
self.bitcount += 1
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.