]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/gwinstek-gds-800/api.c
drivers: Add and use STD_CONFIG_LIST().
[libsigrok.git] / src / hardware / gwinstek-gds-800 / api.c
index 249074b891834ba10cb90559bd47473f1af2811e..82fbf958cef0f5451ab8f23a09a50edf916051a2 100644 (file)
@@ -162,23 +162,7 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
 static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
                const struct sr_channel_group *cg)
 {
-       (void)sdi;
-       (void)cg;
-
-       switch (key) {
-       case SR_CONF_SCAN_OPTIONS:
-               *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                       scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t));
-               return SR_OK;
-       case SR_CONF_DEVICE_OPTIONS:
-               *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                       devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
-               return SR_OK;
-       default:
-               return SR_ERR_NA;
-       }
-
-       return SR_OK;
+       return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, NULL, devopts);
 }
 
 static int dev_acquisition_start(const struct sr_dev_inst *sdi)