X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fmax7219%2Fpd.py;h=53067a679f060b7c3964f746aa0648585a9e6130;hp=c05ff849d1c4b74e05d3fce9c286bafee7d2de7b;hb=6cbba91f23b9f9ace75b4722c9c0776b9211008d;hpb=979d5dd08f33e90da58ef6bb76137693ed84693a diff --git a/decoders/max7219/pd.py b/decoders/max7219/pd.py index c05ff84..53067a6 100644 --- a/decoders/max7219/pd.py +++ b/decoders/max7219/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 re @@ -42,14 +41,15 @@ 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'), @@ -60,6 +60,12 @@ class Decoder(srd.Decoder): ('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