X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fadns5020%2Fpd.py;h=5857314e77796055dc2166e08b621357b887e857;hb=fb83ab342944ce8bddfeb87220f311954be8d0a9;hp=ed923224411a265f74db23a21aba39a4685ed8fb;hpb=ef0734978955d34e42187f79f6c2ed910b4b873d;p=libsigrokdecode.git diff --git a/decoders/adns5020/pd.py b/decoders/adns5020/pd.py index ed92322..5857314 100644 --- a/decoders/adns5020/pd.py +++ b/decoders/adns5020/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 @@ -43,9 +42,9 @@ class Decoder(srd.Decoder): api_version = 2 id = 'adns5020' name = 'ADNS-5020' - longname = 'ADNS-5020 optical mouse sensor' + longname = 'Avago ADNS-5020 optical mouse sensor' desc = 'Bidirectional command and data over an SPI-like protocol.' - license = 'gplv2' + license = 'gplv2+' inputs = ['spi'] outputs = ['adns5020'] annotations = ( @@ -59,7 +58,7 @@ class Decoder(srd.Decoder): ('warnings', 'Warnings', (2,)), ) - def __init__(self, **kwargs): + def __init__(self): self.ss_cmd, self.es_cmd = 0, 0 self.mosi_bytes = [] @@ -106,8 +105,8 @@ class Decoder(srd.Decoder): if reg > 0x63: reg_desc = 'Unknown' if write: - self.putx([1, ['%s=>%#x' % (reg_desc, arg)]]) + self.putx([1, ['%s: %#x' % (reg_desc, arg)]]) else: - self.putx([0, ['%s<=%d' % (reg_desc, arg)]]) + self.putx([0, ['%s: %d' % (reg_desc, arg)]]) self.mosi_bytes = []