From: Uwe Hermann Date: Wed, 29 Feb 2012 18:56:15 +0000 (+0100) Subject: sr/cli/gtk/qt: s/hw/driver/ in some places. X-Git-Tag: libsigrok-0.1.0~73 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=cfe064d8e74d86ab6a65779663ca1fb82e36260a;p=libsigrok.git sr/cli/gtk/qt: s/hw/driver/ in some places. --- diff --git a/device.c b/device.c index 5f8d5ed2..c4ff6ebe 100644 --- a/device.c +++ b/device.c @@ -62,7 +62,7 @@ SR_API int sr_dev_scan(void) int i; struct sr_dev_driver **drivers; - drivers = sr_hw_list(); + drivers = sr_driver_list(); if (!drivers[0]) { sr_err("dev: %s: no supported hardware drivers", __func__); return SR_ERR; /* TODO: More specific error? */ @@ -74,7 +74,7 @@ SR_API int sr_dev_scan(void) * of these out of the way first. */ for (i = 0; drivers[i]; i++) - sr_hw_init(drivers[i]); + sr_driver_init(drivers[i]); return SR_OK; } diff --git a/hwdriver.c b/hwdriver.c index dc314823..9b0df152 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -99,14 +99,11 @@ static struct sr_dev_driver *drivers_list[] = { }; /** - * Return the list of loaded hardware drivers. - * - * The list of drivers is initialized from sr_init(), and can only be reset - * by calling sr_exit(). + * Return the list of supported hardware drivers. * * @return Pointer to the NULL-terminated list of hardware driver pointers. */ -SR_API struct sr_dev_driver **sr_hw_list(void) +SR_API struct sr_dev_driver **sr_driver_list(void) { return drivers_list; } @@ -121,7 +118,7 @@ SR_API struct sr_dev_driver **sr_hw_list(void) * * @return The number of devices found and instantiated by the driver. */ -SR_API int sr_hw_init(struct sr_dev_driver *driver) +SR_API int sr_driver_init(struct sr_dev_driver *driver) { int num_devs, num_probes, i, j; int num_initialized_devs = 0; @@ -156,7 +153,7 @@ SR_PRIV void sr_hw_cleanup_all(void) int i; struct sr_dev_driver **drivers; - drivers = sr_hw_list(); + drivers = sr_driver_list(); for (i = 0; drivers[i]; i++) { if (drivers[i]->cleanup) drivers[i]->cleanup(); @@ -268,7 +265,7 @@ SR_PRIV void sr_serial_dev_inst_free(struct sr_serial_dev_inst *serial) * FALSE otherwise. Also, if 'driver' is NULL or the respective driver * returns an invalid capability list, FALSE is returned. */ -SR_API gboolean sr_hw_has_hwcap(struct sr_dev_driver *driver, int hwcap) +SR_API gboolean sr_driver_hwcap_exists(struct sr_dev_driver *driver, int hwcap) { int *hwcaps, i; diff --git a/sigrok-proto.h b/sigrok-proto.h index ea9f53be..6083b765 100644 --- a/sigrok-proto.h +++ b/sigrok-proto.h @@ -71,15 +71,15 @@ SR_API int sr_filter_probes(int in_unitsize, int out_unitsize, /*--- hwdriver.c ------------------------------------------------------------*/ -SR_API struct sr_dev_driver **sr_hw_list(void); -SR_API int sr_hw_init(struct sr_dev_driver *driver); -SR_API gboolean sr_hw_has_hwcap(struct sr_dev_driver *driver, int hwcap); +SR_API struct sr_dev_driver **sr_driver_list(void); +SR_API int sr_driver_init(struct sr_dev_driver *driver); +SR_API gboolean sr_driver_hwcap_exists(struct sr_dev_driver *driver, int hwcap); SR_API struct sr_hwcap_option *sr_hw_hwcap_get(int hwcap); /*--- session.c -------------------------------------------------------------*/ -typedef void (*sr_datafeed_callback) (struct sr_dev *dev, - struct sr_datafeed_packet *packet); +typedef void (*sr_datafeed_callback)(struct sr_dev *dev, + struct sr_datafeed_packet *packet); /* Session setup */ SR_API int sr_session_load(const char *filename);