summaryrefslogtreecommitdiff
path: root/decoders/tca6408a
diff options
context:
space:
mode:
authorSoeren Apel <soeren@apelpie.net>2020-06-21 12:10:59 +0200
committerSoeren Apel <soeren@apelpie.net>2021-02-13 23:21:10 +0100
commit114adb4997b71e93267e3816710c8b019ae927c0 (patch)
tree9c9b51fe5188db63f7311a2dc6f4516909b42270 /decoders/tca6408a
parentb8c8dc8a649ad0a76bccbfae7198cc9c8cb2ccda (diff)
downloadlibsigrokdecode-114adb4997b71e93267e3816710c8b019ae927c0.tar.gz
libsigrokdecode-114adb4997b71e93267e3816710c8b019ae927c0.zip
Implement basic flushing
Diffstat (limited to 'decoders/tca6408a')
-rw-r--r--decoders/tca6408a/pd.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/decoders/tca6408a/pd.py b/decoders/tca6408a/pd.py
index 0d63cc3..4ca1082 100644
--- a/decoders/tca6408a/pd.py
+++ b/decoders/tca6408a/pd.py
@@ -64,6 +64,9 @@ class Decoder(srd.Decoder):
self.out_ann = self.register(srd.OUTPUT_ANN)
self.out_logic = self.register(srd.OUTPUT_LOGIC)
+ def flush(self):
+ self.put_logic_states()
+
def putx(self, data):
self.put(self.ss, self.es, self.out_ann, data)
@@ -78,6 +81,7 @@ class Decoder(srd.Decoder):
# TODO
def handle_reg_0x01(self, b):
+ self.put_logic_states()
self.putx([1, ['Outputs set: %02X' % b]])
self.logic_value = b
@@ -109,8 +113,6 @@ class Decoder(srd.Decoder):
# Store the start/end samples of this I²C packet.
self.ss, self.es = ss, es
- self.put_logic_states()
-
# State machine.
if self.state == 'IDLE':
# Wait for an I²C START condition.