X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fhantek-dso%2Fapi.c;h=ebcc0f253fbc23016f70b506725fd30047c4d8e3;hb=4afdfd4628e9955af02a3ea619ecdfe469f9a9e2;hp=97742ffe88a4a8bb225a2449e016162bbbcd9b4c;hpb=063e7aef6d41d4c44591ff93672079998bf9622f;p=libsigrok.git diff --git a/hardware/hantek-dso/api.c b/hardware/hantek-dso/api.c index 97742ffe..ebcc0f25 100644 --- a/hardware/hantek-dso/api.c +++ b/hardware/hantek-dso/api.c @@ -341,11 +341,7 @@ static GSList *hw_scan(GSList *options) static GSList *hw_dev_list(void) { - struct drv_context *drvc; - - drvc = di->priv; - - return drvc->instances; + return ((struct drv_context *)(di->priv))->instances; } static int hw_dev_open(struct sr_dev_inst *sdi) @@ -834,8 +830,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) { const struct libusb_pollfd **lupfd; - struct sr_datafeed_packet packet; - struct sr_datafeed_header header; struct dev_context *devc; struct drv_context *drvc = di->priv; int i; @@ -865,11 +859,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, free(lupfd); /* Send header packet to the session bus. */ - packet.type = SR_DF_HEADER; - packet.payload = (unsigned char *)&header; - header.feed_version = 1; - gettimeofday(&header.starttime, NULL); - sr_session_send(cb_data, &packet); + std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN); return SR_OK; }