uint8_t divcount;
};
-/* This will be initialized via hw_get_device_info()/SR_DI_SAMPLERATES. */
+/* This will be initialized via hw_get_dev_info()/SR_DI_SAMPLERATES. */
static uint64_t supported_samplerates[255 + 1] = { 0 };
/*
/* Function prototypes. */
static int la8_close_usb_reset_sequencer(struct la8 *la8);
-static int hw_stop_acquisition(int device_index, gpointer session_data);
+static int hw_stop_acquisition(int dev_index, gpointer session_data);
static int la8_reset(struct la8 *la8);
static void fill_supported_samplerates_if_needed(void)
return SR_OK;
}
-static int hw_init(const char *deviceinfo)
+static int hw_init(const char *devinfo)
{
int ret;
struct sr_dev_inst *sdi;
struct la8 *la8;
/* Avoid compiler errors. */
- (void)deviceinfo;
+ (void)devinfo;
/* Allocate memory for our private driver context. */
if (!(la8 = g_try_malloc(sizeof(struct la8)))) {
return 0;
}
-static int hw_opendev(int device_index)
+static int hw_opendev(int dev_index)
{
int ret;
struct sr_dev_inst *sdi;
struct la8 *la8;
- if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
sr_err("la8: %s: sdi was NULL", __func__);
return SR_ERR; /* TODO: SR_ERR_ARG? */
}
return SR_OK;
}
-static int hw_closedev(int device_index)
+static int hw_closedev(int dev_index)
{
struct sr_dev_inst *sdi;
struct la8 *la8;
- if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
sr_err("la8: %s: sdi was NULL", __func__);
return SR_ERR; /* TODO: SR_ERR_ARG? */
}
return ret;
}
-static void *hw_get_device_info(int device_index, int device_info_id)
+static void *hw_get_dev_info(int dev_index, int dev_info_id)
{
struct sr_dev_inst *sdi;
struct la8 *la8;
sr_spew("la8: entering %s", __func__);
- if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
sr_err("la8: %s: sdi was NULL", __func__);
return NULL;
}
return NULL;
}
- switch (device_info_id) {
+ switch (dev_info_id) {
case SR_DI_INSTANCE:
info = sdi;
break;
return info;
}
-static int hw_get_status(int device_index)
+static int hw_get_status(int dev_index)
{
struct sr_dev_inst *sdi;
- if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
sr_err("la8: %s: sdi was NULL, device not found", __func__);
return SR_ST_NOT_FOUND;
}
return capabilities;
}
-static int hw_set_configuration(int device_index, int capability, void *value)
+static int hw_set_configuration(int dev_index, int capability, void *value)
{
struct sr_dev_inst *sdi;
struct la8 *la8;
sr_spew("la8: entering %s", __func__);
- if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
sr_err("la8: %s: sdi was NULL", __func__);
return SR_ERR; /* TODO: SR_ERR_ARG? */
}
return TRUE;
}
-static int hw_start_acquisition(int device_index, gpointer session_data)
+static int hw_start_acquisition(int dev_index, gpointer session_data)
{
struct sr_dev_inst *sdi;
struct la8 *la8;
sr_spew("la8: entering %s", __func__);
- if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
sr_err("la8: %s: sdi was NULL", __func__);
return SR_ERR; /* TODO: SR_ERR_ARG? */
}
return SR_OK;
}
-static int hw_stop_acquisition(int device_index, gpointer session_data)
+static int hw_stop_acquisition(int dev_index, gpointer session_data)
{
struct sr_dev_inst *sdi;
struct la8 *la8;
sr_dbg("la8: stopping acquisition");
- if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
sr_err("la8: %s: sdi was NULL", __func__);
return SR_ERR_BUG;
}
return SR_OK;
}
-SR_PRIV struct sr_device_plugin chronovu_la8_plugin_info = {
+SR_PRIV struct sr_dev_plugin chronovu_la8_plugin_info = {
.name = "chronovu-la8",
.longname = "ChronoVu LA8",
.api_version = 1,
.cleanup = hw_cleanup,
.opendev = hw_opendev,
.closedev = hw_closedev,
- .get_device_info = hw_get_device_info,
+ .get_dev_info = hw_get_dev_info,
.get_status = hw_get_status,
.get_capabilities = hw_get_capabilities,
.set_configuration = hw_set_configuration,