From: Gerhard Sittig Date: Sat, 29 Aug 2020 08:05:24 +0000 (+0200) Subject: sle44xx: fixup boilerplate, add missing required fields X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ead003186fc788e9f330264c85668e2690896bce;p=libsigrokdecode.git sle44xx: fixup boilerplate, add missing required fields The decoder was created in an older setup and would not load in recent applications. Add missing boilerplate which is mandatory. Rename 'data' since annotation classes and rows must not have ambiguous names, and there is no singular form of 'data' -- use 'fields' instead. This also fixes a missing line termination at the end of the text file. --- diff --git a/decoders/sle44xx/pd.py b/decoders/sle44xx/pd.py index 62bcdcf..e897b13 100644 --- a/decoders/sle44xx/pd.py +++ b/decoders/sle44xx/pd.py @@ -52,6 +52,7 @@ class Decoder(srd.Decoder): license = 'gplv2+' inputs = ['logic'] outputs = ['sle44xx'] + tags = ['Memory'] channels = ( {'id': 'rst', 'name': 'RST', 'desc': 'Reset line'}, {'id': 'clk', 'name': 'CLK', 'desc': 'Clock line'}, @@ -66,7 +67,7 @@ class Decoder(srd.Decoder): ) annotation_rows = ( ('bits', 'Bits', (4,)), - ('data', 'Data', (1, 2, 3)), + ('fields', 'Fields', (1, 2, 3)), ('interrupts', 'Interrupts', (0,)), ) binary = ( @@ -168,4 +169,4 @@ class Decoder(srd.Decoder): elif self.matched[2]: # Command mode START: CLK = high, I/O = falling. self.handle_command(pins) elif self.matched[3]: # Command mode STOP: CLK = high, I/O = rising. - self.handle_command(pins) \ No newline at end of file + self.handle_command(pins)