From: Gerhard Sittig Date: Thu, 13 Jul 2023 17:30:02 +0000 (+0200) Subject: input/protocoldata: reduce inter-frame gap for I2C waveforms X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f6d0f7a83c5b5e31c1bffc9abaebb91822378f9e;p=libsigrok.git input/protocoldata: reduce inter-frame gap for I2C waveforms Space I2C data bytes the same as address bytes are spaced. Results in a graphical presentation that is easier to inspect, and is less wasteful at the same time (more data is seen at the same zoom level). --- diff --git a/src/input/protocoldata.c b/src/input/protocoldata.c index 6be96f18..1438f6f4 100644 --- a/src/input/protocoldata.c +++ b/src/input/protocoldata.c @@ -2411,10 +2411,14 @@ static int i2c_get_idle_interframe(struct context *inc, size_t *samplecount, uint8_t *sample) { - /* Describe four bit times, re-use the current pin levels. */ + /* + * The space around regular bytes already is sufficient. We + * don't need to generate an inter-frame gap, but the code is + * prepared to in case we want to in the future. + */ if (samplecount) { *samplecount = inc->curr_opts.samples_per_bit; - *samplecount *= 4; + *samplecount *= 0; } if (sample) *sample = inc->samples.curr_levels;