summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2018-05-13 18:28:05 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2018-05-13 18:31:43 +0200
commitef10cea73bd05b44a213b76c6c4abb9b543cd46d (patch)
treeb0505d7b92145f03a17719e01aaa4f132875c918
parentf62e32bce4edf84dd415d3d494535d8b9a65e365 (diff)
downloadlibsigrokdecode-ef10cea73bd05b44a213b76c6c4abb9b543cd46d.tar.gz
libsigrokdecode-ef10cea73bd05b44a213b76c6c4abb9b543cd46d.zip
st7735: Merge reset_state() into reset().
-rw-r--r--decoders/st7735/pd.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/decoders/st7735/pd.py b/decoders/st7735/pd.py
index f704c03..999038a 100644
--- a/decoders/st7735/pd.py
+++ b/decoders/st7735/pd.py
@@ -95,18 +95,15 @@ class Decoder(srd.Decoder):
self.reset()
def reset(self):
- pass
-
- def start(self):
- self.out_ann = self.register(srd.OUTPUT_ANN)
-
- def reset_state(self):
self.accum_byte = 0
self.accum_bits_num = 0
self.bit_ss = -1
self.byte_ss = -1
self.current_bit = -1
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
def put_desc(self, ss, es, cmd, data):
if cmd == -1:
return
@@ -130,13 +127,13 @@ class Decoder(srd.Decoder):
current_data = []
desc_ss = -1
desc_es = -1
- self.reset_state()
+ self.reset()
while True:
# Check data on both CLK edges.
(cs, clk, mosi, dc) = self.wait({1: 'e'})
if cs == 1: # Wait for CS = low, ignore the rest.
- self.reset_state()
+ self.reset()
continue
if clk == 1: