supported_samplerates,
};
-static int capabilities[] = {
+static int hwcaps[] = {
SR_HWCAP_LOGIC_ANALYZER,
SR_HWCAP_SAMPLERATE,
SR_HWCAP_CAPTURE_RATIO,
return ret;
}
-static void *hw_get_dev_info(int dev_index, int dev_info_id)
+static void *hw_dev_info_get(int dev_index, int dev_info_id)
{
struct sr_dev_inst *sdi;
struct sigma *sigma;
sigma = sdi->priv;
switch (dev_info_id) {
- case SR_DI_INSTANCE:
+ case SR_DI_INST:
info = sdi;
break;
case SR_DI_NUM_PROBES:
return SR_ST_NOT_FOUND;
}
-static int *hw_get_capabilities(void)
+static int *hw_hwcap_get_all(void)
{
- return capabilities;
+ return hwcaps;
}
-static int hw_set_configuration(int dev_index, int capability, void *value)
+static int hw_config_set(int dev_index, int hwcap, void *value)
{
struct sr_dev_inst *sdi;
struct sigma *sigma;
sigma = sdi->priv;
- if (capability == SR_HWCAP_SAMPLERATE) {
+ if (hwcap == SR_HWCAP_SAMPLERATE) {
ret = set_samplerate(sdi, *(uint64_t*) value);
- } else if (capability == SR_HWCAP_PROBECONFIG) {
+ } else if (hwcap == SR_HWCAP_PROBECONFIG) {
ret = configure_probes(sdi, value);
- } else if (capability == SR_HWCAP_LIMIT_MSEC) {
+ } else if (hwcap == SR_HWCAP_LIMIT_MSEC) {
sigma->limit_msec = *(uint64_t*) value;
if (sigma->limit_msec > 0)
ret = SR_OK;
else
ret = SR_ERR;
- } else if (capability == SR_HWCAP_CAPTURE_RATIO) {
+ } else if (hwcap == SR_HWCAP_CAPTURE_RATIO) {
sigma->capture_ratio = *(uint64_t*) value;
if (sigma->capture_ratio < 0 || sigma->capture_ratio > 100)
ret = SR_ERR;
.cleanup = hw_cleanup,
.opendev = hw_opendev,
.closedev = hw_closedev,
- .get_dev_info = hw_get_dev_info,
+ .dev_info_get = hw_dev_info_get,
.get_status = hw_get_status,
- .get_capabilities = hw_get_capabilities,
- .set_configuration = hw_set_configuration,
+ .hwcap_get_all = hw_hwcap_get_all,
+ .config_set = hw_config_set,
.start_acquisition = hw_start_acquisition,
.stop_acquisition = hw_stop_acquisition,
};