diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2013-09-14 19:07:20 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2013-09-14 20:23:51 +0200 |
commit | f1428c4cbd60be07322cc3129eaed716a269648b (patch) | |
tree | e2f43f7b55bda7cadbeca1a278e282ccd88eff3d /decoders/i2c/pd.py | |
parent | 871b19d2c747c4baf2fcc3fbed6ca51e435a0e4a (diff) | |
download | libsigrokdecode-f1428c4cbd60be07322cc3129eaed716a269648b.tar.gz libsigrokdecode-f1428c4cbd60be07322cc3129eaed716a269648b.zip |
i2c: Move OUTPUT_PROTO docs to pd.py.
Diffstat (limited to 'decoders/i2c/pd.py')
-rw-r--r-- | decoders/i2c/pd.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/decoders/i2c/pd.py b/decoders/i2c/pd.py index 2500ae4..6beb251 100644 --- a/decoders/i2c/pd.py +++ b/decoders/i2c/pd.py @@ -32,6 +32,29 @@ 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'], |