X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhung-chang-dso-2100%2Fprotocol.c;h=92d52c35e9a26d11401f330847f6310eb7bacd95;hb=8e79890770696e0bdf83ee617ab08996328b2058;hp=3df5b3f291a2422ad1ddcd3996275b43358f8907;hpb=0fa71943e34fbd427928eef13742958ec7e30834;p=libsigrok.git diff --git a/src/hardware/hung-chang-dso-2100/protocol.c b/src/hardware/hung-chang-dso-2100/protocol.c index 3df5b3f2..92d52c35 100644 --- a/src/hardware/hung-chang-dso-2100/protocol.c +++ b/src/hardware/hung-chang-dso-2100/protocol.c @@ -415,7 +415,6 @@ static int read_subframe(const struct sr_dev_inst *sdi, uint8_t *buf) SR_PRIV int hung_chang_dso_2100_poll(int fd, int revents, void *cb_data) { - struct sr_datafeed_packet packet = { .type = SR_DF_FRAME_BEGIN }; struct sr_dev_inst *sdi; struct dev_context *devc; uint8_t state, buf[1000]; @@ -443,7 +442,7 @@ SR_PRIV int hung_chang_dso_2100_poll(int fd, int revents, void *cb_data) return FALSE; } - sr_session_send(sdi, &packet); + std_session_send_df_frame_begin(sdi); if (devc->channel) { while (read_subframe(sdi, buf)) { @@ -456,8 +455,7 @@ SR_PRIV int hung_chang_dso_2100_poll(int fd, int revents, void *cb_data) } } - packet.type = SR_DF_FRAME_END; - sr_session_send(sdi, &packet); + std_session_send_df_frame_end(sdi); if (++devc->frame >= devc->frame_limit) sr_dev_acquisition_stop(sdi);