summaryrefslogtreecommitdiff
path: root/decoders
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2014-04-15 08:43:22 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2014-04-15 10:46:10 +0200
commitbf69977d12886794ac597083403859ac99ab38ac (patch)
treefc89f22d320eab929873c33c35523e5be5a25d23 /decoders
parentce71bf0e29e9c3890eb74725ceb963ff35a29639 (diff)
downloadlibsigrokdecode-bf69977d12886794ac597083403859ac99ab38ac.tar.gz
libsigrokdecode-bf69977d12886794ac597083403859ac99ab38ac.zip
All PDs: More consistent OUTPUT_PYTHON format docs.
Diffstat (limited to 'decoders')
-rw-r--r--decoders/i2c/pd.py12
-rw-r--r--decoders/jtag/pd.py8
-rw-r--r--decoders/spi/pd.py6
-rw-r--r--decoders/uart/pd.py6
4 files changed, 16 insertions, 16 deletions
diff --git a/decoders/i2c/pd.py b/decoders/i2c/pd.py
index a8a2226..2d6e5c2 100644
--- a/decoders/i2c/pd.py
+++ b/decoders/i2c/pd.py
@@ -28,10 +28,10 @@ import sigrokdecode as srd
'''
OUTPUT_PYTHON format:
-I²C packet:
-[<cmd>, <data>]
+Packet:
+[<ptype>, <pdata>]
-<cmd> is one of:
+<ptype>:
- 'START' (START condition)
- 'START REPEAT' (Repeated START condition)
- 'ADDRESS READ' (Slave address, read)
@@ -41,12 +41,12 @@ I²C packet:
- 'STOP' (STOP condition)
- 'ACK' (ACK bit)
- 'NACK' (NACK bit)
- - 'BITS' (<data>: list of data/address bits and their ss/es numbers)
+ - 'BITS' (<pdata>: list of data/address bits and their ss/es numbers)
-<data> is the data or address byte associated with the 'ADDRESS*' and 'DATA*'
+<pdata> is the data or address byte associated with the 'ADDRESS*' and 'DATA*'
command. Slave addresses do not include bit 0 (the READ/WRITE indication bit).
For example, a slave address field could be 0x51 (instead of 0xa2).
-For 'START', 'START REPEAT', 'STOP', 'ACK', and 'NACK' <data> is None.
+For 'START', 'START REPEAT', 'STOP', 'ACK', and 'NACK' <pdata> is None.
'''
# CMD: [annotation-type-index, long annotation, short annotation]
diff --git a/decoders/jtag/pd.py b/decoders/jtag/pd.py
index 95e5d28..25f2634 100644
--- a/decoders/jtag/pd.py
+++ b/decoders/jtag/pd.py
@@ -23,11 +23,11 @@ import sigrokdecode as srd
'''
OUTPUT_PYTHON format:
-JTAG packet:
-[<packet-type>, <data>]
+Packet:
+[<ptype>, <pdata>]
-<packet-type> is one of:
- - 'NEW STATE': <data> is the new state of the JTAG state machine.
+<ptype>:
+ - 'NEW STATE': <pdata> is the new state of the JTAG state machine.
Valid values: 'TEST-LOGIC-RESET', 'RUN-TEST/IDLE', 'SELECT-DR-SCAN',
'CAPTURE-DR', 'SHIFT-DR', 'EXIT1-DR', 'PAUSE-DR', 'EXIT2-DR', 'UPDATE-DR',
'SELECT-IR-SCAN', 'CAPTURE-IR', 'SHIFT-IR', 'EXIT1-IR', 'PAUSE-IR',
diff --git a/decoders/spi/pd.py b/decoders/spi/pd.py
index 7250dbd..5bab8f7 100644
--- a/decoders/spi/pd.py
+++ b/decoders/spi/pd.py
@@ -24,10 +24,10 @@ import sigrokdecode as srd
'''
OUTPUT_PYTHON format:
-SPI packet:
-[<cmd>, <data1>, <data2>]
+Packet:
+[<ptype>, <data1>, <data2>]
-Commands:
+<ptype>:
- 'DATA': <data1> contains the MISO data, <data2> contains the MOSI data.
The data is _usually_ 8 bits (but can also be fewer or more bits).
Both data items are Python numbers (not strings), or None if the respective
diff --git a/decoders/uart/pd.py b/decoders/uart/pd.py
index a0b1326..ae99874 100644
--- a/decoders/uart/pd.py
+++ b/decoders/uart/pd.py
@@ -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).