diff options
author | Gerhard Sittig <gerhard.sittig@gmx.net> | 2020-08-18 21:05:17 +0200 |
---|---|---|
committer | Gerhard Sittig <gerhard.sittig@gmx.net> | 2020-08-30 07:23:58 +0200 |
commit | e4f70391abbb153364a534d45a59026961ce1b1f (patch) | |
tree | 550353510ebf278ad7fc027c7516983b1d804d0f /decoders | |
parent | d25293e6e4bf8126223c885e2bdccde9118800e7 (diff) | |
download | libsigrokdecode-e4f70391abbb153364a534d45a59026961ce1b1f.tar.gz libsigrokdecode-e4f70391abbb153364a534d45a59026961ce1b1f.zip |
sle44xx: minor developer comment and style nits
These are just nits, behaviour remains. The comment may be incorrect
how command and data modes are detected. Add a developer comment for
later revisit. Drop unneeded parentheses in a ternary operation, and
move an ATR related comment around.
Diffstat (limited to 'decoders')
-rw-r--r-- | decoders/sle44xx/pd.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/decoders/sle44xx/pd.py b/decoders/sle44xx/pd.py index f84bea6..775ee3c 100644 --- a/decoders/sle44xx/pd.py +++ b/decoders/sle44xx/pd.py @@ -105,14 +105,16 @@ class Decoder(srd.Decoder): cls, texts = lookup_proto_ann_txt(self.cmd, {}) self.putx([cls, texts]) self.bits = [] - self.cmd = 'ATR' # Next data bytes will be ATR + # Next data bytes will be Answer To Reset. + self.cmd = 'ATR' def handle_command(self, pins): rst, clk, io = pins self.ss, self.es = self.samplenum, self.samplenum + # XXX Is the comment inverted? # If I/O is rising -> command START # if I/O is falling -> command STOP and response data incoming - self.cmd = 'CMD' if (io == 0) else 'DATA' + self.cmd = 'CMD' if io == 0 else 'DATA' self.bits = [] # Gather 8 bits of data |