]> sigrok.org Git - libsigrok.git/blobdiff - hardware/asix-sigma/asix-sigma.c
sr/cli/gtk/qt: s/get_dev_info/dev_info_get/.
[libsigrok.git] / hardware / asix-sigma / asix-sigma.c
index a72a960b9c8f4bea7293b3fbbb0b059faed935a4..77f3e3507787a2797caab5821ee680bfd1632d49 100644 (file)
@@ -84,7 +84,7 @@ static struct sr_samplerates samplerates = {
        supported_samplerates,
 };
 
-static int capabilities[] = {
+static int hwcaps[] = {
        SR_HWCAP_LOGIC_ANALYZER,
        SR_HWCAP_SAMPLERATE,
        SR_HWCAP_CAPTURE_RATIO,
@@ -744,7 +744,7 @@ static int hw_cleanup(void)
        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;
@@ -758,7 +758,7 @@ static void *hw_get_dev_info(int dev_index, int dev_info_id)
        sigma = sdi->priv;
 
        switch (dev_info_id) {
-       case SR_DI_INSTANCE:
+       case SR_DI_INST:
                info = sdi;
                break;
        case SR_DI_NUM_PROBES:
@@ -792,12 +792,12 @@ static int hw_get_status(int dev_index)
                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;
@@ -808,17 +808,17 @@ static int hw_set_configuration(int dev_index, int capability, void *value)
 
        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;
@@ -1419,10 +1419,10 @@ SR_PRIV struct sr_dev_plugin asix_sigma_plugin_info = {
        .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,
 };