/*
* 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"
return SR_ERR;
}
fx2->cur_samplerate = samplerate;
- fx2->period_ps = 1000000000000 / samplerate;
return SR_OK;
}
* 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);
* 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;
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;
/* 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,