]> sigrok.org Git - sigrok-cli.git/commitdiff
sr: rename all sr_hwplugin(s)_* functions to sr_hw_*
authorBert Vermeulen <redacted>
Wed, 15 Feb 2012 02:18:48 +0000 (03:18 +0100)
committerBert Vermeulen <redacted>
Wed, 15 Feb 2012 02:18:48 +0000 (03:18 +0100)
parsers.c
sigrok-cli.c

index f3321ba099a3f7b481a2020dce99bbecce7b1db2..4430b90daa1f631b1aa384d285eac29c941fd336 100644 (file)
--- a/parsers.c
+++ b/parsers.c
@@ -164,12 +164,12 @@ struct sr_device *parse_devicestring(const char *devicestring)
                 * no need to let them all scan
                 */
                device = NULL;
-               plugins = sr_hwplugins_list();
+               plugins = sr_hw_list();
                for (p = plugins; p; p = p->next) {
                        plugin = p->data;
                        if (strcmp(plugin->name, devicestring))
                                continue;
-                       num_devices = sr_hwplugin_init(plugin);
+                       num_devices = sr_hw_init(plugin);
                        if (num_devices == 1) {
                                devices = sr_dev_list();
                                device = devices->data;
index dda4343f16292b8a4fb6f6b74609491976986082..8c92d9fff3b70826eb3a7cafd435ce252522703a 100644 (file)
@@ -95,7 +95,7 @@ static void show_version(void)
        printf("sigrok-cli %s\n\n", VERSION);
 
        printf("Supported hardware drivers:\n");
-       plugins = sr_hwplugins_list();
+       plugins = sr_hw_list();
        for (p = plugins; p; p = p->next) {
                plugin = p->data;
                printf("  %-20s %s\n", plugin->name, plugin->longname);
@@ -203,7 +203,7 @@ static void show_device_detail(void)
        title = "Supported options:\n";
        capabilities = device->plugin->get_capabilities();
        for (cap = 0; capabilities[cap]; cap++) {
-               if (!(hwo = sr_hwplugins_hwcap_get(capabilities[cap])))
+               if (!(hwo = sr_hw_hwcap_get(capabilities[cap])))
                        continue;
 
                if (title) {
@@ -837,7 +837,7 @@ static void run_session(void)
             return;
 
        if (opt_continuous) {
-               if (!sr_hwplugin_has_hwcap(device->plugin, SR_HWCAP_CONTINUOUS)) {
+               if (!sr_hw_has_hwcap(device->plugin, SR_HWCAP_CONTINUOUS)) {
                        printf("This device does not support continuous sampling.");
                        sr_session_destroy();
                        return;
@@ -869,7 +869,7 @@ static void run_session(void)
                        return;
                }
 
-               if (sr_hwplugin_has_hwcap(device->plugin, SR_HWCAP_LIMIT_MSEC)) {
+               if (sr_hw_has_hwcap(device->plugin, SR_HWCAP_LIMIT_MSEC)) {
                        if (device->plugin->set_configuration(device->plugin_index,
                                                          SR_HWCAP_LIMIT_MSEC, &time_msec) != SR_OK) {
                                printf("Failed to configure time limit.\n");