]> sigrok.org Git - libsigrok.git/blobdiff - hardware/asix-sigma/asix-sigma.c
Move the probe naming to the creator of the device, and let each driver name its...
[libsigrok.git] / hardware / asix-sigma / asix-sigma.c
index b6b914ce30a72064965d9f68b63b25d0b76b9b06..557557e9aae61d2fead33d1f87da1fae0ecf106b 100644 (file)
@@ -40,6 +40,7 @@
 #define USB_MODEL_NAME                 "SIGMA"
 #define USB_MODEL_VERSION              ""
 #define TRIGGER_TYPES                  "rf10"
+#define NUM_PROBES                     16
 
 static GSList *device_instances = NULL;
 
@@ -57,6 +58,26 @@ static uint64_t supported_samplerates[] = {
        0,
 };
 
+static const char* probe_names[NUM_PROBES + 1] = {
+       "0",
+       "1",
+       "2",
+       "3",
+       "4",
+       "5",
+       "6",
+       "7",
+       "8",
+       "9",
+       "10",
+       "11",
+       "12",
+       "13",
+       "14",
+       "15",
+       NULL,
+};
+
 static struct sr_samplerates samplerates = {
        SR_KHZ(200),
        SR_MHZ(200),
@@ -735,7 +756,10 @@ static void *hw_get_device_info(int device_index, int device_info_id)
                info = sdi;
                break;
        case SR_DI_NUM_PROBES:
-               info = GINT_TO_POINTER(16);
+               info = GINT_TO_POINTER(NUM_PROBES);
+               break;
+       case SR_DI_PROBE_NAMES:
+               info = probe_names;
                break;
        case SR_DI_SAMPLERATES:
                info = &samplerates;