+enum sigma_firmware_idx {
+ SIGMA_FW_NONE,
+ SIGMA_FW_50MHZ,
+ SIGMA_FW_100MHZ,
+ SIGMA_FW_200MHZ,
+ SIGMA_FW_SYNC,
+ SIGMA_FW_FREQ,
+};
+
+enum ext_clock_edge_t {
+ SIGMA_CLOCK_EDGE_RISING,
+ SIGMA_CLOCK_EDGE_FALLING,
+ SIGMA_CLOCK_EDGE_EITHER,
+};
+
+struct submit_buffer;
+
+struct dev_context {
+ struct {
+ uint16_t vid, pid;
+ uint32_t serno;
+ uint16_t prefix;
+ enum asix_device_type type;
+ } id;
+ char **channel_names;
+ struct {
+ struct ftdi_context ctx;
+ gboolean is_open, must_close;
+ } ftdi;
+ struct {
+ uint64_t samplerate;
+ gboolean use_ext_clock;
+ size_t clock_pin;
+ enum ext_clock_edge_t clock_edge;
+ } clock;
+ struct {
+ /*
+ * User specified configuration values, in contrast to
+ * internal arrangement of acquisition, and submission
+ * to the session feed.
+ */
+ struct sr_sw_limits config;
+ struct sr_sw_limits acquire;
+ struct sr_sw_limits submit;
+ } limit;
+ enum sigma_firmware_idx firmware_idx;
+ struct sigma_sample_interp {
+ /* Interpretation of sample memory. */
+ size_t num_channels;
+ size_t samples_per_event;
+ struct {
+ uint16_t ts;
+ uint16_t sample;
+ } last;
+ struct sigma_location {
+ size_t raw, line, cluster, event;
+ } start, stop, trig, iter, trig_arm;
+ struct {
+ size_t lines_total, lines_done;
+ size_t lines_per_read; /* USB transfer limit */
+ size_t lines_rcvd;
+ struct sigma_dram_line *rcvd_lines;
+ struct sigma_dram_line *curr_line;
+ } fetch;
+ struct {
+ gboolean armed;
+ gboolean matched;
+ size_t evt_remain;
+ } trig_chk;
+ } interp;
+ uint64_t capture_ratio;
+ struct sigma_trigger trigger;
+ gboolean use_triggers;
+ gboolean late_trigger_timeout;