From: Uwe Hermann Date: Wed, 8 Apr 2020 21:35:44 +0000 (+0200) Subject: std: Rename std_session_send_frame_begin/_end(). X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7f7702b81bd9051a87fde54983561675329d5dc8;p=libsigrok.git std: Rename std_session_send_frame_begin/_end(). --- diff --git a/src/hardware/demo/api.c b/src/hardware/demo/api.c index 3b77d40c..ba317fbe 100644 --- a/src/hardware/demo/api.c +++ b/src/hardware/demo/api.c @@ -573,7 +573,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) std_session_send_df_header(sdi); if (devc->limit_frames > 0) - std_session_send_frame_begin(sdi); + std_session_send_df_frame_begin(sdi); /* We use this timestamp to decide how many more samples to send. */ devc->start_us = g_get_monotonic_time(); @@ -591,7 +591,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) devc = sdi->priv; if (devc->limit_frames > 0) - std_session_send_frame_end(sdi); + std_session_send_df_frame_end(sdi); std_session_send_df_end(sdi); diff --git a/src/hardware/demo/protocol.c b/src/hardware/demo/protocol.c index a969d029..eea3c9b8 100644 --- a/src/hardware/demo/protocol.c +++ b/src/hardware/demo/protocol.c @@ -714,7 +714,7 @@ SR_PRIV int demo_prepare_data(int fd, int revents, void *cb_data) devc->spent_us += todo_us; if (devc->limit_frames && devc->sent_frame_samples >= SAMPLES_PER_FRAME) { - std_session_send_frame_end(sdi); + std_session_send_df_frame_end(sdi); devc->sent_frame_samples = 0; devc->limit_frames--; if (!devc->limit_frames) { @@ -742,7 +742,7 @@ SR_PRIV int demo_prepare_data(int fd, int revents, void *cb_data) sr_dev_acquisition_stop(sdi); } else if (devc->limit_frames) { if (devc->sent_frame_samples == 0) - std_session_send_frame_begin(sdi); + std_session_send_df_frame_begin(sdi); } return G_SOURCE_CONTINUE; diff --git a/src/hardware/serial-lcr/protocol.c b/src/hardware/serial-lcr/protocol.c index e7b2612f..e5b89dc5 100644 --- a/src/hardware/serial-lcr/protocol.c +++ b/src/hardware/serial-lcr/protocol.c @@ -98,7 +98,7 @@ static int handle_packet(struct sr_dev_inst *sdi, const uint8_t *pkt) g_slist_free(analog.meaning->channels); } if (frame) { - std_session_send_frame_end(sdi); + std_session_send_df_frame_end(sdi); sr_sw_limits_update_frames_read(&devc->limits, 1); } diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h index 94ac3d1a..4caceef6 100644 --- a/src/libsigrok-internal.h +++ b/src/libsigrok-internal.h @@ -1031,8 +1031,8 @@ SR_PRIV int std_serial_dev_acquisition_stop(struct sr_dev_inst *sdi); SR_PRIV int std_session_send_df_header(const struct sr_dev_inst *sdi); SR_PRIV int std_session_send_df_end(const struct sr_dev_inst *sdi); SR_PRIV int std_session_send_df_trigger(const struct sr_dev_inst *sdi); -SR_PRIV int std_session_send_frame_begin(const struct sr_dev_inst *sdi); -SR_PRIV int std_session_send_frame_end(const struct sr_dev_inst *sdi); +SR_PRIV int std_session_send_df_frame_begin(const struct sr_dev_inst *sdi); +SR_PRIV int std_session_send_df_frame_end(const struct sr_dev_inst *sdi); SR_PRIV int std_dev_clear_with_callback(const struct sr_dev_driver *driver, std_dev_clear_callback clear_private); SR_PRIV int std_dev_clear(const struct sr_dev_driver *driver); diff --git a/src/std.c b/src/std.c index 9766875c..d3a3d36d 100644 --- a/src/std.c +++ b/src/std.c @@ -263,7 +263,7 @@ SR_PRIV int std_session_send_df_trigger(const struct sr_dev_inst *sdi) * @retval SR_ERR_ARG Invalid argument. * @retval other Other error. */ -SR_PRIV int std_session_send_frame_begin(const struct sr_dev_inst *sdi) +SR_PRIV int std_session_send_df_frame_begin(const struct sr_dev_inst *sdi) { return send_df_without_payload(sdi, SR_DF_FRAME_BEGIN); } @@ -279,7 +279,7 @@ SR_PRIV int std_session_send_frame_begin(const struct sr_dev_inst *sdi) * @retval SR_ERR_ARG Invalid argument. * @retval other Other error. */ -SR_PRIV int std_session_send_frame_end(const struct sr_dev_inst *sdi) +SR_PRIV int std_session_send_df_frame_end(const struct sr_dev_inst *sdi) { return send_df_without_payload(sdi, SR_DF_FRAME_END); }