]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/max7219/pd.py
All PDs: Consistently use singular/plural for annotation classes/rows.
[libsigrokdecode.git] / decoders / max7219 / pd.py
index c05ff849d1c4b74e05d3fce9c286bafee7d2de7b..eb26e10511e0a2b43cd8596243b85637fe0f24c2 100644 (file)
@@ -14,8 +14,7 @@
 ## GNU General Public License for more details.
 ##
 ## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+## along with this program; if not, see <http://www.gnu.org/licenses/>.
 ##
 
 import re
@@ -42,24 +41,31 @@ registers = {
 ann_reg, ann_digit, ann_warning = range(3)
 
 class Decoder(srd.Decoder):
-    api_version = 2
+    api_version = 3
     id = 'max7219'
     name = 'MAX7219'
     longname = 'Maxim MAX7219/MAX7221'
-    desc = '8-digit LED display driver.'
+    desc = 'Maxim MAX72xx series 8-digit LED display driver.'
     license = 'gplv2+'
     inputs = ['spi']
-    outputs = ['max7219']
+    outputs = []
+    tags = ['Display']
     annotations = (
-        ('register', 'Registers written to the device'),
-        ('digit', 'Digits displayed on the device'),
-        ('warnings', 'Human-readable warnings'),
+        ('register', 'Register write'),
+        ('digit', 'Digit displayed'),
+        ('warning', 'Warning'),
     )
     annotation_rows = (
         ('commands', 'Commands', (ann_reg, ann_digit)),
         ('warnings', 'Warnings', (ann_warning,)),
     )
 
+    def __init__(self):
+        self.reset()
+
+    def reset(self):
+        pass
+
     def start(self):
         self.out_ann = self.register(srd.OUTPUT_ANN)
         self.pos = 0