]> sigrok.org Git - libsigrok.git/blobdiff - hardware/saleae-logic/saleae-logic.c
sr/cli/gtk: s/capability/hwcap/.
[libsigrok.git] / hardware / saleae-logic / saleae-logic.c
index afed06c68a01c24d6d3c6399eaabfce016ae9712..5e4d12d9c90346765228b3ae83b089978957bfde 100644 (file)
@@ -36,7 +36,7 @@ static struct fx2_profile supported_fx2[] = {
        { 0, 0, 0, 0, 0, 0, 0, 0 }
 };
 
-static int capabilities[] = {
+static int hwcaps[] = {
        SR_HWCAP_LOGIC_ANALYZER,
        SR_HWCAP_SAMPLERATE,
 
@@ -93,7 +93,7 @@ static libusb_context *usb_context = NULL;
 
 static int new_saleae_logic_firmware = 0;
 
-static int hw_set_configuration(int dev_index, int capability, void *value);
+static int hw_set_configuration(int dev_index, int hwcap, void *value);
 static int hw_stop_acquisition(int dev_index, gpointer session_dev_id);
 
 /**
@@ -545,9 +545,9 @@ 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 uint8_t new_firmware_divider_value(uint64_t samplerate)
@@ -628,7 +628,7 @@ static int set_configuration_samplerate(struct sr_dev_inst *sdi,
        return SR_OK;
 }
 
-static int hw_set_configuration(int dev_index, int capability, void *value)
+static int hw_set_configuration(int dev_index, int hwcap, void *value)
 {
        struct sr_dev_inst *sdi;
        struct fx2_dev *fx2;
@@ -639,12 +639,12 @@ static int hw_set_configuration(int dev_index, int capability, void *value)
                return SR_ERR;
        fx2 = sdi->priv;
 
-       if (capability == SR_HWCAP_SAMPLERATE) {
+       if (hwcap == SR_HWCAP_SAMPLERATE) {
                tmp_u64 = value;
                ret = set_configuration_samplerate(sdi, *tmp_u64);
-       } else if (capability == SR_HWCAP_PROBECONFIG) {
+       } else if (hwcap == SR_HWCAP_PROBECONFIG) {
                ret = configure_probes(fx2, (GSList *) value);
-       } else if (capability == SR_HWCAP_LIMIT_SAMPLES) {
+       } else if (hwcap == SR_HWCAP_LIMIT_SAMPLES) {
                tmp_u64 = value;
                fx2->limit_samples = *tmp_u64;
                ret = SR_OK;
@@ -901,7 +901,7 @@ SR_PRIV struct sr_dev_plugin saleae_logic_plugin_info = {
        .closedev = hw_closedev,
        .get_dev_info = hw_get_dev_info,
        .get_status = hw_get_status,
-       .get_capabilities = hw_get_capabilities,
+       .hwcap_get_all = hw_hwcap_get_all,
        .set_configuration = hw_set_configuration,
        .start_acquisition = hw_start_acquisition,
        .stop_acquisition = hw_stop_acquisition,