]> sigrok.org Git - libsigrok.git/blobdiff - hardware/zeroplus-logic-cube/zeroplus.c
sr/cli/gtk/qt: s/get_dev_info/dev_info_get/.
[libsigrok.git] / hardware / zeroplus-logic-cube / zeroplus.c
index d79eca6ec0ab44467225024e41054497c8e6c2ba..8bb7d1ed1cf8a2fa4c36bf1a03b54fde61dd3212 100644 (file)
@@ -63,7 +63,7 @@ static model_t zeroplus_models[] = {
        {0x7016, "LAP-C(162000)", 16, 2048, 200},
 };
 
-static int capabilities[] = {
+static int hwcaps[] = {
        SR_HWCAP_LOGIC_ANALYZER,
        SR_HWCAP_SAMPLERATE,
        SR_HWCAP_PROBECONFIG,
@@ -166,7 +166,7 @@ struct zp {
        struct sr_usb_dev_inst *usb;
 };
 
-static int hw_set_configuration(int dev_index, int capability, void *value);
+static int hw_config_set(int dev_index, int hwcap, void *value);
 
 static unsigned int get_memory_size(int type)
 {
@@ -462,7 +462,7 @@ static int hw_opendev(int dev_index)
 
        if (zp->cur_samplerate == 0) {
                /* Samplerate hasn't been set. Default to the slowest one. */
-               if (hw_set_configuration(dev_index, SR_HWCAP_SAMPLERATE,
+               if (hw_config_set(dev_index, SR_HWCAP_SAMPLERATE,
                     &samplerates.list[0]) == SR_ERR)
                        return SR_ERR;
        }
@@ -507,7 +507,7 @@ static int hw_cleanup(void)
        return SR_OK;
 }
 
-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 zp *zp;
@@ -563,13 +563,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 set_configuration_samplerate(struct sr_dev_inst *sdi,
-                                       uint64_t samplerate)
+static int config_set_samplerate(struct sr_dev_inst *sdi, uint64_t samplerate)
 {
        struct zp *zp;
 
@@ -597,7 +596,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_config_set(int dev_index, int hwcap, void *value)
 {
        struct sr_dev_inst *sdi;
        uint64_t *tmp_u64;
@@ -613,10 +612,10 @@ static int hw_set_configuration(int dev_index, int capability, void *value)
                return SR_ERR_ARG;
        }
 
-       switch (capability) {
+       switch (hwcap) {
        case SR_HWCAP_SAMPLERATE:
                tmp_u64 = value;
-               return set_configuration_samplerate(sdi, *tmp_u64);
+               return config_set_samplerate(sdi, *tmp_u64);
        case SR_HWCAP_PROBECONFIG:
                return configure_probes(sdi, (GSList *)value);
        case SR_HWCAP_LIMIT_SAMPLES:
@@ -737,10 +736,10 @@ SR_PRIV struct sr_dev_plugin zeroplus_logic_cube_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,
 };