]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/saleae-logic16/api.c
Publish config key capabilities.
[libsigrok.git] / src / hardware / saleae-logic16 / api.c
index f02a6fbad03420741a75a8e5e3aee6ecb8d2467b..2ae1f3de02470e83b81d7110507df3755625d31b 100644 (file)
 SR_PRIV struct sr_dev_driver saleae_logic16_driver_info;
 static struct sr_dev_driver *di = &saleae_logic16_driver_info;
 
-static const uint32_t hwopts[] = {
+static const uint32_t scanopts[] = {
        SR_CONF_CONN,
 };
 
 static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_SAMPLERATE,
-       SR_CONF_VOLTAGE_THRESHOLD,
-       SR_CONF_TRIGGER_MATCH,
-
-       /* These are really implemented in the driver, not the hardware. */
-       SR_CONF_LIMIT_SAMPLES,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_CONN | SR_CONF_GET,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_VOLTAGE_THRESHOLD | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
 };
 
 static const int32_t soft_trigger_matches[] = {
@@ -548,7 +547,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                               hwopts, ARRAY_SIZE(hwopts), sizeof(uint32_t));
+                               scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t));
                break;
        case SR_CONF_DEVICE_OPTIONS:
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,