]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/asix-sigma/protocol.h
asix-sigma: concentrate parameters for sample memory interpretation
[libsigrok.git] / src / hardware / asix-sigma / protocol.h
index 60798c5a6dad551b9a3b93e2535571f86d6cc5f4..83c6adb93f2b8564b2a099f8640e6731317dcfd4 100644 (file)
@@ -314,19 +314,6 @@ enum triggerfunc {
        FUNC_NXOR,
 };
 
-struct sigma_state {
-       enum {
-               SIGMA_UNINITIALIZED = 0,
-               SIGMA_CONFIG,
-               SIGMA_IDLE,
-               SIGMA_CAPTURE,
-               SIGMA_STOPPING,
-               SIGMA_DOWNLOAD,
-       } state;
-       uint16_t lastts;
-       uint16_t lastsample;
-};
-
 enum sigma_firmware_idx {
        SIGMA_FW_NONE,
        SIGMA_FW_50MHZ,
@@ -372,12 +359,24 @@ struct dev_context {
                struct sr_sw_limits submit;
        } limit;
        enum sigma_firmware_idx firmware_idx;
-       size_t num_channels;
-       size_t samples_per_event;
+       struct {
+               /* Interpretation of sample memory. */
+               size_t num_channels;
+               size_t samples_per_event;
+               uint16_t lastts;
+               uint16_t lastsample;
+       } interp;
        uint64_t capture_ratio;
        struct sigma_trigger trigger;
        gboolean use_triggers;
-       struct sigma_state state;
+       enum {
+               SIGMA_UNINITIALIZED = 0,
+               SIGMA_CONFIG,
+               SIGMA_IDLE,
+               SIGMA_CAPTURE,
+               SIGMA_STOPPING,
+               SIGMA_DOWNLOAD,
+       } state;
        struct submit_buffer *buffer;
 };