]> sigrok.org Git - sigrok-cli.git/commitdiff
sr: more API cleanup and documentation
authorBert Vermeulen <redacted>
Mon, 13 Feb 2012 02:36:32 +0000 (03:36 +0100)
committerBert Vermeulen <redacted>
Mon, 13 Feb 2012 02:36:32 +0000 (03:36 +0100)
parsers.c
sigrok-cli.c

index fdf8562f365f73a04a4099f361eadceade29e191..6f47e61de26e289160014a6d772b4b7d35f6937c 100644 (file)
--- a/parsers.c
+++ b/parsers.c
@@ -169,7 +169,7 @@ struct sr_device *parse_devicestring(const char *devicestring)
                        plugin = p->data;
                        if (strcmp(plugin->name, devicestring))
                                continue;
-                       num_devices = sr_init_hwplugins(plugin);
+                       num_devices = sr_init_hwplugin(plugin);
                        if (num_devices == 1) {
                                devices = sr_device_list();
                                device = devices->data;
index 4502da40482ad53c3aa4f7a8598fcc96a40a6541..21e3ad939afbe5b0ba0bb25f1100e36c60c98763 100644 (file)
@@ -833,7 +833,7 @@ static void run_session(void)
 
        if (opt_continuous) {
                capabilities = device->plugin->get_capabilities();
-               if (!sr_find_hwcap(capabilities, SR_HWCAP_CONTINUOUS)) {
+               if (!sr_has_hwcap(capabilities, SR_HWCAP_CONTINUOUS)) {
                        printf("This device does not support continuous sampling.");
                        sr_session_destroy();
                        return;
@@ -866,7 +866,7 @@ static void run_session(void)
                }
 
                capabilities = device->plugin->get_capabilities();
-               if (sr_find_hwcap(capabilities, SR_HWCAP_LIMIT_MSEC)) {
+               if (sr_has_hwcap(capabilities, 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");