summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--decoders/edid/edid.py23
-rw-r--r--decoders/i2c/i2c.py4
-rw-r--r--decoders/i2cfilter/i2cfilter.py1
-rw-r--r--decoders/nunchuk/nunchuk.py4
-rw-r--r--decoders/rtc8564/rtc8564.py4
5 files changed, 15 insertions, 21 deletions
diff --git a/decoders/edid/edid.py b/decoders/edid/edid.py
index 78ea4f6..a56bb57 100644
--- a/decoders/edid/edid.py
+++ b/decoders/edid/edid.py
@@ -30,7 +30,6 @@
import sigrokdecode as srd
import os
-
EDID_HEADER = [0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00]
OFF_VENDOR = 8
OFF_VERSION = 18
@@ -60,7 +59,7 @@ est_modes = [
"1024x768@70Hz",
"1024x768@75Hz",
"1280x1024@75Hz",
- "1152x870@75Hz"
+ "1152x870@75Hz",
]
# X:Y display aspect ratios, as used in standard timing modes
@@ -68,14 +67,13 @@ xy_ratio = [
(16, 10),
(4, 3),
(5, 4),
- (16, 9)
+ (16, 9),
]
# Annotation types
ANN_FIELDS = 0
ANN_SECTIONS = 1
-
class Decoder(srd.Decoder):
api_version = 1
id = 'edid'
@@ -107,7 +105,7 @@ class Decoder(srd.Decoder):
if type(data) != int:
raise Exception('malformed ddc2 input: expected 1 byte')
self.cnt += 1
- self.sn.append( [ss, es] )
+ self.sn.append([ss, es])
self.cache.append(data)
# debug
# self.put(ss, es, self.out_ann, [0, ["%d: [%.2x]" % (self.cnt, data)]])
@@ -258,7 +256,7 @@ class Decoder(srd.Decoder):
elif dt == 1:
dtstr = 'RGB color'
elif dt == 2:
- dtstr = 'non-RGB multicolor'
+ dtstr = 'non-RGB multicolor'
if dtstr:
self.ann_field(offset+4, offset+4, "Display type: %s" % dtstr)
if fs & 0x04:
@@ -430,15 +428,15 @@ class Decoder(srd.Decoder):
# Monitor range limits
self.put(self.sn[offset][0], self.sn[offset+17][1], self.out_ann,
[ANN_SECTIONS, ["Monitor range limits"]])
- self.ann_field(offset+5, offset+5, "Minimum vertical rate: %dHz" %
+ self.ann_field(offset+5, offset+5, "Minimum vertical rate: %dHz" %
self.cache[offset+5])
- self.ann_field(offset+6, offset+6, "Maximum vertical rate: %dHz" %
+ self.ann_field(offset+6, offset+6, "Maximum vertical rate: %dHz" %
self.cache[offset+6])
- self.ann_field(offset+7, offset+7, "Minimum horizontal rate: %dkHz" %
+ self.ann_field(offset+7, offset+7, "Minimum horizontal rate: %dkHz" %
self.cache[offset+7])
- self.ann_field(offset+8, offset+8, "Maximum horizontal rate: %dkHz" %
+ self.ann_field(offset+8, offset+8, "Maximum horizontal rate: %dkHz" %
self.cache[offset+8])
- self.ann_field(offset+9, offset+9, "Maximum pixel clock: %dMHz" %
+ self.ann_field(offset+9, offset+9, "Maximum pixel clock: %dMHz" %
(self.cache[offset+9] * 10))
if self.cache[offset+10] == 0x02:
# Secondary GTF curve supported
@@ -464,6 +462,3 @@ class Decoder(srd.Decoder):
if self.cache[i+2] == 0 or self.cache[i+4] == 0:
self.decode_descriptor(i)
-
-
-
diff --git a/decoders/i2c/i2c.py b/decoders/i2c/i2c.py
index b1c4a8a..7dce8e1 100644
--- a/decoders/i2c/i2c.py
+++ b/decoders/i2c/i2c.py
@@ -33,9 +33,9 @@
import sigrokdecode as srd
# Annotation feed formats
-ANN_SHIFTED = 0
+ANN_SHIFTED = 0
ANN_SHIFTED_SHORT = 1
-ANN_RAW = 2
+ANN_RAW = 2
# Values are verbose and short annotation, respectively.
protocol = {
diff --git a/decoders/i2cfilter/i2cfilter.py b/decoders/i2cfilter/i2cfilter.py
index da816e6..6c1f4c8 100644
--- a/decoders/i2cfilter/i2cfilter.py
+++ b/decoders/i2cfilter/i2cfilter.py
@@ -74,4 +74,3 @@ class Decoder(srd.Decoder):
else:
raise Exception('Invalid state: %s' % self.state)
-
diff --git a/decoders/nunchuk/nunchuk.py b/decoders/nunchuk/nunchuk.py
index f901905..cd6fa21 100644
--- a/decoders/nunchuk/nunchuk.py
+++ b/decoders/nunchuk/nunchuk.py
@@ -43,7 +43,7 @@ class Decoder(srd.Decoder):
optional_probes = [] # TODO
options = {}
annotations = [
- ['TODO', 'TODO'],
+ ['TODO', 'TODO'],
]
def __init__(self, **kwargs):
@@ -121,7 +121,7 @@ class Decoder(srd.Decoder):
if self.state == IDLE:
self.state = INITIALIZED
return
-
+
if databyte == 0x40 and self.state == START:
self.state = INIT
elif databyte == 0x00 and self.state == INIT:
diff --git a/decoders/rtc8564/rtc8564.py b/decoders/rtc8564/rtc8564.py
index 00bfb27..4ce6070 100644
--- a/decoders/rtc8564/rtc8564.py
+++ b/decoders/rtc8564/rtc8564.py
@@ -52,7 +52,7 @@ class Decoder(srd.Decoder):
]
options = {}
annotations = [
- ['TODO', 'TODO'],
+ ['TODO', 'TODO'],
]
def __init__(self, **kwargs):
@@ -205,7 +205,7 @@ class Decoder(srd.Decoder):
self.state = READ_RTC_REGS2
return
else:
- pass # TODO
+ pass # TODO
elif self.state == READ_RTC_REGS2:
if cmd == 'DATA READ':
handle_reg = getattr(self, 'handle_reg_0x%02x' % self.reg)