]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/avr_isp/pd.py
modbus: Make C->S and S->C configurable, add framegap option.
[libsigrokdecode.git] / decoders / avr_isp / pd.py
index 6a3a241015db89f7d21204fa9058a5bd6de06966..a0719b73dd5614a21332eccd71ef44bf5397d929 100644 (file)
@@ -23,14 +23,15 @@ from .parts import *
 VENDOR_CODE_ATMEL = 0x1e
 
 class Decoder(srd.Decoder):
-    api_version = 2
+    api_version = 3
     id = 'avr_isp'
     name = 'AVR ISP'
     longname = 'AVR In-System Programming'
-    desc = 'Protocol for in-system programming Atmel AVR MCUs.'
+    desc = 'Atmel AVR In-System Programming (ISP) protocol.'
     license = 'gplv2+'
     inputs = ['spi']
-    outputs = ['avr_isp']
+    outputs = []
+    tags = ['Debug/trace']
     annotations = (
         ('pe', 'Programming enable'),
         ('rsb0', 'Read signature byte 0'),
@@ -51,6 +52,9 @@ class Decoder(srd.Decoder):
     )
 
     def __init__(self):
+        self.reset()
+
+    def reset(self):
         self.state = 'IDLE'
         self.mosi_bytes, self.miso_bytes = [], []
         self.ss_cmd, self.es_cmd = 0, 0