None of the driver config_get/set/list calls are required.
sr_err("No dev_close in driver %d ('%s').", i, d);
errors++;
}
- if (!drivers[i]->config_get) {
- sr_err("No config_get in driver %d ('%s').", i, d);
- errors++;
- }
- if (!drivers[i]->config_set) {
- sr_err("No config_set in driver %d ('%s').", i, d);
- errors++;
- }
if (!drivers[i]->dev_acquisition_start) {
sr_err("No dev_acquisition_start in driver %d ('%s').",
i, d);
return SR_OK;
}
-static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- switch (id) {
- default:
- return SR_ERR_ARG;
- }
-
- return SR_OK;
-}
-
static int config_set(int id, const void *value, const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
- .config_get = config_get,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
return SR_OK;
}
-static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- switch (id) {
- default:
- return SR_ERR_ARG;
- }
-
- return SR_OK;
-}
-
static int config_set(int id, const void *value, const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
- .config_get = config_get,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
return SR_OK;
}
-static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- switch (id) {
- default:
- return SR_ERR_ARG;
- }
-
- return SR_OK;
-}
-
static int config_set(int id, const void *value, const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
- .config_get = config_get,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
return SR_OK;
}
-static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
-{
- uint64_t tmp;
-
- (void)sdi;
-
- switch (id) {
- /* TODO remove this */
- case SR_CONF_SAMPLERATE:
- *data = &tmp;
- break;
- default:
- return SR_ERR_ARG;
- }
-
- return SR_OK;
-}
-
static int config_set(int id, const void *value, const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
- .config_get = config_get,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
return SR_OK;
}
-static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- switch (id) {
- default:
- return SR_ERR_ARG;
- }
-
- return SR_OK;
-}
-
static int config_set(int id, const void *value, const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
- .config_get = config_get,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
return SR_OK;
}
-static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
-{
- /* TODO */
- (void)data;
- (void)sdi;
-
- switch (id) {
- default:
- return SR_ERR_ARG;
- }
-
- return SR_OK;
-}
-
static int config_set(int id, const void *value, const struct sr_dev_inst *sdi)
{
int ret;
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
- .config_get = config_get,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
return SR_OK;
}
-static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- switch (id) {
- default:
- return SR_ERR_ARG;
- }
-
- return SR_OK;
-}
-
static int config_set(int id, const void *value, const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
- .config_get = config_get,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
return SR_OK;
}
-static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- switch (id) {
- default:
- return SR_ERR_ARG;
- }
-
- return SR_OK;
-}
-
static int config_set(int id, const void *value, const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
.scan = hw_scan_##ID_UPPER, \
.dev_list = hw_dev_list_##ID_UPPER, \
.dev_clear = clear_instances_##ID_UPPER, \
- .config_get = config_get, \
.config_set = config_set, \
.config_list = config_list, \
.dev_open = hw_dev_open, \
return SR_OK;
}
-static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- switch (id) {
- default:
- return SR_ERR_ARG;
- }
-
- return SR_OK;
-}
-
static int config_set(int id, const void *value, const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
- .config_get = config_get,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
return SR_OK;
}
-static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- sr_spew("Backend requested info_id %d.", id);
-
- switch (id) {
- case SR_CONF_SAMPLERATE:
- /* TODO: Get rid of this. */
- *data = NULL;
- sr_spew("%s: Returning current samplerate.", __func__);
- return SR_ERR_ARG;
- break;
- default:
- return SR_ERR_ARG;
- break;
- }
-
- return SR_OK;
-}
-
static int config_set(int id, const void *value, const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
- .config_get = config_get,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
- .config_get = config_get,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
return SR_OK;
}
-static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- switch (id) {
- default:
- return SR_ERR_ARG;
- }
-
- return SR_OK;
-}
-
static int config_set(int id, const void *value, const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
- .config_get = config_get,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,