From 677d597b072c0a1d2df81c5c193cd3678aef8d03 Mon Sep 17 00:00:00 2001 From: Uwe Hermann <uwe@hermann-uwe.de> Date: Tue, 10 Jan 2012 21:10:23 +0100 Subject: srd: Use 'import sigrokdecode as srd' for brevity. --- decoders/srd_usb.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'decoders/srd_usb.py') diff --git a/decoders/srd_usb.py b/decoders/srd_usb.py index c97ef73..842cf03 100644 --- a/decoders/srd_usb.py +++ b/decoders/srd_usb.py @@ -40,7 +40,7 @@ # http://www.usb.org/developers/docs/ # -import sigrokdecode +import sigrokdecode as srd # States SE0, J, K, SE1 = 0, 1, 2, 3 @@ -99,7 +99,7 @@ def packet_decode(packet): return pid + ' ' + data -class Decoder(sigrokdecode.Decoder): +class Decoder(srd.Decoder): id = 'usb' name = 'USB' desc = 'Universal Serial Bus' @@ -123,8 +123,8 @@ class Decoder(sigrokdecode.Decoder): def start(self, metadata): self.rate = metadata['samplerate'] - # self.out_proto = self.add(sigrokdecode.SRD_OUTPUT_PROTO, 'usb') - self.out_ann = self.add(sigrokdecode.SRD_OUTPUT_ANN, 'usb') + # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'usb') + self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'usb') if self.rate < 48000000: raise Exception("Sample rate not sufficient for USB decoding") # Initialise decoder state. -- cgit v1.2.3-70-g09d2