]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/i2c/__init__.py
Minor autotools improvements.
[libsigrokdecode.git] / decoders / i2c / __init__.py
index 3c29aa1cddf723dbc4d7262e2f9379490298ec58..6c7dafe7d75e7cf20f4c62c219db307aadb81a33 100644 (file)
@@ -59,22 +59,25 @@ http://en.wikipedia.org/wiki/I2C
 Protocol output format:
 
 I2C packet:
-[<i2c_command>, <data>, <ack_bit>]
-
-<i2c_command> is one of:
-  - 'START' (START condition)
-  - 'START REPEAT' (Repeated START)
-  - 'ADDRESS READ' (Address, read)
-  - 'ADDRESS WRITE' (Address, write)
-  - 'DATA READ' (Data, read)
-  - 'DATA WRITE' (Data, write)
-  - 'STOP' (STOP condition)
+[<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. For 'START', 'START REPEAT' and 'STOP', this is None.
+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.
 
-<ack_bit> is either 'ACK' or 'NACK', but may also be None.
 '''
 
-from .i2c import *
+from .pd import *