X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhantek-dso%2Fapi.c;h=b0726e98c86f62ca653a27d388ab9f2ec46176fa;hb=4704f64551dd917c2616b4162e7e816fb57113da;hp=c1b18ea9ca660a52ec8b2e4113d637b3b8a1e88c;hpb=1372bdcdb56704c5aed01603c14b7b051af5f65e;p=libsigrok.git diff --git a/src/hardware/hantek-dso/api.c b/src/hardware/hantek-dso/api.c index c1b18ea9..b0726e98 100644 --- a/src/hardware/hantek-dso/api.c +++ b/src/hardware/hantek-dso/api.c @@ -704,7 +704,6 @@ static void send_chunk(struct sr_dev_inst *sdi, unsigned char *buf, */ static void LIBUSB_CALL receive_transfer(struct libusb_transfer *transfer) { - struct sr_datafeed_packet packet; struct sr_dev_inst *sdi; struct dev_context *devc; int num_samples, pre; @@ -782,8 +781,7 @@ static void LIBUSB_CALL receive_transfer(struct libusb_transfer *transfer) devc->framebuf = NULL; /* Mark the end of this frame. */ - packet.type = SR_DF_FRAME_END; - sr_session_send(sdi, &packet); + std_session_send_df_frame_end(sdi); if (devc->limit_frames && ++devc->num_frames >= devc->limit_frames) { /* Terminate session */ @@ -797,7 +795,6 @@ static void LIBUSB_CALL receive_transfer(struct libusb_transfer *transfer) static int handle_event(int fd, int revents, void *cb_data) { const struct sr_dev_inst *sdi; - struct sr_datafeed_packet packet; struct timeval tv; struct sr_dev_driver *di; struct dev_context *devc; @@ -889,8 +886,7 @@ static int handle_event(int fd, int revents, void *cb_data) devc->dev_state = FETCH_DATA; /* Tell the frontend a new frame is on the way. */ - packet.type = SR_DF_FRAME_BEGIN; - sr_session_send(sdi, &packet); + std_session_send_df_frame_begin(sdi); break; case CAPTURE_READY_9BIT: /* TODO */