]> sigrok.org Git - libsigrok.git/blobdiff - hardware/saleae-logic/saleae-logic.c
sr/cli/gtk: Remove analog left-overs from API.
[libsigrok.git] / hardware / saleae-logic / saleae-logic.c
index 27938a51bc18623efa3caa25d1f8b0feb5771c58..09a37cb29caa63dae0e0a98ae850c17c920f60ae 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the sigrok project.
  *
- * Copyright (C) 2010 Bert Vermeulen <bert@biot.com>
+ * Copyright (C) 2012 Bert Vermeulen <bert@biot.com>
  *
  * 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
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/time.h>
 #include <inttypes.h>
 #include <glib.h>
 #include <libusb.h>
+#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,