From: Bert Vermeulen Date: Sat, 7 Dec 2013 19:39:55 +0000 (+0100) Subject: std: Standardize function name. X-Git-Tag: libsigrok-0.3.0~451 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=d43b090816f61e77d8054084e85202de1a1ebeb7;p=libsigrok.git std: Standardize function name. std_dev_acquisition_stop_serial() is now std_serial_dev_acquisition_stop(). --- diff --git a/hardware/agilent-dmm/api.c b/hardware/agilent-dmm/api.c index 2c37fe3a..a58e57c3 100644 --- a/hardware/agilent-dmm/api.c +++ b/hardware/agilent-dmm/api.c @@ -274,7 +274,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) { - return std_dev_acquisition_stop_serial(sdi, cb_data, std_serial_dev_close, + return std_serial_dev_acquisition_stop(sdi, cb_data, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/hardware/brymen-dmm/api.c b/hardware/brymen-dmm/api.c index 1e1dbf65..c9f9ba75 100644 --- a/hardware/brymen-dmm/api.c +++ b/hardware/brymen-dmm/api.c @@ -256,8 +256,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) { - return std_dev_acquisition_stop_serial(sdi, cb_data, std_serial_dev_close, - sdi->conn, LOG_PREFIX); + return std_serial_dev_acquisition_stop(sdi, cb_data, std_serial_dev_close, + sdi->conn, LOG_PREFIX); } SR_PRIV struct sr_dev_driver brymen_bm857_driver_info = { diff --git a/hardware/cem-dt-885x/api.c b/hardware/cem-dt-885x/api.c index f4c170de..e1e4b2e4 100644 --- a/hardware/cem-dt-885x/api.c +++ b/hardware/cem-dt-885x/api.c @@ -415,10 +415,8 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) if (sdi->status != SR_ST_ACTIVE) return SR_ERR_DEV_CLOSED; - return std_dev_acquisition_stop_serial(sdi, cb_data, std_serial_dev_close, + return std_serial_dev_acquisition_stop(sdi, cb_data, std_serial_dev_close, sdi->conn, LOG_PREFIX); - - return SR_OK; } SR_PRIV struct sr_dev_driver cem_dt_885x_driver_info = { diff --git a/hardware/center-3xx/api.c b/hardware/center-3xx/api.c index ab6f4989..aa1e4a7b 100644 --- a/hardware/center-3xx/api.c +++ b/hardware/center-3xx/api.c @@ -252,8 +252,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) { - return std_dev_acquisition_stop_serial(sdi, cb_data, - std_serial_dev_close, sdi->conn, LOG_PREFIX); + return std_serial_dev_acquisition_stop(sdi, cb_data, + std_serial_dev_close, sdi->conn, LOG_PREFIX); } /* Driver-specific API function wrappers */ diff --git a/hardware/colead-slm/api.c b/hardware/colead-slm/api.c index fe3fd3d2..99455917 100644 --- a/hardware/colead-slm/api.c +++ b/hardware/colead-slm/api.c @@ -222,7 +222,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) { - return std_dev_acquisition_stop_serial(sdi, cb_data, std_serial_dev_close, + return std_serial_dev_acquisition_stop(sdi, cb_data, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/hardware/fluke-dmm/api.c b/hardware/fluke-dmm/api.c index 90692e79..52c34080 100644 --- a/hardware/fluke-dmm/api.c +++ b/hardware/fluke-dmm/api.c @@ -314,7 +314,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) { - return std_dev_acquisition_stop_serial(sdi, cb_data, std_serial_dev_close, + return std_serial_dev_acquisition_stop(sdi, cb_data, std_serial_dev_close, sdi->conn, LOG_PREFIX); } diff --git a/hardware/gmc-mh-1x-2x/api.c b/hardware/gmc-mh-1x-2x/api.c index acdf8413..922f9fee 100644 --- a/hardware/gmc-mh-1x-2x/api.c +++ b/hardware/gmc-mh-1x-2x/api.c @@ -372,7 +372,7 @@ static int dev_acq_stop(struct sr_dev_inst *sdi, void *cb_data) if (sdi && (devc = sdi->priv) && devc->limit_msec) g_timer_stop(devc->elapsed_msec); - return std_dev_acquisition_stop_serial(sdi, cb_data, dev_close, + return std_serial_dev_acquisition_stop(sdi, cb_data, dev_close, sdi->conn, LOG_PREFIX); } diff --git a/hardware/mic-985xx/api.c b/hardware/mic-985xx/api.c index d59c0bfc..cdbf70df 100644 --- a/hardware/mic-985xx/api.c +++ b/hardware/mic-985xx/api.c @@ -254,8 +254,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) { - return std_dev_acquisition_stop_serial(sdi, cb_data, std_serial_dev_close, - sdi->conn, LOG_PREFIX); + return std_serial_dev_acquisition_stop(sdi, cb_data, std_serial_dev_close, + sdi->conn, LOG_PREFIX); } /* Driver-specific API function wrappers */ diff --git a/hardware/norma-dmm/api.c b/hardware/norma-dmm/api.c index d0089c62..397694ca 100644 --- a/hardware/norma-dmm/api.c +++ b/hardware/norma-dmm/api.c @@ -302,7 +302,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) if (sdi && (devc = sdi->priv) && devc->limit_msec) g_timer_stop(devc->elapsed_msec); - return std_dev_acquisition_stop_serial(sdi, cb_data, dev_close, + return std_serial_dev_acquisition_stop(sdi, cb_data, dev_close, sdi->conn, LOG_PREFIX); } diff --git a/hardware/serial-dmm/api.c b/hardware/serial-dmm/api.c index c85e9448..4af043a4 100644 --- a/hardware/serial-dmm/api.c +++ b/hardware/serial-dmm/api.c @@ -490,8 +490,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) { - return std_dev_acquisition_stop_serial(sdi, cb_data, std_serial_dev_close, - sdi->conn, LOG_PREFIX); + return std_serial_dev_acquisition_stop(sdi, cb_data, std_serial_dev_close, + sdi->conn, LOG_PREFIX); } /* Driver-specific API function wrappers */ diff --git a/hardware/teleinfo/api.c b/hardware/teleinfo/api.c index bf70660f..49a3f5ce 100644 --- a/hardware/teleinfo/api.c +++ b/hardware/teleinfo/api.c @@ -278,8 +278,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) { - return std_dev_acquisition_stop_serial(sdi, cb_data, std_serial_dev_close, - sdi->conn, LOG_PREFIX); + return std_serial_dev_acquisition_stop(sdi, cb_data, std_serial_dev_close, + sdi->conn, LOG_PREFIX); } SR_PRIV struct sr_dev_driver teleinfo_driver_info = { diff --git a/hardware/tondaj-sl-814/api.c b/hardware/tondaj-sl-814/api.c index aa27c17c..f9958238 100644 --- a/hardware/tondaj-sl-814/api.c +++ b/hardware/tondaj-sl-814/api.c @@ -218,8 +218,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) { - return std_dev_acquisition_stop_serial(sdi, cb_data, std_serial_dev_close, - sdi->conn, LOG_PREFIX); + return std_serial_dev_acquisition_stop(sdi, cb_data, std_serial_dev_close, + sdi->conn, LOG_PREFIX); } SR_PRIV struct sr_dev_driver tondaj_sl_814_driver_info = { diff --git a/libsigrok-internal.h b/libsigrok-internal.h index 5e0556e3..3122e581 100644 --- a/libsigrok-internal.h +++ b/libsigrok-internal.h @@ -181,7 +181,7 @@ typedef void (*std_dev_clear_t)(void *priv); SR_PRIV int std_init(struct sr_context *sr_ctx, struct sr_dev_driver *di, const char *prefix); #ifdef HAVE_LIBSERIALPORT -SR_PRIV int std_dev_acquisition_stop_serial(struct sr_dev_inst *sdi, +SR_PRIV int std_serial_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data, dev_close_t dev_close_fn, struct sr_serial_dev_inst *serial, const char *prefix); #endif diff --git a/std.c b/std.c index ab151198..2b4dec3f 100644 --- a/std.c +++ b/std.c @@ -124,7 +124,7 @@ SR_PRIV int std_session_send_df_header(const struct sr_dev_inst *sdi, * @retval SR_ERR_DEV_CLOSED Device is closed. * @retval SR_ERR Other errors. */ -SR_PRIV int std_dev_acquisition_stop_serial(struct sr_dev_inst *sdi, +SR_PRIV int std_serial_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data, dev_close_t dev_close_fn, struct sr_serial_dev_inst *serial, const char *prefix) {