return SR_OK;
}
-static void hw_stop_acquisition(int device_index, gpointer session_device_id)
+static int hw_stop_acquisition(int device_index, gpointer session_device_id)
{
/* Avoid compiler warnings. */
device_index = device_index;
session_device_id = session_device_id;
+
+ return SR_OK;
}
SR_PRIV struct sr_device_plugin alsa_plugin_info = {
"asix-sigma-phasor.fw", /* Frequency counter */
};
-static void hw_stop_acquisition(int device_index, gpointer session_data);
+static int hw_stop_acquisition(int device_index, gpointer session_data);
static int sigma_read(void *buf, size_t size, struct sigma *sigma)
{
return SR_OK;
}
-static void hw_stop_acquisition(int device_index, gpointer session_data)
+static int hw_stop_acquisition(int device_index, gpointer session_data)
{
struct sr_device_instance *sdi;
struct sigma *sigma;
uint8_t modestatus;
- if (!(sdi = sr_get_device_instance(device_instances, device_index)))
- return;
-
- sigma = sdi->priv;
-
/* Avoid compiler warnings. */
(void)session_data;
+ if (!(sdi = sr_get_device_instance(device_instances, device_index))) {
+ sr_err("asix: %s: sdi was NULL", __func__);
+ return SR_ERR_BUG;
+ }
+
+ if (!(sigma = sdi->priv)) {
+ sr_err("asix: %s: sdi->priv was NULL", __func__);
+ return SR_ERR_BUG;
+ }
+
/* Stop acquisition. */
sigma_set_register(WRITE_MODE, 0x11, sigma);
/* Check if trigger has fired. */
modestatus = sigma_get_register(READ_MODE, sigma);
- if (modestatus & 0x20) {
+ if (modestatus & 0x20)
sigma->state.triggerchunk = sigma->state.triggerpos / 512;
-
- } else
+ else
sigma->state.triggerchunk = -1;
sigma->state.chunks_downloaded = 0;
sigma->state.state = SIGMA_DOWNLOAD;
+
+ return SR_OK;
}
SR_PRIV struct sr_device_plugin asix_sigma_plugin_info = {
/* Function prototypes. */
static int la8_close_usb_reset_sequencer(struct la8 *la8);
-static void hw_stop_acquisition(int device_index, gpointer session_data);
+static int hw_stop_acquisition(int device_index, gpointer session_data);
static int la8_reset(struct la8 *la8);
static void fill_supported_samplerates_if_needed(void)
return SR_OK;
}
-static void hw_stop_acquisition(int device_index, gpointer session_data)
+static int hw_stop_acquisition(int device_index, gpointer session_data)
{
struct sr_device_instance *sdi;
struct la8 *la8;
if (!(sdi = sr_get_device_instance(device_instances, device_index))) {
sr_err("la8: %s: sdi was NULL", __func__);
- return;
+ return SR_ERR_BUG;
}
if (!(la8 = sdi->priv)) {
sr_err("la8: %s: sdi->priv was NULL", __func__);
- return;
+ return SR_ERR_BUG;
}
/* Send end packet to the session bus. */
sr_dbg("la8: %s: sending SR_DF_END", __func__);
packet.type = SR_DF_END;
sr_session_bus(session_data, &packet);
+
+ return SR_OK;
}
SR_PRIV struct sr_device_plugin chronovu_la8_plugin_info = {
static GThread *my_thread;
static int thread_running;
-static void hw_stop_acquisition(int device_index, gpointer session_data);
+static int hw_stop_acquisition(int device_index, gpointer session_data);
static int hw_init(const char *deviceinfo)
{
return SR_OK;
}
-static void hw_stop_acquisition(int device_index, gpointer session_data)
+static int hw_stop_acquisition(int device_index, gpointer session_data)
{
/* Avoid compiler warnings. */
(void)device_index;
/* Stop generate thread. */
thread_running = 0;
+
+ return SR_OK;
}
SR_PRIV struct sr_device_plugin demo_plugin_info = {
}
/* FIXME */
-static void hw_stop_acquisition(int device_index, gpointer session_device_id)
+static int hw_stop_acquisition(int device_index, gpointer session_device_id)
{
struct sr_datafeed_packet packet;
packet.type = SR_DF_END;
sr_session_bus(session_device_id, &packet);
+
+ return SR_OK;
}
SR_PRIV struct sr_device_plugin link_mso19_plugin_info = {
return SR_OK;
}
-static void hw_stop_acquisition(int device_index, gpointer session_device_id)
+static int hw_stop_acquisition(int device_index, gpointer session_device_id)
{
struct sr_datafeed_packet packet;
packet.type = SR_DF_END;
sr_session_bus(session_device_id, &packet);
+
+ return SR_OK;
}
SR_PRIV struct sr_device_plugin ols_plugin_info = {
static int new_saleae_logic_firmware = 0;
static int hw_set_configuration(int device_index, int capability, void *value);
-static void hw_stop_acquisition(int device_index, gpointer session_device_id);
+static int hw_stop_acquisition(int device_index, gpointer session_device_id);
/**
* Check the USB configuration to determine if this is a Saleae Logic.
}
/* This stops acquisition on ALL devices, ignoring device_index. */
-static void hw_stop_acquisition(int device_index, gpointer session_data)
+static int hw_stop_acquisition(int device_index, gpointer session_data)
{
struct sr_datafeed_packet packet;
receive_transfer(NULL);
/* TODO: Need to cancel and free any queued up transfers. */
+
+ return SR_OK;
}
SR_PRIV struct sr_device_plugin saleae_logic_plugin_info = {
}
/* This stops acquisition on ALL devices, ignoring device_index. */
-static void hw_stop_acquisition(int device_index, gpointer session_device_id)
+static int hw_stop_acquisition(int device_index, gpointer session_device_id)
{
struct sr_datafeed_packet packet;
struct sr_device_instance *sdi;
if (!(sdi = sr_get_device_instance(device_instances, device_index))) {
sr_err("zp: %s: sdi was NULL", __func__);
- return; /* FIXME */
+ return SR_ERR_BUG;
}
if (!(zp = sdi->priv)) {
sr_err("zp: %s: sdi->priv was NULL", __func__);
- return; /* FIXME */
+ return SR_ERR_BUG;
}
analyzer_reset(zp->usb->devhdl);
/* TODO: Need to cancel and free any queued up transfers. */
+
+ return SR_OK;
}
SR_PRIV struct sr_device_plugin zeroplus_logic_cube_plugin_info = {
int *(*get_capabilities) (void);
int (*set_configuration) (int device_index, int capability, void *value);
int (*start_acquisition) (int device_index, gpointer session_device_id);
- void (*stop_acquisition) (int device_index, gpointer session_device_id);
+ int (*stop_acquisition) (int device_index, gpointer session_device_id);
};
struct sr_session {