]> sigrok.org Git - libsigrok.git/commitdiff
appa-55ii: Publish driver options.
authorBert Vermeulen <redacted>
Tue, 18 Nov 2014 15:50:47 +0000 (16:50 +0100)
committerBert Vermeulen <redacted>
Tue, 18 Nov 2014 15:50:47 +0000 (16:50 +0100)
src/hardware/appa-55ii/api.c

index 01c5f5ba5ad1d623383fcb634822a3d5c86aabca..a8c8a841adff89bb18779dafa8b43cb27ca545f8 100644 (file)
@@ -25,9 +25,12 @@ static const uint32_t scanopts[] = {
        SR_CONF_SERIALCOMM,
 };
 
-static const uint32_t devopts[] = {
+static const uint32_t drvopts[] = {
        SR_CONF_THERMOMETER,
-       SR_CONF_CONTINUOUS,
+};
+
+static const uint32_t devopts[] = {
+       SR_CONF_CONTINUOUS | SR_CONF_SET,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
@@ -219,8 +222,12 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                                scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t));
                break;
        case SR_CONF_DEVICE_OPTIONS:
-               *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                               devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
+               if (!sdi)
+                       *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
+                                       drvopts, ARRAY_SIZE(drvopts), sizeof(uint32_t));
+               else
+                       *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
+                                       devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
                break;
        case SR_CONF_DATA_SOURCE:
                *data = g_variant_new_strv(data_sources, ARRAY_SIZE(data_sources));