]> sigrok.org Git - libsigrok.git/commitdiff
sr/cli/gtk/qt: s/configuration/config/.
authorUwe Hermann <redacted>
Fri, 17 Feb 2012 23:31:35 +0000 (00:31 +0100)
committerUwe Hermann <redacted>
Fri, 17 Feb 2012 23:31:35 +0000 (00:31 +0100)
hardware/alsa/alsa.c
hardware/asix-sigma/asix-sigma.c
hardware/chronovu-la8/chronovu-la8.c
hardware/demo/demo.c
hardware/link-mso19/link-mso19.c
hardware/openbench-logic-sniffer/ols.c
hardware/saleae-logic/saleae-logic.c
hardware/zeroplus-logic-cube/zeroplus.c
session_driver.c
session_file.c
sigrok.h

index 9b8040058d60b08d09fcae3d804d48c7de442df5..4c22737e1314e31dec37de11b3ed8952bc81f424 100644 (file)
@@ -209,7 +209,7 @@ static int *hw_hwcap_get_all(void)
        return hwcaps;
 }
 
-static int hw_set_configuration(int dev_index, int hwcap, void *value)
+static int hw_config_set(int dev_index, int hwcap, void *value)
 {
        struct sr_dev_inst *sdi;
        struct alsa *alsa;
@@ -403,7 +403,7 @@ SR_PRIV struct sr_dev_plugin alsa_plugin_info = {
        .get_dev_info = hw_get_dev_info,
        .get_status = hw_get_status,
        .hwcap_get_all = hw_hwcap_get_all,
-       .set_configuration = hw_set_configuration,
+       .config_set = hw_config_set,
        .start_acquisition = hw_start_acquisition,
        .stop_acquisition = hw_stop_acquisition,
 };
index 9befd061ed23063464af22524eb65799889f8305..8d5736964c7ca50e73108b5163d6bcd8f7388ab4 100644 (file)
@@ -797,7 +797,7 @@ static int *hw_hwcap_get_all(void)
        return hwcaps;
 }
 
-static int hw_set_configuration(int dev_index, int hwcap, void *value)
+static int hw_config_set(int dev_index, int hwcap, void *value)
 {
        struct sr_dev_inst *sdi;
        struct sigma *sigma;
@@ -1422,7 +1422,7 @@ SR_PRIV struct sr_dev_plugin asix_sigma_plugin_info = {
        .get_dev_info = hw_get_dev_info,
        .get_status = hw_get_status,
        .hwcap_get_all = hw_hwcap_get_all,
-       .set_configuration = hw_set_configuration,
+       .config_set = hw_config_set,
        .start_acquisition = hw_start_acquisition,
        .stop_acquisition = hw_stop_acquisition,
 };
index aa4cde25f249283579716e49571acd7d53f61847..cdaf22c9da8293acc224a0bd1b3889c157b16837 100644 (file)
@@ -762,7 +762,7 @@ static int *hw_hwcap_get_all(void)
        return hwcaps;
 }
 
-static int hw_set_configuration(int dev_index, int hwcap, void *value)
+static int hw_config_set(int dev_index, int hwcap, void *value)
 {
        struct sr_dev_inst *sdi;
        struct la8 *la8;
@@ -1124,7 +1124,7 @@ SR_PRIV struct sr_dev_plugin chronovu_la8_plugin_info = {
        .get_dev_info = hw_get_dev_info,
        .get_status = hw_get_status,
        .hwcap_get_all = hw_hwcap_get_all,
-       .set_configuration = hw_set_configuration,
+       .config_set = hw_config_set,
        .start_acquisition = hw_start_acquisition,
        .stop_acquisition = hw_stop_acquisition,
 };
index cd266c31753aa2ad1bb837891762fe7cacf78581..48c70029486575c66702ac1ebc73273976cd3cc3 100644 (file)
@@ -227,7 +227,7 @@ static int *hw_hwcap_get_all(void)
        return hwcaps;
 }
 
-static int hw_set_configuration(int dev_index, int hwcap, void *value)
+static int hw_config_set(int dev_index, int hwcap, void *value)
 {
        int ret;
        char *stropt;
@@ -500,7 +500,7 @@ SR_PRIV struct sr_dev_plugin demo_plugin_info = {
        .get_dev_info = hw_get_dev_info,
        .get_status = hw_get_status,
        .hwcap_get_all = hw_hwcap_get_all,
-       .set_configuration = hw_set_configuration,
+       .config_set = hw_config_set,
        .start_acquisition = hw_start_acquisition,
        .stop_acquisition = hw_stop_acquisition,
 };
index c61f66375a6b456d75569ae082ca4b15c333d65f..98e1507b939a0981f8e7aa559a4169f01177e34d 100644 (file)
@@ -650,7 +650,7 @@ static int *hw_hwcap_get_all(void)
        return hwcaps;
 }
 
-static int hw_set_configuration(int dev_index, int hwcap, void *value)
+static int hw_config_set(int dev_index, int hwcap, void *value)
 {
        struct sr_dev_inst *sdi;
 
@@ -840,7 +840,7 @@ SR_PRIV struct sr_dev_plugin link_mso19_plugin_info = {
        .get_dev_info = hw_get_dev_info,
        .get_status = hw_get_status,
        .hwcap_get_all = hw_hwcap_get_all,
-       .set_configuration = hw_set_configuration,
+       .config_set = hw_config_set,
        .start_acquisition = hw_start_acquisition,
        .stop_acquisition = hw_stop_acquisition,
 };
index ead384a30cb63c2fc779951b54871e36c0b2a68e..33237527fbc4fffeb21e0573cdb1fe07acd74591 100644 (file)
@@ -605,8 +605,7 @@ static int *hw_hwcap_get_all(void)
        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 ols_dev *ols;
 
@@ -638,7 +637,7 @@ static int set_configuration_samplerate(struct sr_dev_inst *sdi,
        return SR_OK;
 }
 
-static int hw_set_configuration(int dev_index, int hwcap, void *value)
+static int hw_config_set(int dev_index, int hwcap, void *value)
 {
        struct sr_dev_inst *sdi;
        struct ols_dev *ols;
@@ -655,7 +654,7 @@ static int hw_set_configuration(int dev_index, int hwcap, void *value)
        switch (hwcap) {
        case SR_HWCAP_SAMPLERATE:
                tmp_u64 = value;
-               ret = set_configuration_samplerate(sdi, *tmp_u64);
+               ret = config_set_samplerate(sdi, *tmp_u64);
                break;
        case SR_HWCAP_PROBECONFIG:
                ret = configure_probes(ols, (GSList *) value);
@@ -1049,7 +1048,7 @@ SR_PRIV struct sr_dev_plugin ols_plugin_info = {
        .get_dev_info = hw_get_dev_info,
        .get_status = hw_get_status,
        .hwcap_get_all = hw_hwcap_get_all,
-       .set_configuration = hw_set_configuration,
+       .config_set = hw_config_set,
        .start_acquisition = hw_start_acquisition,
        .stop_acquisition = hw_stop_acquisition,
 };
index 5e4d12d9c90346765228b3ae83b089978957bfde..12ede4e168fb69d7053e4ba9bab07b1ddf35d987 100644 (file)
@@ -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 hwcap, void *value);
+static int hw_config_set(int dev_index, int hwcap, void *value);
 static int hw_stop_acquisition(int dev_index, gpointer session_dev_id);
 
 /**
@@ -440,7 +440,7 @@ static int hw_opendev(int dev_index)
 
        if (fx2->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,
                    &supported_samplerates[0]) == SR_ERR)
                        return SR_ERR;
        }
@@ -591,8 +591,7 @@ static uint8_t new_firmware_divider_value(uint64_t samplerate)
        return 0;
 }
 
-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 fx2_dev *fx2;
        uint8_t divider;
@@ -628,7 +627,7 @@ static int set_configuration_samplerate(struct sr_dev_inst *sdi,
        return SR_OK;
 }
 
-static int hw_set_configuration(int dev_index, int hwcap, void *value)
+static int hw_config_set(int dev_index, int hwcap, void *value)
 {
        struct sr_dev_inst *sdi;
        struct fx2_dev *fx2;
@@ -641,7 +640,7 @@ static int hw_set_configuration(int dev_index, int hwcap, void *value)
 
        if (hwcap == SR_HWCAP_SAMPLERATE) {
                tmp_u64 = value;
-               ret = set_configuration_samplerate(sdi, *tmp_u64);
+               ret = config_set_samplerate(sdi, *tmp_u64);
        } else if (hwcap == SR_HWCAP_PROBECONFIG) {
                ret = configure_probes(fx2, (GSList *) value);
        } else if (hwcap == SR_HWCAP_LIMIT_SAMPLES) {
@@ -902,7 +901,7 @@ SR_PRIV struct sr_dev_plugin saleae_logic_plugin_info = {
        .get_dev_info = hw_get_dev_info,
        .get_status = hw_get_status,
        .hwcap_get_all = hw_hwcap_get_all,
-       .set_configuration = hw_set_configuration,
+       .config_set = hw_config_set,
        .start_acquisition = hw_start_acquisition,
        .stop_acquisition = hw_stop_acquisition,
 };
index c61044d6e36192e7a6f975aad925ef8b1beb950e..77cda797d49b7d14e8d39541c0301f82dee1d65c 100644 (file)
@@ -166,7 +166,7 @@ struct zp {
        struct sr_usb_dev_inst *usb;
 };
 
-static int hw_set_configuration(int dev_index, int hwcap, 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;
        }
@@ -568,8 +568,7 @@ static int *hw_hwcap_get_all(void)
        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 hwcap, void *value)
+static int hw_config_set(int dev_index, int hwcap, void *value)
 {
        struct sr_dev_inst *sdi;
        uint64_t *tmp_u64;
@@ -616,7 +615,7 @@ static int hw_set_configuration(int dev_index, int hwcap, void *value)
        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:
@@ -740,7 +739,7 @@ SR_PRIV struct sr_dev_plugin zeroplus_logic_cube_plugin_info = {
        .get_dev_info = hw_get_dev_info,
        .get_status = hw_get_status,
        .hwcap_get_all = hw_hwcap_get_all,
-       .set_configuration = hw_set_configuration,
+       .config_set = hw_config_set,
        .start_acquisition = hw_start_acquisition,
        .stop_acquisition = hw_stop_acquisition,
 };
index db7682464e489e8ca8d9b1591f34b64d4e75c968..cf6267f463ccdf24916bd8ec037d5461d6a4b877 100644 (file)
@@ -232,7 +232,7 @@ static int *hw_hwcap_get_all(void)
        return hwcaps;
 }
 
-static int hw_set_configuration(int dev_index, int hwcap, void *value)
+static int hw_config_set(int dev_index, int hwcap, void *value)
 {
        struct session_vdev *vdev;
        uint64_t *tmp_u64;
@@ -342,7 +342,7 @@ SR_PRIV struct sr_dev_plugin session_driver = {
        hw_get_dev_info,
        hw_get_status,
        hw_hwcap_get_all,
-       hw_set_configuration,
+       hw_config_set,
        hw_start_acquisition,
        NULL,
 };
index 2883d0dc11bb47bf5362bef2a404a4c28e2e3ea7..1f85c049d6f3265e7163af4c1deff2f3d398756a 100644 (file)
@@ -120,17 +120,17 @@ SR_API int sr_session_load(const char *filename)
                                                /* first device, init the plugin */
                                                dev->plugin->init((char *)filename);
                                        sr_session_dev_add(dev);
-                                       dev->plugin->set_configuration(devcnt, SR_HWCAP_CAPTUREFILE, val);
+                                       dev->plugin->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->set_configuration(devcnt, SR_HWCAP_SAMPLERATE, &tmp_u64);
+                                       dev->plugin->config_set(devcnt, SR_HWCAP_SAMPLERATE, &tmp_u64);
                                } else if (!strcmp(keys[j], "unitsize")) {
                                        tmp_u64 = strtoull(val, NULL, 10);
-                                       dev->plugin->set_configuration(devcnt, SR_HWCAP_CAPTURE_UNITSIZE, &tmp_u64);
+                                       dev->plugin->config_set(devcnt, SR_HWCAP_CAPTURE_UNITSIZE, &tmp_u64);
                                } else if (!strcmp(keys[j], "total probes")) {
                                        total_probes = strtoull(val, NULL, 10);
-                                       dev->plugin->set_configuration(devcnt, SR_HWCAP_CAPTURE_NUM_PROBES, &total_probes);
+                                       dev->plugin->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);
index ba13005136c3a447b1455755c2f05dab78a364c2..dcad1b7721acefa91065a0138a01f13ca4e10fdc 100644 (file)
--- a/sigrok.h
+++ b/sigrok.h
@@ -94,7 +94,7 @@ extern "C" {
 
 typedef int (*sr_receive_data_callback) (int fd, int revents, void *user_data);
 
-/* Data types used by hardware plugins for set_configuration() */
+/* Data types used by hardware plugins for config_set() */
 enum {
        SR_T_UINT64,
        SR_T_CHAR,
@@ -352,7 +352,7 @@ struct sr_dev_plugin {
        void *(*get_dev_info) (int dev_index, int dev_info_id);
        int (*get_status) (int dev_index);
        int *(*hwcap_get_all) (void);
-       int (*set_configuration) (int dev_index, int hwcap, void *value);
+       int (*config_set) (int dev_index, int hwcap, void *value);
        int (*start_acquisition) (int dev_index, gpointer session_dev_id);
        int (*stop_acquisition) (int dev_index, gpointer session_dev_id);
 };