diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2015-12-04 22:11:14 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2015-12-04 22:44:23 +0100 |
commit | 502acfc2c71a2bbc97d4d7597150cd479bead1ee (patch) | |
tree | 9b2adbb921057af1012bb185986acb30a621d91e /decoders/usb_request | |
parent | 1647db062c75b5058fbbd581438a25e76f17cde6 (diff) | |
download | libsigrokdecode-502acfc2c71a2bbc97d4d7597150cd479bead1ee.tar.gz libsigrokdecode-502acfc2c71a2bbc97d4d7597150cd479bead1ee.zip |
usb*: Minor cosmetics.
Diffstat (limited to 'decoders/usb_request')
-rw-r--r-- | decoders/usb_request/pd.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/decoders/usb_request/pd.py b/decoders/usb_request/pd.py index 4526e69..61dedb1 100644 --- a/decoders/usb_request/pd.py +++ b/decoders/usb_request/pd.py @@ -270,8 +270,8 @@ class Decoder(srd.Decoder): # Issue PCAP 'SUBMIT' packet. ts = self.ts_from_samplenum(ss) pkt = pcap_usb_pkt(request, ts, True) - self.putb(ss, (0, pkt.record_header())) - self.putb(ss, (0, pkt.packet())) + self.putb(ss, [0, pkt.record_header()]) + self.putb(ss, [0, pkt.packet()]) if request_end == 1: # Write annotation. @@ -288,8 +288,8 @@ class Decoder(srd.Decoder): # Issue PCAP 'COMPLETE' packet. ts = self.ts_from_samplenum(es) pkt = pcap_usb_pkt(request, ts, False) - self.putb(ss, (0, pkt.record_header())) - self.putb(ss, (0, pkt.packet())) + self.putb(ss, [0, pkt.record_header()]) + self.putb(ss, [0, pkt.packet()]) del self.request[(addr, ep)] def decode(self, ss, es, data): @@ -308,9 +308,10 @@ class Decoder(srd.Decoder): return if self.transaction_state == 'TOKEN RECEIVED': transaction_timeout = self.transaction_es - # token length is 35 bits, timeout is 16..18 bit times (USB 2.0 7.1.19.1) + # Token length is 35 bits, timeout is 16..18 bit times + # (USB 2.0 7.1.19.1). transaction_timeout += int((self.transaction_es - self.transaction_ss) / 2) - if (ss > transaction_timeout): + if ss > transaction_timeout: self.transaction_es = transaction_timeout self.handshake = 'timeout' self.handle_transfer() |