return TRUE;
}
-static int hw_start_acquisition(int dev_index, gpointer session_dev_id)
+static int hw_acquisition_start(int dev_index, gpointer session_dev_id)
{
struct sr_dev_inst *sdi;
struct alsa *alsa;
return SR_OK;
}
-static int hw_stop_acquisition(int dev_index, gpointer session_dev_id)
+static int hw_acquisition_stop(int dev_index, gpointer session_dev_id)
{
/* Avoid compiler warnings. */
dev_index = dev_index;
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,
- .start_acquisition = hw_start_acquisition,
- .stop_acquisition = hw_stop_acquisition,
+ .acquisition_start = hw_acquisition_start,
+ .acquisition_stop = hw_acquisition_stop,
};
"asix-sigma-phasor.fw", /* Frequency counter */
};
-static int hw_stop_acquisition(int dev_index, gpointer session_data);
+static int hw_acquisition_stop(int dev_index, gpointer session_data);
static int sigma_read(void *buf, size_t size, struct sigma *sigma)
{
if (running_msec < sigma->limit_msec && numchunks < 32767)
return FALSE;
- hw_stop_acquisition(sdi->index, session_data);
+ hw_acquisition_stop(sdi->index, session_data);
return FALSE;
return SR_OK;
}
-static int hw_start_acquisition(int dev_index, gpointer session_data)
+static int hw_acquisition_start(int dev_index, gpointer session_data)
{
struct sr_dev_inst *sdi;
struct sigma *sigma;
return SR_OK;
}
-static int hw_stop_acquisition(int dev_index, gpointer session_data)
+static int hw_acquisition_stop(int dev_index, gpointer session_data)
{
struct sr_dev_inst *sdi;
struct sigma *sigma;
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,
- .start_acquisition = hw_start_acquisition,
- .stop_acquisition = hw_stop_acquisition,
+ .acquisition_start = hw_acquisition_start,
+ .acquisition_stop = hw_acquisition_stop,
};
/* Function prototypes. */
static int la8_close_usb_reset_sequencer(struct la8 *la8);
-static int hw_stop_acquisition(int dev_index, gpointer session_data);
+static int hw_acquisition_stop(int dev_index, gpointer session_data);
static int la8_reset(struct la8 *la8);
static void fill_supported_samplerates_if_needed(void)
/* Get one block of data. */
if ((ret = la8_read_block(la8)) < 0) {
sr_err("la8: %s: la8_read_block error: %d", __func__, ret);
- hw_stop_acquisition(sdi->index, session_data);
+ hw_acquisition_stop(sdi->index, session_data);
return FALSE;
}
for (i = 0; i < NUM_BLOCKS; i++)
send_block_to_session_bus(la8, i);
- hw_stop_acquisition(sdi->index, session_data);
+ hw_acquisition_stop(sdi->index, session_data);
// return FALSE; /* FIXME? */
return TRUE;
}
-static int hw_start_acquisition(int dev_index, gpointer session_data)
+static int hw_acquisition_start(int dev_index, gpointer session_data)
{
struct sr_dev_inst *sdi;
struct la8 *la8;
return SR_OK;
}
-static int hw_stop_acquisition(int dev_index, gpointer session_data)
+static int hw_acquisition_stop(int dev_index, gpointer session_data)
{
struct sr_dev_inst *sdi;
struct la8 *la8;
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,
- .start_acquisition = hw_start_acquisition,
- .stop_acquisition = hw_stop_acquisition,
+ .acquisition_start = hw_acquisition_start,
+ .acquisition_stop = hw_acquisition_stop,
};
static GThread *my_thread;
static int thread_running;
-static int hw_stop_acquisition(int dev_index, gpointer session_data);
+static int hw_acquisition_stop(int dev_index, gpointer session_data);
static int hw_init(const char *devinfo)
{
return TRUE;
}
-static int hw_start_acquisition(int dev_index, gpointer session_data)
+static int hw_acquisition_start(int dev_index, gpointer session_data)
{
struct sr_datafeed_packet *packet;
struct sr_datafeed_header *header;
return SR_OK;
}
-static int hw_stop_acquisition(int dev_index, gpointer session_data)
+static int hw_acquisition_stop(int dev_index, gpointer session_data)
{
/* Avoid compiler warnings. */
(void)dev_index;
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,
- .start_acquisition = hw_start_acquisition,
- .stop_acquisition = hw_stop_acquisition,
+ .acquisition_start = hw_acquisition_start,
+ .acquisition_stop = hw_acquisition_stop,
};
return TRUE;
}
-static int hw_start_acquisition(int dev_index, gpointer session_dev_id)
+static int hw_acquisition_start(int dev_index, gpointer session_dev_id)
{
struct sr_dev_inst *sdi;
struct mso *mso;
}
/* FIXME */
-static int hw_stop_acquisition(int dev_index, gpointer session_dev_id)
+static int hw_acquisition_stop(int dev_index, gpointer session_dev_id)
{
struct sr_datafeed_packet packet;
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,
- .start_acquisition = hw_start_acquisition,
- .stop_acquisition = hw_stop_acquisition,
+ .acquisition_start = hw_acquisition_start,
+ .acquisition_stop = hw_acquisition_stop,
};
return TRUE;
}
-static int hw_start_acquisition(int dev_index, gpointer session_data)
+static int hw_acquisition_start(int dev_index, gpointer session_data)
{
struct sr_datafeed_packet *packet;
struct sr_datafeed_header *header;
return SR_OK;
}
-static int hw_stop_acquisition(int dev_index, gpointer session_dev_id)
+static int hw_acquisition_stop(int dev_index, gpointer session_dev_id)
{
struct sr_datafeed_packet packet;
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,
- .start_acquisition = hw_start_acquisition,
- .stop_acquisition = hw_stop_acquisition,
+ .acquisition_start = hw_acquisition_start,
+ .acquisition_stop = hw_acquisition_stop,
};
static int new_saleae_logic_firmware = 0;
static int hw_config_set(int dev_index, int hwcap, void *value);
-static int hw_stop_acquisition(int dev_index, gpointer session_dev_id);
+static int hw_acquisition_stop(int dev_index, gpointer session_dev_id);
/**
* Check the USB configuration to determine if this is a Saleae Logic.
int cur_buflen, trigger_offset, i;
unsigned char *cur_buf, *new_buf;
- /* hw_stop_acquisition() is telling us to stop. */
+ /* hw_acquisition_stop() is telling us to stop. */
if (transfer == NULL)
num_samples = -1;
* The FX2 gave up. End the acquisition, the frontend
* will work out that the samplecount is short.
*/
- hw_stop_acquisition(-1, fx2->session_data);
+ hw_acquisition_stop(-1, fx2->session_data);
}
return;
} else {
num_samples += cur_buflen;
if (fx2->limit_samples && (unsigned int) num_samples > fx2->limit_samples) {
- hw_stop_acquisition(-1, fx2->session_data);
+ hw_acquisition_stop(-1, fx2->session_data);
}
} else {
/*
}
}
-static int hw_start_acquisition(int dev_index, gpointer session_data)
+static int hw_acquisition_start(int dev_index, gpointer session_data)
{
struct sr_dev_inst *sdi;
struct sr_datafeed_packet *packet;
}
/* This stops acquisition on ALL devices, ignoring dev_index. */
-static int hw_stop_acquisition(int dev_index, gpointer session_data)
+static int hw_acquisition_stop(int dev_index, gpointer session_data)
{
struct sr_datafeed_packet packet;
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,
- .start_acquisition = hw_start_acquisition,
- .stop_acquisition = hw_stop_acquisition,
+ .acquisition_start = hw_acquisition_start,
+ .acquisition_stop = hw_acquisition_stop,
};
}
}
-static int hw_start_acquisition(int dev_index, gpointer session_data)
+static int hw_acquisition_start(int dev_index, gpointer session_data)
{
struct sr_dev_inst *sdi;
struct sr_datafeed_packet packet;
}
/* This stops acquisition on ALL devices, ignoring dev_index. */
-static int hw_stop_acquisition(int dev_index, gpointer session_dev_id)
+static int hw_acquisition_stop(int dev_index, gpointer session_dev_id)
{
struct sr_datafeed_packet packet;
struct sr_dev_inst *sdi;
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,
- .start_acquisition = hw_start_acquisition,
- .stop_acquisition = hw_stop_acquisition,
+ .acquisition_start = hw_acquisition_start,
+ .acquisition_stop = hw_acquisition_stop,
};
for (l = session->devs; l; l = l->next) {
dev = l->data;
/* TODO: Check for dev != NULL. */
- if ((ret = dev->plugin->start_acquisition(
+ if ((ret = dev->plugin->acquisition_start(
dev->plugin_index, dev)) != SR_OK) {
sr_err("session: %s: could not start an acquisition "
"(%d)", __func__, ret);
dev = l->data;
/* Check for dev != NULL. */
if (dev->plugin) {
- if (dev->plugin->stop_acquisition)
- dev->plugin->stop_acquisition(dev->plugin_index, dev);
+ if (dev->plugin->acquisition_stop)
+ dev->plugin->acquisition_stop(dev->plugin_index, dev);
if (dev->plugin->cleanup)
dev->plugin->cleanup();
}
return SR_OK;
}
-static int hw_start_acquisition(int dev_index, gpointer session_dev_id)
+static int hw_acquisition_start(int dev_index, gpointer session_dev_id)
{
struct zip_stat zs;
struct session_vdev *vdev;
.get_status = hw_get_status,
.hwcap_get_all = hw_hwcap_get_all,
.config_set = hw_config_set,
- .start_acquisition = hw_start_acquisition,
- .stop_acquisition = NULL,
+ .acquisition_start = hw_acquisition_start,
+ .acquisition_stop = NULL,
};
int (*get_status) (int dev_index);
int *(*hwcap_get_all) (void);
int (*config_set) (int dev_index, int hwcap, void *value);
- int (*start_acquisition) (int dev_index, gpointer session_dev_id);
- int (*stop_acquisition) (int dev_index, gpointer session_dev_id);
+ int (*acquisition_start) (int dev_index, gpointer session_dev_id);
+ int (*acquisition_stop) (int dev_index, gpointer session_dev_id);
};
struct sr_session {