return hwcaps;
}
-static int hw_config_set(int dev_index, int hwcap, void *value)
+static int hw_dev_config_set(int dev_index, int hwcap, void *value)
{
struct sr_dev_inst *sdi;
struct alsa *alsa;
.dev_info_get = hw_dev_info_get,
.dev_status_get = hw_dev_status_get,
.hwcap_get_all = hw_hwcap_get_all,
- .config_set = hw_config_set,
+ .dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
};
return hwcaps;
}
-static int hw_config_set(int dev_index, int hwcap, void *value)
+static int hw_dev_config_set(int dev_index, int hwcap, void *value)
{
struct sr_dev_inst *sdi;
struct sigma *sigma;
.dev_info_get = hw_dev_info_get,
.dev_status_get = hw_dev_status_get,
.hwcap_get_all = hw_hwcap_get_all,
- .config_set = hw_config_set,
+ .dev_config_set = hw_dev_config_set,
.dev_dev_acquisition_start = hw_dev_dev_acquisition_start,
.dev_dev_acquisition_stop = hw_dev_dev_acquisition_stop,
};
return hwcaps;
}
-static int hw_config_set(int dev_index, int hwcap, void *value)
+static int hw_dev_config_set(int dev_index, int hwcap, void *value)
{
struct sr_dev_inst *sdi;
struct la8 *la8;
.dev_info_get = hw_dev_info_get,
.dev_status_get = hw_dev_status_get,
.hwcap_get_all = hw_hwcap_get_all,
- .config_set = hw_config_set,
+ .dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
};
return hwcaps;
}
-static int hw_config_set(int dev_index, int hwcap, void *value)
+static int hw_dev_config_set(int dev_index, int hwcap, void *value)
{
int ret;
char *stropt;
.dev_info_get = hw_dev_info_get,
.dev_status_get = hw_dev_status_get,
.hwcap_get_all = hw_hwcap_get_all,
- .config_set = hw_config_set,
+ .dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
};
return hwcaps;
}
-static int hw_config_set(int dev_index, int hwcap, void *value)
+static int hw_dev_config_set(int dev_index, int hwcap, void *value)
{
struct sr_dev_inst *sdi;
.dev_info_get = hw_dev_info_get,
.dev_status_get = hw_dev_status_get,
.hwcap_get_all = hw_hwcap_get_all,
- .config_set = hw_config_set,
+ .dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
};
return hwcaps;
}
-static int config_set_samplerate(struct sr_dev_inst *sdi, uint64_t samplerate)
+static int set_samplerate(struct sr_dev_inst *sdi, uint64_t samplerate)
{
struct ols_dev *ols;
return SR_OK;
}
-static int hw_config_set(int dev_index, int hwcap, void *value)
+static int hw_dev_config_set(int dev_index, int hwcap, void *value)
{
struct sr_dev_inst *sdi;
struct ols_dev *ols;
switch (hwcap) {
case SR_HWCAP_SAMPLERATE:
tmp_u64 = value;
- ret = config_set_samplerate(sdi, *tmp_u64);
+ ret = set_samplerate(sdi, *tmp_u64);
break;
case SR_HWCAP_PROBECONFIG:
ret = configure_probes(ols, (GSList *) value);
.dev_info_get = hw_dev_info_get,
.dev_status_get = hw_dev_status_get,
.hwcap_get_all = hw_hwcap_get_all,
- .config_set = hw_config_set,
+ .dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
};
static int new_saleae_logic_firmware = 0;
-static int hw_config_set(int dev_index, int hwcap, void *value);
+static int hw_dev_config_set(int dev_index, int hwcap, void *value);
static int hw_dev_acquisition_stop(int dev_index, gpointer session_dev_id);
/**
if (fx2->cur_samplerate == 0) {
/* Samplerate hasn't been set; default to the slowest one. */
- if (hw_config_set(dev_index, SR_HWCAP_SAMPLERATE,
+ if (hw_dev_config_set(dev_index, SR_HWCAP_SAMPLERATE,
&supported_samplerates[0]) == SR_ERR)
return SR_ERR;
}
return 0;
}
-static int config_set_samplerate(struct sr_dev_inst *sdi, uint64_t samplerate)
+static int set_samplerate(struct sr_dev_inst *sdi, uint64_t samplerate)
{
struct fx2_dev *fx2;
uint8_t divider;
return SR_OK;
}
-static int hw_config_set(int dev_index, int hwcap, void *value)
+static int hw_dev_config_set(int dev_index, int hwcap, void *value)
{
struct sr_dev_inst *sdi;
struct fx2_dev *fx2;
if (hwcap == SR_HWCAP_SAMPLERATE) {
tmp_u64 = value;
- ret = config_set_samplerate(sdi, *tmp_u64);
+ ret = set_samplerate(sdi, *tmp_u64);
} else if (hwcap == SR_HWCAP_PROBECONFIG) {
ret = configure_probes(fx2, (GSList *) value);
} else if (hwcap == SR_HWCAP_LIMIT_SAMPLES) {
.dev_info_get = hw_dev_info_get,
.dev_status_get = hw_dev_status_get,
.hwcap_get_all = hw_hwcap_get_all,
- .config_set = hw_config_set,
+ .dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
};
struct sr_usb_dev_inst *usb;
};
-static int hw_config_set(int dev_index, int hwcap, void *value);
+static int hw_dev_config_set(int dev_index, int hwcap, void *value);
static unsigned int get_memory_size(int type)
{
if (zp->cur_samplerate == 0) {
/* Samplerate hasn't been set. Default to the slowest one. */
- if (hw_config_set(dev_index, SR_HWCAP_SAMPLERATE,
+ if (hw_dev_config_set(dev_index, SR_HWCAP_SAMPLERATE,
&samplerates.list[0]) == SR_ERR)
return SR_ERR;
}
return hwcaps;
}
-static int config_set_samplerate(struct sr_dev_inst *sdi, uint64_t samplerate)
+static int set_samplerate(struct sr_dev_inst *sdi, uint64_t samplerate)
{
struct zp *zp;
return SR_OK;
}
-static int hw_config_set(int dev_index, int hwcap, void *value)
+static int hw_dev_config_set(int dev_index, int hwcap, void *value)
{
struct sr_dev_inst *sdi;
uint64_t *tmp_u64;
switch (hwcap) {
case SR_HWCAP_SAMPLERATE:
tmp_u64 = value;
- return config_set_samplerate(sdi, *tmp_u64);
+ return set_samplerate(sdi, *tmp_u64);
case SR_HWCAP_PROBECONFIG:
return configure_probes(sdi, (GSList *)value);
case SR_HWCAP_LIMIT_SAMPLES:
.dev_info_get = hw_dev_info_get,
.dev_status_get = hw_dev_status_get,
.hwcap_get_all = hw_hwcap_get_all,
- .config_set = hw_config_set,
+ .dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
};
return hwcaps;
}
-static int hw_config_set(int dev_index, int hwcap, void *value)
+static int hw_dev_config_set(int dev_index, int hwcap, void *value)
{
struct session_vdev *vdev;
uint64_t *tmp_u64;
.dev_info_get = hw_dev_info_get,
.dev_status_get = hw_dev_status_get,
.hwcap_get_all = hw_hwcap_get_all,
- .config_set = hw_config_set,
+ .dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = NULL,
};
/* first device, init the plugin */
dev->plugin->init((char *)filename);
sr_session_dev_add(dev);
- dev->plugin->config_set(devcnt, SR_HWCAP_CAPTUREFILE, val);
+ dev->plugin->dev_config_set(devcnt, SR_HWCAP_CAPTUREFILE, val);
g_ptr_array_add(capturefiles, val);
} else if (!strcmp(keys[j], "samplerate")) {
sr_parse_sizestring(val, &tmp_u64);
- dev->plugin->config_set(devcnt, SR_HWCAP_SAMPLERATE, &tmp_u64);
+ dev->plugin->dev_config_set(devcnt, SR_HWCAP_SAMPLERATE, &tmp_u64);
} else if (!strcmp(keys[j], "unitsize")) {
tmp_u64 = strtoull(val, NULL, 10);
- dev->plugin->config_set(devcnt, SR_HWCAP_CAPTURE_UNITSIZE, &tmp_u64);
+ dev->plugin->dev_config_set(devcnt, SR_HWCAP_CAPTURE_UNITSIZE, &tmp_u64);
} else if (!strcmp(keys[j], "total probes")) {
total_probes = strtoull(val, NULL, 10);
- dev->plugin->config_set(devcnt, SR_HWCAP_CAPTURE_NUM_PROBES, &total_probes);
+ dev->plugin->dev_config_set(devcnt, SR_HWCAP_CAPTURE_NUM_PROBES, &total_probes);
for (p = 0; p < total_probes; p++) {
snprintf(probename, SR_MAX_PROBENAME_LEN, "%" PRIu64, p);
sr_dev_probe_add(dev, probename);
typedef int (*sr_receive_data_callback) (int fd, int revents, void *user_data);
-/* Data types used by hardware plugins for config_set() */
+/* Data types used by hardware plugins for dev_config_set() */
enum {
SR_T_UINT64,
SR_T_CHAR,
void *(*dev_info_get) (int dev_index, int dev_info_id);
int (*dev_status_get) (int dev_index);
int *(*hwcap_get_all) (void);
- int (*config_set) (int dev_index, int hwcap, void *value);
+ int (*dev_config_set) (int dev_index, int hwcap, void *value);
int (*dev_acquisition_start) (int dev_index, gpointer session_dev_id);
int (*dev_acquisition_stop) (int dev_index, gpointer session_dev_id);
};