]> sigrok.org Git - libsigrok.git/blobdiff - hardware/demo/demo.c
Move the probe naming to the creator of the device, and let each driver name its...
[libsigrok.git] / hardware / demo / demo.c
index 9531d0b03f08fc943faf516b1ae2ade1fc78e931..6605d1e6c321f6fe5be8998d65a4799a5594cce3 100644 (file)
@@ -102,6 +102,18 @@ static const char *pattern_strings[] = {
        NULL,
 };
 
+static const char *probe_names[NUM_PROBES + 1] = {
+       "0",
+       "1",
+       "2",
+       "3",
+       "4",
+       "5",
+       "6",
+       "7",
+       NULL,
+};
+
 static uint8_t pattern_sigrok[] = {
        0x4c, 0x92, 0x92, 0x92, 0x64, 0x00, 0x00, 0x00,
        0x82, 0xfe, 0xfe, 0x82, 0x00, 0x00, 0x00, 0x00,
@@ -185,6 +197,9 @@ static void *hw_get_device_info(int device_index, int device_info_id)
        case SR_DI_NUM_PROBES:
                info = GINT_TO_POINTER(NUM_PROBES);
                break;
+       case SR_DI_PROBE_NAMES:
+               info = probe_names;
+               break;
        case SR_DI_SAMPLERATES:
                info = &samplerates;
                break;