X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fsaleae-logic%2Fsaleae-logic.c;h=09a37cb29caa63dae0e0a98ae850c17c920f60ae;hb=5c64390e5ac8a0052d8b7eeb49c781d86027c814;hp=27938a51bc18623efa3caa25d1f8b0feb5771c58;hpb=69890f7399f086c38670961dc72166f00de89af6;p=libsigrok.git diff --git a/hardware/saleae-logic/saleae-logic.c b/hardware/saleae-logic/saleae-logic.c index 27938a51..09a37cb2 100644 --- a/hardware/saleae-logic/saleae-logic.c +++ b/hardware/saleae-logic/saleae-logic.c @@ -1,7 +1,7 @@ /* * This file is part of the sigrok project. * - * Copyright (C) 2010 Bert Vermeulen + * Copyright (C) 2012 Bert Vermeulen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,13 +17,13 @@ * along with this program. If not, see . */ -#include "config.h" #include #include #include #include #include #include +#include "config.h" #include "sigrok.h" #include "sigrok-internal.h" #include "saleae-logic.h" @@ -549,7 +549,6 @@ static int set_configuration_samplerate(struct sr_device_instance *sdi, return SR_ERR; } fx2->cur_samplerate = samplerate; - fx2->period_ps = 1000000000000 / samplerate; return SR_OK; } @@ -675,8 +674,6 @@ static void receive_transfer(struct libusb_transfer *transfer) * Tell the frontend we hit the trigger here. */ packet.type = SR_DF_TRIGGER; - packet.timeoffset = (num_samples + i) * fx2->period_ps; - packet.duration = 0; packet.payload = NULL; sr_session_bus(fx2->session_data, &packet); @@ -685,8 +682,6 @@ static void receive_transfer(struct libusb_transfer *transfer) * skipping past them. */ packet.type = SR_DF_LOGIC; - packet.timeoffset = (num_samples + i) * fx2->period_ps; - packet.duration = fx2->trigger_stage * fx2->period_ps; packet.payload = &logic; logic.length = fx2->trigger_stage; logic.unitsize = 1; @@ -719,8 +714,6 @@ static void receive_transfer(struct libusb_transfer *transfer) if (fx2->trigger_stage == TRIGGER_FIRED) { /* Send the incoming transfer to the session bus. */ packet.type = SR_DF_LOGIC; - packet.timeoffset = num_samples * fx2->period_ps; - packet.duration = cur_buflen * fx2->period_ps; packet.payload = &logic; logic.length = cur_buflen - trigger_offset; logic.unitsize = 1; @@ -798,7 +791,6 @@ static int hw_start_acquisition(int device_index, gpointer session_data) gettimeofday(&header->starttime, NULL); header->samplerate = fx2->cur_samplerate; header->num_logic_probes = fx2->profile->num_probes; - header->num_analog_probes = 0; sr_session_bus(session_data, packet); g_free(header); g_free(packet); @@ -822,7 +814,7 @@ static void hw_stop_acquisition(int device_index, gpointer session_data) /* TODO: Need to cancel and free any queued up transfers. */ } -struct sr_device_plugin saleae_logic_plugin_info = { +SR_PRIV struct sr_device_plugin saleae_logic_plugin_info = { .name = "saleae-logic", .longname = "Saleae Logic", .api_version = 1,