]> sigrok.org Git - libsigrok.git/blobdiff - hardware/zeroplus-logic-cube/zeroplus.c
Deprecate SR_DI_HWCAPS.
[libsigrok.git] / hardware / zeroplus-logic-cube / zeroplus.c
index ac47f085c153259a2e7ff7220b70ec31ac756732..7a72e7c42e994f9ee895a70bb0877bf379eda6c6 100644 (file)
@@ -38,7 +38,7 @@
 #define USB_INTERFACE                  0
 #define USB_CONFIGURATION              1
 #define NUM_TRIGGER_STAGES             4
-#define TRIGGER_TYPES                  "01"
+#define TRIGGER_TYPE                   "01"
 
 #define PACKET_SIZE                    2048    /* ?? */
 
@@ -534,18 +534,7 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
        struct dev_context *devc;
 
        switch (id) {
-       case SR_DI_HWCAPS:
-               *data = hwcaps;
-               break;
-       case SR_DI_SAMPLERATES:
-               *data = &samplerates;
-               sr_spew("zp: %s: Returning samplerates.", __func__);
-               break;
-       case SR_DI_TRIGGER_TYPES:
-               *data = TRIGGER_TYPES;
-               sr_spew("zp: %s: Returning triggertypes: %s.", __func__, TRIGGER_TYPES);
-               break;
-       case SR_DI_CUR_SAMPLERATE:
+       case SR_CONF_SAMPLERATE:
                if (sdi) {
                        devc = sdi->priv;
                        *data = &devc->cur_samplerate;
@@ -655,9 +644,15 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi
        (void)sdi;
 
        switch (key) {
+       case SR_CONF_DEVICE_OPTIONS:
+               *data = hwcaps;
+               break;
        case SR_CONF_SAMPLERATE:
                *data = &samplerates;
                break;
+       case SR_CONF_TRIGGER_TYPE:
+               *data = TRIGGER_TYPE;
+               break;
        default:
                return SR_ERR_ARG;
        }