summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
e69ad48)
Introduce helper function which returns the timestamp of DRAM cluster
and use it in download_capture().
Signed-off-by: Marek Vasut <redacted>
+
+/*
+ * Return the timestamp of "DRAM cluster".
+ */
+static uint16_t sigma_dram_cluster_ts(struct sigma_dram_cluster *cluster)
+{
+ return (cluster->timestamp_hi << 8) | cluster->timestamp_lo;
+}
+
/*
* Decode chunk of 1024 bytes, 64 clusters, 7 events per cluster.
* Each event is 20ns apart, and can contain multiple samples.
/*
* Decode chunk of 1024 bytes, 64 clusters, 7 events per cluster.
* Each event is 20ns apart, and can contain multiple samples.
/* This is the first DRAM line, so find the initial timestamp. */
if (dl_lines_done == 0) {
/* This is the first DRAM line, so find the initial timestamp. */
if (dl_lines_done == 0) {
- devc->state.lastts = RL16(buf) - 1;
+ devc->state.lastts =
+ sigma_dram_cluster_ts(&dram_line[0].cluster[0]);
devc->state.lastsample = 0;
}
devc->state.lastsample = 0;
}