# The width of one UART bit in number of samples.
self.bit_width = float(self.samplerate) / float(self.options['baudrate'])
- def report(self):
- pass
-
# Return true if we reached the middle of the desired bit, false otherwise.
def reached_bit(self, rxtx, bitnum):
# bitpos is the samplenumber which is in the middle of the
b, f = self.databyte[rxtx], self.options['format']
if f == 'ascii':
- self.putx(rxtx, [rxtx, [chr(b)]])
+ c = chr(b) if chr(b).isprintable() else '[%02X]' % b
+ self.putx(rxtx, [rxtx, [c]])
elif f == 'dec':
self.putx(rxtx, [rxtx, [str(b)]])
elif f == 'hex':