]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/uart/pd.py
All PDs: More consistent OUTPUT_PYTHON format docs.
[libsigrokdecode.git] / decoders / uart / pd.py
index 57031d73040643565cd6a6d5766bbc9058d3f0af..ae99874c8f48762cfb10396d22e96bc03dcf09d4 100644 (file)
@@ -23,10 +23,10 @@ import sigrokdecode as srd
 '''
 OUTPUT_PYTHON format:
 
-UART packet:
-[<packet-type>, <rxtx>, <packet-data>]
+Packet:
+[<ptype>, <rxtx>, <pdata>]
 
-This is the list of <packet-type>s and their respective <packet-data>:
+This is the list of <ptype>s and their respective <pdata> values:
  - 'STARTBIT': The data is the (integer) value of the start bit (0/1).
  - 'DATA': The data is the (integer) value of the UART data. Valid values
    range from 0 to 512 (as the data can be up to 9 bits in size).
@@ -70,7 +70,7 @@ def parity_ok(parity_type, parity_bit, data, num_data_bits):
         raise Exception('Invalid parity type: %d' % parity_type)
 
 class Decoder(srd.Decoder):
-    api_version = 1
+    api_version = 2
     id = 'uart'
     name = 'UART'
     longname = 'Universal Asynchronous Receiver/Transmitter'