]> sigrok.org Git - libsigrokdecode.git/commitdiff
i2c: Move OUTPUT_PROTO docs to pd.py.
authorUwe Hermann <redacted>
Sat, 14 Sep 2013 17:07:20 +0000 (19:07 +0200)
committerUwe Hermann <redacted>
Sat, 14 Sep 2013 18:23:51 +0000 (20:23 +0200)
decoders/i2c/__init__.py
decoders/i2c/pd.py

index 2442ee1f0096b335945cd6f74db0f1b297996cac..57309e349dd3acd8cdf3b1de5d97481df726e317 100644 (file)
@@ -23,28 +23,6 @@ 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).
-
-Protocol output format:
-
-I2C packet:
-[<cmd>, <data>]
-
-<cmd> is one of:
- - 'START' (START condition)
- - 'START REPEAT' (Repeated START condition)
- - 'ADDRESS READ' (Slave address, read)
- - 'ADDRESS WRITE' (Slave address, write)
- - 'DATA READ' (Data, read)
- - 'DATA WRITE' (Data, write)
- - 'STOP' (STOP condition)
- - 'ACK' (ACK bit)
- - 'NACK' (NACK bit)
-
-<data> 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.
-
 '''
 
 from .pd import *
 '''
 
 from .pd import *
index 2500ae4cc6e036a7620a1dd5e2c0c830a3b05af7..6beb251442ef0d7f6b22864bf4b10068175119b3 100644 (file)
 
 import sigrokdecode as srd
 
 
 import sigrokdecode as srd
 
+'''
+Protocol output format:
+
+I2C packet:
+[<cmd>, <data>]
+
+<cmd> is one of:
+ - 'START' (START condition)
+ - 'START REPEAT' (Repeated START condition)
+ - 'ADDRESS READ' (Slave address, read)
+ - 'ADDRESS WRITE' (Slave address, write)
+ - 'DATA READ' (Data, read)
+ - 'DATA WRITE' (Data, write)
+ - 'STOP' (STOP condition)
+ - 'ACK' (ACK bit)
+ - 'NACK' (NACK bit)
+
+<data> 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.
+'''
+
 # CMD: [annotation-type-index, long annotation, short annotation]
 proto = {
     'START':           [0, 'Start',         'S'],
 # CMD: [annotation-type-index, long annotation, short annotation]
 proto = {
     'START':           [0, 'Start',         'S'],