]> sigrok.org Git - libsigrok.git/blobdiff - hardware/asix-sigma/asix-sigma.h
scpi: sr_scpi_scan_resource() never returns more than one sdi.
[libsigrok.git] / hardware / asix-sigma / asix-sigma.h
index b8362e0dfaa5579fd9373ff55c418d5198725261..4c9deff68bf480ddbf859fe8eb5c3bd747bad115 100644 (file)
@@ -76,6 +76,25 @@ enum sigma_read_register {
 
 #define CHUNK_SIZE             1024
 
+/*
+ * The entire ASIX Sigma DRAM is an array of struct sigma_dram_line[1024];
+ */
+
+/* One "DRAM cluster" contains a timestamp and 7 samples, 16b total. */
+struct sigma_dram_cluster {
+       uint8_t         timestamp_lo;
+       uint8_t         timestamp_hi;
+       struct {
+               uint8_t sample_hi;
+               uint8_t sample_lo;
+       }               samples[7];
+};
+
+/* One "DRAM line" contains 64 "DRAM clusters", 1024b total. */
+struct sigma_dram_line {
+       struct sigma_dram_cluster       cluster[64];
+};
+
 struct clockselect_50 {
        uint8_t async;
        uint8_t fraction;
@@ -167,12 +186,8 @@ struct sigma_state {
                SIGMA_DOWNLOAD,
        } state;
 
-       uint32_t stoppos, triggerpos;
        uint16_t lastts;
        uint16_t lastsample;
-
-       int triggerchunk;
-       int chunks_downloaded;
 };
 
 /* Private, per-device-instance driver context. */
@@ -184,6 +199,7 @@ struct dev_context {
        struct timeval start_tv;
        int cur_firmware;
        int num_channels;
+       int cur_channels;
        int samples_per_event;
        int capture_ratio;
        struct sigma_trigger trigger;