It's obsolete: no frontend ever used it, and neither did libsigrok.
The sdi->status field is only used internally by some drivers, and
should probably be moved to the driver-specific context structs.
return SR_OK;
}
-static int hw_dev_status_get(int dev_index)
-{
- struct sr_dev_inst *sdi;
-
- sdi = sr_dev_inst_get(adi->instances, dev_index);
- if (sdi)
- return sdi->status;
- else
- return SR_ST_NOT_FOUND;
-}
-
static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap,
const void *value)
{
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.info_get = hw_info_get,
- .dev_status_get = hw_dev_status_get,
.dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
return SR_OK;
}
-static int hw_dev_status_get(int dev_index)
-{
- struct sr_dev_inst *sdi;
-
- if (!(sdi = sr_dev_inst_get(cdi->instances, dev_index))) {
- sr_err("la8: %s: sdi was NULL, device not found", __func__);
- return SR_ST_NOT_FOUND;
- }
-
- sr_dbg("la8: Returning status: %d.", sdi->status);
-
- return sdi->status;
-}
-
static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap,
const void *value)
{
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.info_get = hw_info_get,
- .dev_status_get = hw_dev_status_get,
.dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
return SR_OK;
}
-static int hw_dev_status_get(int dev_index)
-{
- /* Avoid compiler warnings. */
- (void)dev_index;
-
- return SR_ST_ACTIVE;
-}
-
static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap,
const void *value)
{
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.info_get = hw_info_get,
- .dev_status_get = hw_dev_status_get,
.dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
return SR_OK;
}
-static int hw_dev_status_get(int dev_index)
-{
- const struct sr_dev_inst *const sdi =
- sr_dev_inst_get(fdi->instances, dev_index);
-
- if (!sdi)
- return SR_ST_NOT_FOUND;
-
- return sdi->status;
-}
-
static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap,
const void *value)
{
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.info_get = hw_info_get,
- .dev_status_get = hw_dev_status_get,
.dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
return SR_OK;
}
-static int hw_dev_status_get(int dev_index)
-{
- struct sr_dev_inst *sdi;
-
- if (!(sdi = sr_dev_inst_get(gdi->instances, dev_index))) {
- sr_err("genericdmm: sdi was NULL, device not found.");
- return SR_ST_NOT_FOUND;
- }
-
- sr_dbg("genericdmm: Returning status: %d.", sdi->status);
-
- return sdi->status;
-}
-
static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap,
const void *value)
{
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.info_get = hw_info_get,
- .dev_status_get = hw_dev_status_get,
.dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
return SR_OK;
}
-static int hw_dev_status_get(int dev_index)
-{
- struct sr_dev_inst *sdi;
-
- if (!(sdi = sr_dev_inst_get(hdi->instances, dev_index)))
- return SR_ST_NOT_FOUND;
-
- return sdi->status;
-}
-
static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap,
const void *value)
{
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.info_get = hw_info_get,
- .dev_status_get = hw_dev_status_get,
.dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
return SR_OK;
}
-static int hw_dev_status_get(int dev_index)
-{
- struct sr_dev_inst *sdi;
-
- if (!(sdi = sr_dev_inst_get(odi->instances, dev_index)))
- return SR_ST_NOT_FOUND;
-
- return sdi->status;
-}
-
static int set_samplerate(const struct sr_dev_inst *sdi, uint64_t samplerate)
{
struct context *ctx;
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.info_get = hw_info_get,
- .dev_status_get = hw_dev_status_get,
.dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
return SR_OK;
}
-static int hw_dev_status_get(int dev_index)
-{
- struct sr_dev_inst *sdi;
-
- sdi = sr_dev_inst_get(zdi->instances, dev_index);
- if (sdi)
- return sdi->status;
- else
- return SR_ST_NOT_FOUND;
-}
-
static int set_samplerate(const struct sr_dev_inst *sdi, uint64_t samplerate)
{
struct context *ctx;
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.info_get = hw_info_get,
- .dev_status_get = hw_dev_status_get,
.dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
int (*dev_close) (struct sr_dev_inst *sdi);
/* TODO remove this */
const void *(*dev_info_get) (int dev_index, int dev_info_id);
- int (*info_get) (int dev_info_id, const void **data,
+ int (*info_get) (int info_id, const void **data,
const struct sr_dev_inst *sdi);
- int (*dev_status_get) (int dev_index);
int (*dev_config_set) (const struct sr_dev_inst *sdi, int hwcap,
const void *value);
int (*dev_acquisition_start) (const struct sr_dev_inst *sdi,