X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Favr_isp%2Fpd.py;h=a0719b73dd5614a21332eccd71ef44bf5397d929;hb=3f5f3a92889e2f297ee6b94362e587a2994f896b;hp=16e3d70685f3678eb8331547dde04156f8adfcce;hpb=92b7b49f6964f57a7d6fc4473645c993cfa4ba52;p=libsigrokdecode.git diff --git a/decoders/avr_isp/pd.py b/decoders/avr_isp/pd.py index 16e3d70..a0719b7 100644 --- a/decoders/avr_isp/pd.py +++ b/decoders/avr_isp/pd.py @@ -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 . ## import sigrokdecode as srd @@ -24,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'), @@ -52,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