X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Flecroy-logicstudio%2Fprotocol.c;h=11d3ce2c201cb2100f65b3bd06c5603f9623c59b;hb=3be42bc22f8b36599a448273c12a76d3e0f7a940;hp=ef390ebce157ba66400bc078512b60415e71b955;hpb=c7b17bcba3751c7849229089cce8773bb4355be7;p=libsigrok.git diff --git a/src/hardware/lecroy-logicstudio/protocol.c b/src/hardware/lecroy-logicstudio/protocol.c index ef390ebc..11d3ce2c 100644 --- a/src/hardware/lecroy-logicstudio/protocol.c +++ b/src/hardware/lecroy-logicstudio/protocol.c @@ -114,8 +114,8 @@ struct regval { uint16_t val; }; -static void handle_fetch_samples_done(struct libusb_transfer *xfer); -static void recv_bulk_transfer(struct libusb_transfer *xfer); +static void LIBUSB_CALL handle_fetch_samples_done(struct libusb_transfer *xfer); +static void LIBUSB_CALL recv_bulk_transfer(struct libusb_transfer *xfer); static const struct samplerate_info samplerates[] = { { SR_GHZ(1), -24, 0x1f }, @@ -241,7 +241,7 @@ static void prep_regw(struct regval *regval, uint8_t reg, uint16_t val) regval->val = val; } -static void handle_fetch_samples_done(struct libusb_transfer *xfer) +static void LIBUSB_CALL handle_fetch_samples_done(struct libusb_transfer *xfer) { const struct sr_dev_inst *sdi; struct sr_usb_dev_inst *usb; @@ -907,20 +907,18 @@ SR_PRIV int lls_setup_acquisition(const struct sr_dev_inst *sdi) return SR_OK; } -static void recv_intr_transfer(struct libusb_transfer *xfer) +static void LIBUSB_CALL recv_intr_transfer(struct libusb_transfer *xfer) { const struct sr_dev_inst *sdi; struct drv_context *drvc; struct dev_context *devc; - struct sr_datafeed_packet packet; sdi = xfer->user_data; drvc = sdi->driver->context; devc = sdi->priv; if (devc->abort_acquisition) { - packet.type = SR_DF_END; - sr_session_send(sdi, &packet); + std_session_send_df_end(sdi, LOG_PREFIX); usb_source_remove(sdi->session, drvc->sr_ctx); return; } @@ -1000,7 +998,7 @@ static uint16_t sample_to_byte_offset(struct dev_context *devc, uint64_t o) return o * devc->num_enabled_channel_groups; } -static void recv_bulk_transfer(struct libusb_transfer *xfer) +static void LIBUSB_CALL recv_bulk_transfer(struct libusb_transfer *xfer) { const struct sr_dev_inst *sdi; struct dev_context *devc; @@ -1091,8 +1089,7 @@ static void recv_bulk_transfer(struct libusb_transfer *xfer) read_offset %= SAMPLE_BUF_SIZE; } - packet.type = SR_DF_END; - sr_session_send(sdi, &packet); + std_session_send_df_end(sdi, LOG_PREFIX); } static uint32_t transform_sample_count(struct dev_context *devc,