]> sigrok.org Git - libsigrokdecode.git/commitdiff
srd: Bring back small stuff lost in the merge.
authorUwe Hermann <redacted>
Sun, 15 Jan 2012 11:50:07 +0000 (12:50 +0100)
committerUwe Hermann <redacted>
Sun, 15 Jan 2012 11:59:59 +0000 (12:59 +0100)
Also, use ''' for docstrings to be consistent with the rest.

decoders/ddc.py
decoders/i2c.py

index 2336159d70f84d0f12d24addbf13f6db6604ef30..53244c3e0aa84dcb8e2dd0d83367fb86325b2b9d 100644 (file)
 ## You should have received a copy of the GNU General Public License
 ## along with this program; if not, If not, see <http://www.gnu.org/licenses/>.
 ##
 ## You should have received a copy of the GNU General Public License
 ## along with this program; if not, If not, see <http://www.gnu.org/licenses/>.
 ##
-"""
+
+'''
 This decoder extracts a DDC stream from an I2C session between a computer
 and a display device. The stream is output as plain bytes.
 
 Details:
 https://en.wikipedia.org/wiki/Display_Data_Channel
 This decoder extracts a DDC stream from an I2C session between a computer
 and a display device. The stream is output as plain bytes.
 
 Details:
 https://en.wikipedia.org/wiki/Display_Data_Channel
-"""
+'''
 
 import sigrokdecode as srd
 
 
 import sigrokdecode as srd
 
index e63ab8525454eb48ae10a2b244e01bb0862aa4b1..f28b1583a1143a5cda6f79b88b5e5f3ab9df3aea 100644 (file)
@@ -22,6 +22,7 @@
 # I2C protocol decoder
 #
 
 # I2C protocol decoder
 #
 
+#
 # The Inter-Integrated Circuit (I2C) bus is a bidirectional, multi-master
 # bus using two signals (SCL = serial clock line, SDA = serial data line).
 #
 # The Inter-Integrated Circuit (I2C) bus is a bidirectional, multi-master
 # bus using two signals (SCL = serial clock line, SDA = serial data line).
 #
 # TODO: Handle multiple different I2C devices on same bus
 #       -> we need to decode multiple protocols at the same time.
 
 # TODO: Handle multiple different I2C devices on same bus
 #       -> we need to decode multiple protocols at the same time.
 
-"""
-I2C protocol output format:
-
-The protocol output consists of a (Python) list of I2C "packets", each of
-which is of the form
+'''
+Protocol output format:
 
 
-       [ _i2c_command_, _data_, _ack_bit_ ]
+I2C packet:
+[<i2c_command>, <data>, <ack_bit>]
 
 
-_i2c_command_ is one of:
+<i2c_command> is one of:
   - 'START' (START condition)
   - 'START' (START condition)
-  - 'START_REPEAT' (Repeated START)
-  - 'ADDRESS_READ' (Address, read)
-  - 'ADDRESS_WRITE' (Address, write)
-  - 'DATA_READ' (Data, read)
-  - 'DATA_WRITE' (Data, write)
+  - 'START REPEAT' (Repeated START)
+  - 'ADDRESS READ' (Address, read)
+  - 'ADDRESS WRITE' (Address, write)
+  - 'DATA READ' (Data, read)
+  - 'DATA WRITE' (Data, write)
   - 'STOP' (STOP condition)
 
   - 'STOP' (STOP condition)
 
-_data_ is the data or address byte associated with the ADDRESS_* and DATA_*
-command. For START, START_REPEAT and STOP, this is None.
+<data> is the data or address byte associated with the 'ADDRESS*' and 'DATA*'
+command. For 'START', 'START REPEAT' and 'STOP', this is None.
 
 
-_ack_bit_ is either 'ACK' or 'NACK', but may also be None.
-"""
+<ack_bit> is either 'ACK' or 'NACK', but may also be None.
+'''
 
 import sigrokdecode as srd
 
 
 import sigrokdecode as srd