- bool supported_device = false;
- if ((sr_config_list(drivers[i], NULL, NULL,
- SR_CONF_DEVICE_OPTIONS, &gvar_opts) == SR_OK)) {
- hwopts = (const int32_t *)g_variant_get_fixed_array(gvar_opts,
- &num_opts, sizeof(int32_t));
- for (unsigned int j = 0; j < num_opts; j++)
- if (hwopts[j] == SR_CONF_SAMPLERATE) {
- supported_device = true;
- break;
- }
- }
+ const auto keys = driver->config_keys();
+
+ bool supported_device = keys.count(ConfigKey::LOGIC_ANALYZER) |
+ keys.count(ConfigKey::OSCILLOSCOPE);