On 11/05/2012 07:49 PM, Bert Vermeulen wrote:
I noticed a few #ifdef'd out and experimental things in the patch; are you
still working on some other features?
Hi Bert,
I have done all that I can.
I can use sigrok to debug I2C now.
Like this:
# sigrok-cli --driver zeroplus-logic-cube --device
samplerate=800khz:captureratio=1 --probes A0=SCL,A1=SDA --triggers
SCL=1,SDA=0 --samples 1000 -a i2c
i2c: "START"
i2c: "ADDRESS WRITE" "0x50"
i2c: "ACK"
i2c: "DATA WRITE" "0x00"
i2c: "ACK"
i2c: "DATA WRITE" "0x00"
i2c: "ACK"
i2c: "START REPEAT"
i2c: "ADDRESS READ" "0x50"
i2c: "ACK"
i2c: "DATA READ" "0x55"
i2c: "NACK"
i2c: "STOP"
sr: la8: hw_cleanup: di->priv was NULL.
#
It's very nice!
(Sigrok-cli accepts only one device option. (Why?))
(I modified sigrok-cli.)
Also, may I ask which model Zeroplus you have? We're still looking for
photos and hardware for models other than the 16032.
I bought a LAP-C 16064.
It looks like the same hardware as 16032.
Toshiaki Yoshida
diff --git a/sigrok-cli.c b/sigrok-cli.c
index a626636..6daec7c 100644
--- a/sigrok-cli.c
+++ b/sigrok-cli.c
@@ -683,8 +683,8 @@ static void datafeed_in(const struct sr_dev_inst *sdi,
* the buffer of the last packet according to the sample limit.
*/
if (limit_samples && (received_samples + logic->length / sample_size >
- limit_samples * sample_size))
- filter_out_len = limit_samples * sample_size - received_samples;
+ limit_samples))
+ filter_out_len = (limit_samples - received_samples) * unitsize;
if (singleds)
sr_datastore_put(singleds, filter_out,
@@ -1287,8 +1287,6 @@ static int set_dev_options(struct sr_dev_inst *sdi, GHashTable *args)
g_critical("Failed to set device option '%s'.", (char *)key);
return ret;
}
- else
- break;
}
return SR_OK;
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel