X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fi2c%2F__init__.py;h=14262d18e9177a1f8860801e2b9d2df3199019c8;hb=5d7c5bcca4f770280cd4b58a8ea383fe97cf4a32;hp=3c29aa1cddf723dbc4d7262e2f9379490298ec58;hpb=156509ca42f0df2380c9f205f9aad337e1a07802;p=libsigrokdecode.git diff --git a/decoders/i2c/__init__.py b/decoders/i2c/__init__.py index 3c29aa1..14262d1 100644 --- a/decoders/i2c/__init__.py +++ b/decoders/i2c/__init__.py @@ -59,21 +59,24 @@ http://en.wikipedia.org/wiki/I2C Protocol output format: I2C packet: -[, , ] - - 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) +[, ] + + 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) 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' is None. - is either 'ACK' or 'NACK', but may also be None. ''' from .i2c import *