From: Bert Vermeulen Date: Mon, 13 Feb 2012 02:36:32 +0000 (+0100) Subject: sr: more API cleanup and documentation X-Git-Tag: sigrok-cli-0.3.0~35 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f81faab0eaf03aeea6476112f0f4e91fee709efc;p=sigrok-cli.git sr: more API cleanup and documentation --- diff --git a/parsers.c b/parsers.c index fdf8562..6f47e61 100644 --- 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; diff --git a/sigrok-cli.c b/sigrok-cli.c index 4502da4..21e3ad9 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -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");