#define LA2016_VID 0x77a1
#define LA2016_PID 0x01a2
+#define LA2016_IPRODUCT_INDEX 2
#define USB_INTERFACE 0
#define USB_CONFIGURATION 1
+#define USB_EP_FPGA_BITSTREAM 2
+#define USB_EP_CAPTURE_DATA 6
/*
* On Windows sigrok uses WinUSB RAW_IO policy which requires the
#define LA2016_NUM_SAMPLES_MIN 256
#define LA2016_NUM_SAMPLES_MAX (10UL * 1000 * 1000 * 1000)
+#define LA2016_NUM_PWMCH_MAX 2
+
+#define LA2016_CONVBUFFER_SIZE (4 * 1024 * 1024)
+
typedef struct pwm_setting_dev {
uint32_t period;
uint32_t duty;
uint64_t fw_uploaded;
/* User specified parameters. */
- pwm_setting_t pwm_setting[2];
+ pwm_setting_t pwm_setting[LA2016_NUM_PWMCH_MAX];
unsigned int threshold_voltage_idx;
float threshold_voltage;
uint64_t max_samplerate;
uint64_t limit_samples;
uint64_t capture_ratio;
uint16_t cur_channels;
- int num_channels;
-
- /* Values derived from user specs. */
- uint64_t pre_trigger_size;
/* Internal acquisition and download state. */
- int had_triggers_configured;
- int have_trigger;
- int transfer_finished;
+ gboolean trigger_involved;
+ gboolean completion_seen;
+ gboolean download_finished;
capture_info_t info;
unsigned int n_transfer_packets_to_read; /* each with 5 acq packets */
unsigned int n_bytes_to_read;
unsigned int n_reps_until_trigger;
- unsigned int reading_behind_trigger;
+ gboolean trigger_marked;
uint64_t total_samples;
uint32_t read_pos;