Hello,

I posted a pull request https://github.com/sigrokproject/libsigrokdecode/pull/92 for the new protocol decoder.

i2c_packet protocol decoder stacks with i2c PD and allows to combine several data bytes from "START" i2c condition until "STOP" or "START REPEAT" and puts this data in a dedicated annotation.
 
Possible data formats for data output are hex, ascii, dec, bin and oct.
 
This decoder also allows logging data packets with the `print_sec` option enabled:
$ sigrok-cli -d fx2lafw -c samplerate=1M --continuous -P i2c:scl=D2:sda=D3,i2c_packet:print_sec=yes -A i2c_packet
i2c_packet-1:    0.082 ADDR 0x08 WR: 04
i2c_packet-1:    0.082 ADDR 0x08 RD: 05 00 00 1C 11 00 00 0A 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 FF FF 57
i2c_packet-1:    0.181 ADDR 0x08 WR: 04
i2c_packet-1:    0.181 ADDR 0x08 RD: 05 00 00 1C 11 00 00 0A 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 FF FF 57
i2c_packet-1:    0.280 ADDR 0x08 WR: 04
i2c_packet-1:    0.280 ADDR 0x08 RD: 05 00 00 1C 11 00 00 0A 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 FF FF 57
Could you look at the proposed decoder and give feedback on it?
 
Sincerely yours,
Sergey Spivak

_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to