- struct sr_dev_inst *sdi;
- const void *info;
- uint64_t tmp;
-
- if (!(sdi = sr_dev_inst_get(hdi->instances, dev_index)))
- return NULL;
-
- info = NULL;
- switch (dev_info_id) {
- case SR_DI_INST:
- info = sdi;
- break;
- case SR_DI_NUM_PROBES:
- info = GINT_TO_POINTER(NUM_PROBES);
- break;
- case SR_DI_PROBE_NAMES:
- info = probe_names;
- break;
- case SR_DI_BUFFERSIZES:
- info = buffersizes;
- break;
- case SR_DI_TIMEBASES:
- info = timebases;
- break;
- case SR_DI_TRIGGER_SOURCES:
- info = trigger_sources;
- break;
- case SR_DI_FILTERS:
- info = filter_targets;
- break;
- case SR_DI_VDIVS:
- info = vdivs;
- break;
- case SR_DI_COUPLING:
- info = coupling;
- break;
- /* TODO remove this */
- case SR_DI_CUR_SAMPLERATE:
- info = &tmp;
- break;
- }
-
- return info;
-}
-
-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 const int *hw_hwcap_get_all(void)
-{
- return hwcaps;
-}
-
-static int hw_dev_config_set(int dev_index, int hwcap, const void *value)
-{
- struct sr_dev_inst *sdi;
- struct context *ctx;