diff options
author | Stefan Brüns <stefan.bruens@rwth-aachen.de> | 2015-12-01 05:53:32 +0100 |
---|---|---|
committer | Stefan Brüns <stefan.bruens@rwth-aachen.de> | 2015-12-01 06:46:27 +0100 |
commit | be0f8fee99fe939c50ed5d2483a924754788c0b3 (patch) | |
tree | 16014bc62d3e9e4888eba581268da0efdc900f3b /decoders/usb_packet | |
parent | 831d893d4b9e4f76b5e645ee5e6fcfd4962ffa6a (diff) | |
download | libsigrokdecode-be0f8fee99fe939c50ed5d2483a924754788c0b3.tar.gz libsigrokdecode-be0f8fee99fe939c50ed5d2483a924754788c0b3.zip |
usb_{packet,request}: handle PREamble transmissions
Diffstat (limited to 'decoders/usb_packet')
-rw-r--r-- | decoders/usb_packet/pd.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/decoders/usb_packet/pd.py b/decoders/usb_packet/pd.py index 3e061c9..8d1de65 100644 --- a/decoders/usb_packet/pd.py +++ b/decoders/usb_packet/pd.py @@ -113,7 +113,7 @@ pids = { # Special '00111100': ['PRE', 'Host-issued preamble; enables downstream bus traffic to low-speed devices'], - '00111100': ['ERR', 'Split transaction error handshake'], + #'00111100': ['ERR', 'Split transaction error handshake'], '00011110': ['SPLIT', 'HS split transaction token'], '00101101': ['PING', 'HS flow control probe for a bulk/control EP'], '00001111': ['Reserved', 'Reserved PID'], @@ -281,7 +281,7 @@ class Decoder(srd.Decoder): self.packet.append(pid) self.packet_summary += pidname - if pidname in ('OUT', 'IN', 'SOF', 'SETUP', 'PRE', 'PING'): + if pidname in ('OUT', 'IN', 'SOF', 'SETUP', 'PING'): if len(packet) < 32: self.putp([28, ['Invalid packet (shorter than 32 bits)']]) return @@ -357,6 +357,8 @@ class Decoder(srd.Decoder): self.packet.append(crc16) elif pidname in ('ACK', 'NAK', 'STALL', 'NYET', 'ERR'): pass # Nothing to do, these only have SYNC+PID+EOP fields. + elif pidname in ('PRE'): + pass # Nothing to do, PRE only has SYNC+PID fields. else: pass # TODO: Handle 'SPLIT' and possibly 'Reserved' packets. |