diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2014-02-01 15:41:36 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2014-02-01 15:59:13 +0100 |
commit | 066d659423912025b5b680c5bf74fca11aa72398 (patch) | |
tree | d9d9e6457e1c5c0dddff3812ad67b15619843aa8 /decoders/usb_signalling/pd.py | |
parent | 49e8a4d6fe1ac4f5f9100cce5e01ea59305adeb4 (diff) | |
download | libsigrokdecode-066d659423912025b5b680c5bf74fca11aa72398.tar.gz libsigrokdecode-066d659423912025b5b680c5bf74fca11aa72398.zip |
usb_signalling: Define annotation rows.
Diffstat (limited to 'decoders/usb_signalling/pd.py')
-rw-r--r-- | decoders/usb_signalling/pd.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/decoders/usb_signalling/pd.py b/decoders/usb_signalling/pd.py index 35ffce6..543089e 100644 --- a/decoders/usb_signalling/pd.py +++ b/decoders/usb_signalling/pd.py @@ -90,6 +90,10 @@ class Decoder(srd.Decoder): ['bit', 'Bit'], ['stuffbit', 'Stuff bit'], ] + annotation_rows = ( + ('bits', 'Bits', (1, 2, 3, 4)), + ('symbols', 'Symbols', (0,)), + ) def __init__(self): self.samplerate = None @@ -159,12 +163,14 @@ class Decoder(srd.Decoder): if self.consecutive_ones == 6 and b == '0': # Stuff bit. self.putpb(['STUFF BIT', None]) - self.putb([4, ['SB: %s/%s' % (sym, b)]]) + self.putb([4, ['SB: %s' % b]]) + self.putb([0, ['%s' % sym]]) self.consecutive_ones = 0 else: # Normal bit (not a stuff bit). self.putpb(['BIT', b]) - self.putb([3, ['%s/%s' % (sym, b)]]) + self.putb([3, ['%s' % b]]) + self.putb([0, ['%s' % sym]]) if b == '1': self.consecutive_ones += 1 else: |