+struct context {
+ const struct fx2lafw_profile *profile;
+
+ /*
+ * Since we can't keep track of an fx2lafw device after upgrading
+ * the firmware (it re-enumerates into a different device address
+ * after the upgrade) this is like a global lock. No device will open
+ * until a proper delay after the last device was upgraded.
+ */
+ GTimeVal fw_updated;
+
+ /* Device/Capture Settings */
+ uint64_t cur_samplerate;
+ uint64_t limit_samples;
+
+ uint8_t trigger_mask[NUM_TRIGGER_STAGES];
+ uint8_t trigger_value[NUM_TRIGGER_STAGES];
+ int trigger_stage;
+ uint8_t trigger_buffer[NUM_TRIGGER_STAGES];
+
+ int num_samples;
+ int submitted_transfers;