From: Bert Vermeulen Date: Mon, 13 Feb 2012 14:23:16 +0000 (+0100) Subject: sr: rename hwplugin functions to sr_thing_action format X-Git-Tag: libsigrok-0.1.0~124 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=c532476aa7b9a4afb1f32d5b634348d3e825d6bb;p=libsigrok.git sr: rename hwplugin functions to sr_thing_action format --- diff --git a/backend.c b/backend.c index 6fc10829..308041ef 100644 --- a/backend.c +++ b/backend.c @@ -38,7 +38,7 @@ SR_API int sr_init(void) */ SR_API int sr_exit(void) { - sr_cleanup_hwplugins(); + sr_hwplugins_cleanup(); return SR_OK; } diff --git a/device.c b/device.c index 2713e68f..d504f8b5 100644 --- a/device.c +++ b/device.c @@ -62,7 +62,7 @@ SR_API int sr_dev_scan(void) GSList *plugins, *l; struct sr_device_plugin *plugin; - if (!(plugins = sr_list_hwplugins())) { + if (!(plugins = sr_hwplugins_list())) { sr_err("dev: %s: no supported devices/hwplugins", __func__); return SR_ERR; /* TODO: More specific error? */ } @@ -75,7 +75,7 @@ SR_API int sr_dev_scan(void) for (l = plugins; l; l = l->next) { plugin = l->data; /* TODO: Handle 'plugin' being NULL. */ - sr_init_hwplugin(plugin); + sr_hwplugin_init(plugin); } return SR_OK; diff --git a/hwplugin.c b/hwplugin.c index 4ad7502b..8d08e342 100644 --- a/hwplugin.c +++ b/hwplugin.c @@ -108,7 +108,7 @@ SR_PRIV int load_hwplugins(void) * * @return A GSList of pointers to loaded plugins. */ -SR_API GSList *sr_list_hwplugins(void) +SR_API GSList *sr_hwplugins_list(void) { return plugins; @@ -124,7 +124,7 @@ SR_API GSList *sr_list_hwplugins(void) * * @return The number of devices found and instantiated by the plugin. */ -SR_API int sr_init_hwplugin(struct sr_device_plugin *plugin) +SR_API int sr_hwplugin_init(struct sr_device_plugin *plugin) { int num_devices, num_probes, i, j; int num_initialized_devices = 0; @@ -154,7 +154,7 @@ SR_API int sr_init_hwplugin(struct sr_device_plugin *plugin) return num_initialized_devices; } -SR_PRIV void sr_cleanup_hwplugins(void) +SR_PRIV void sr_hwplugins_cleanup(void) { struct sr_device_plugin *plugin; GSList *l; diff --git a/sigrok-internal.h b/sigrok-internal.h index a233a28f..a11d85ac 100644 --- a/sigrok-internal.h +++ b/sigrok-internal.h @@ -78,7 +78,7 @@ SR_PRIV int sr_err(const char *format, ...); /*--- hwplugin.c ------------------------------------------------------------*/ SR_PRIV int load_hwplugins(void); -SR_PRIV void sr_cleanup_hwplugins(void); +SR_PRIV void sr_hwplugins_cleanup(void); /*--- session.c -------------------------------------------------------------*/ diff --git a/sigrok-proto.h b/sigrok-proto.h index bb32fc7e..fd6bcd0a 100644 --- a/sigrok-proto.h +++ b/sigrok-proto.h @@ -72,8 +72,8 @@ SR_API int sr_filter_probes(int in_unitsize, int out_unitsize, /*--- hwplugin.c ------------------------------------------------------------*/ -SR_API GSList *sr_list_hwplugins(void); -SR_API int sr_init_hwplugin(struct sr_device_plugin *plugin); +SR_API GSList *sr_hwplugins_list(void); +SR_API int sr_hwplugin_init(struct sr_device_plugin *plugin); SR_API gboolean sr_has_hwcap(int *capabilities, int hwcap); SR_API struct sr_hwcap_option *sr_find_hwcap_option(int hwcap);