]> sigrok.org Git - libsigrokdecode.git/commitdiff
usb_signalling: handle symbol errors in EOP state
authorStefan Brüns <redacted>
Fri, 13 Nov 2015 03:55:56 +0000 (04:55 +0100)
committerStefan Brüns <redacted>
Sun, 29 Nov 2015 23:03:01 +0000 (00:03 +0100)
Only SE0 and J are valid symbols during EOP

decoders/usb_signalling/pd.py

index c00786a4316d4287c3b83d847187c5e268d4cddd..774ed494f839105c1ea6b8068849bc92a0578f86 100644 (file)
@@ -209,6 +209,10 @@ class Decoder(srd.Decoder):
             self.putm([5, ['EOP', 'E']])
             self.state = 'IDLE'
             self.bitwidth = float(self.samplerate) / float(self.bitrate)
+        else:
+            self.putpm(['ERR', None])
+            self.putm([8, ['EOP Error', 'EErr', 'E']])
+            self.state = 'IDLE'
 
     def get_bit(self, sym):
         if sym == 'SE0':