X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fpan1321%2Fpan1321.py;h=da981f25438f098734c18d12fa26fc4977923f4f;hb=5ea8b024da82871d4054356f8a645c8d61bbcd47;hp=13f1226f4a80b624ec157345681abfe4acbef795;hpb=fd4aa8aaed83f9f0041647b913e48ef95c1aab55;p=libsigrokdecode.git diff --git a/decoders/pan1321/pan1321.py b/decoders/pan1321/pan1321.py index 13f1226..da981f2 100644 --- a/decoders/pan1321/pan1321.py +++ b/decoders/pan1321/pan1321.py @@ -18,20 +18,10 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -# # Panasonic PAN1321 Bluetooth module protocol decoder -# -# TODO -# import sigrokdecode as srd -# Annotation feed formats -ANN_ASCII = 0 - -# UART 'data' packet type. -T_DATA = 1 - # ... RX = 0 TX = 1 @@ -41,16 +31,15 @@ class Decoder(srd.Decoder): id = 'pan1321' name = 'PAN1321' longname = 'Panasonic PAN1321' - desc = 'TODO.' - longdesc = 'TODO.' + desc = 'Bluetooth RF module with Serial Port Profile (SPP).' license = 'gplv2+' inputs = ['uart'] outputs = ['pan1321'] probes = [] - extra_probes = [] + optional_probes = [] options = {} annotations = [ - ['ASCII', 'TODO: description'], + ['Text', 'Human-readable text'], ] def __init__(self, **kwargs): @@ -97,7 +86,7 @@ class Decoder(srd.Decoder): ptype, rxtx, pdata = data # For now, ignore all UART packets except the actual data packets. - if ptype != T_DATA: + if ptype != 'DATA': return # Append a new (ASCII) byte to the currently built/parsed command.