return SR_OK;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
void *cb_data)
{
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return SR_OK;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+ struct dev_context *devc;
+
+ (void)sdi;
+
+ switch (key) {
+ case SR_CONF_SAMPLERATE:
+ if (!sdi || !sdi->priv)
+ return SR_ERR_ARG;
+ devc = sdi->priv;
+ if (!devc->supp_rates.list) {
+ sr_err("Instance did not contain a samplerate list.");
+ return SR_ERR_ARG;
+ }
+ *data = &devc->supp_rates;
+ break;
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
void *cb_data)
{
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return ret;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ case SR_CONF_SAMPLERATE:
+ *data = &samplerates;
+ break;
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
/* Software trigger to determine exact trigger position. */
static int get_trigger_offset(uint16_t *samples, uint16_t last_sample,
struct sigma_trigger *t)
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return SR_OK;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ case SR_CONF_SAMPLERATE:
+ fill_supported_samplerates_if_needed();
+ *data = &samplerates;
+ break;
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static int receive_data(int fd, int revents, void *cb_data)
{
int i, ret;
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return SR_OK;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
void *cb_data)
{
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return ret;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ case SR_CONF_SAMPLERATE:
+ *data = &samplerates;
+ break;
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static void samples_generator(uint8_t *buf, uint64_t size,
struct dev_context *devc)
{
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return SR_OK;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
void *cb_data)
{
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return ret;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ case SR_CONF_SAMPLERATE:
+ *data = &samplerates;
+ break;
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static int receive_data(int fd, int revents, void *cb_data)
{
struct timeval tv;
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return ret;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static void send_chunk(struct sr_dev_inst *sdi, unsigned char *buf,
int num_samples)
{
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return ret;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static void mark_xfer(struct libusb_transfer *xfer)
{
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return ret;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ case SR_CONF_SAMPLERATE:
+ *data = &samplerates;
+ break;
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
void *cb_data)
{
.dev_clear = hw_cleanup,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return ret;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
void *cb_data)
{
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return ret;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ case SR_CONF_SAMPLERATE:
+ *data = &samplerates;
+ break;
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
void *cb_data)
{
.dev_clear = hw_cleanup,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return ret;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
void *cb_data)
{
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return SR_OK;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
void *cb_data, int dmm)
{
.dev_clear = clear_instances_##ID_UPPER, \
.config_get = config_get, \
.config_set = config_set, \
+ .config_list = config_list, \
.dev_open = hw_dev_open, \
.dev_close = hw_dev_close, \
.dev_acquisition_start = hw_dev_acquisition_start_##ID_UPPER, \
return SR_OK;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
void *cb_data)
{
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return SR_OK;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
void *cb_data)
{
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
return ret;
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static void receive_transfer(struct libusb_transfer *transfer)
{
struct dev_context *devc;
.dev_clear = clear_instances,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,
}
}
+static int config_list(int key, const void **data, const struct sr_dev_inst *sdi)
+{
+
+ (void)sdi;
+
+ switch (key) {
+ case SR_CONF_SAMPLERATE:
+ *data = &samplerates;
+ break;
+ default:
+ return SR_ERR_ARG;
+ }
+
+ return SR_OK;
+}
+
static void set_triggerbar(struct dev_context *devc)
{
unsigned int ramsize;
.dev_clear = hw_cleanup,
.config_get = config_get,
.config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_acquisition_start = hw_dev_acquisition_start,