X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fmax7219%2Fpd.py;h=eb26e10511e0a2b43cd8596243b85637fe0f24c2;hp=c05ff849d1c4b74e05d3fce9c286bafee7d2de7b;hb=e144452bcdd5f2abbe6b6f3da41ad64f67e39def;hpb=979d5dd08f33e90da58ef6bb76137693ed84693a diff --git a/decoders/max7219/pd.py b/decoders/max7219/pd.py index c05ff84..eb26e10 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,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