]> sigrok.org Git - libsigrok.git/commitdiff
Revert "re-enable filter and datastore for DF_LOGIC"
authorBert Vermeulen <redacted>
Sat, 22 Jan 2011 13:18:31 +0000 (14:18 +0100)
committerBert Vermeulen <redacted>
Sat, 22 Jan 2011 13:18:31 +0000 (14:18 +0100)
This reverts commit 23da86dfc0a89c7ab951fea31a318a493830eb69.

device.c
hardware/demo/demo.c
input/input_binary.c
sigrok-proto.h
sigrok.h

index 752041d5f21b69513fb5508e5711d61bbd014bc1..84cf6d1f87c48c8cfd96d839c5e9a55cb6f5a009 100644 (file)
--- a/device.c
+++ b/device.c
@@ -29,7 +29,7 @@ void device_scan(void)
 {
        GSList *plugins, *l;
        struct device_plugin *plugin;
-       int num_devices, num_probes, i, probe_type;
+       int num_devices, num_probes, i;
 
        plugins = list_hwplugins();
 
@@ -46,13 +46,7 @@ void device_scan(void)
                        num_probes
                          = (int)(unsigned long)plugin->get_device_info(i,
                            DI_NUM_PROBES);
-                       probe_type = (int)(unsigned long)
-                               plugin->get_device_info(i, DI_PROBE_TYPE);
-
-                       if (probe_type != PROBE_TYPE_ANALOG)
-                               probe_type = PROBE_TYPE_LOGIC;
-
-                       device_new(plugin, i, num_probes, probe_type);
+                       device_new(plugin, i, num_probes);
                }
        }
 }
@@ -75,7 +69,7 @@ GSList *device_list(void)
 }
 
 struct device *device_new(struct device_plugin *plugin, int plugin_index,
-                         int num_probes, int probe_type)
+                         int num_probes)
 {
        struct device *device;
        int i;
@@ -84,7 +78,6 @@ struct device *device_new(struct device_plugin *plugin, int plugin_index,
        device = g_malloc0(sizeof(struct device));
        device->plugin = plugin;
        device->plugin_index = plugin_index;
-       device->probe_type = probe_type;
        devices = g_slist_append(devices, device);
 
        for (i = 0; i < num_probes; i++) {
index 06a2236193ef3df7bdbea72967efb9c16bea0ec8..e117e6a59afa29cf065e6f0afcd4e0975eb68c89 100644 (file)
@@ -163,11 +163,6 @@ static void *hw_get_device_info(int device_index, int device_info_id)
        case DI_PATTERNMODES:
                info = &patternmodes;
                break;
-#ifdef DEMO_ANALOG
-       case DI_PROBE_TYPE:
-               info = GINT_TO_POINTER(PROBE_TYPE_ANALOG);
-               break;
-#endif
        }
 
        return info;
index 3957e7690854941b2092f46615b767c424810544..ef9bddcb7e017dab9bc4c9f7d30cda3e8ee0f524 100644 (file)
@@ -51,7 +51,7 @@ static int init(struct input *in)
                num_probes = DEFAULT_NUM_PROBES;
 
        /* create a virtual device */
-       in->vdevice = device_new(NULL, 0, num_probes, PROBE_TYPE_LOGIC);
+       in->vdevice = device_new(NULL, 0, num_probes);
 
        return SIGROK_OK;
 }
index 199599e118537558359e539d1856bdf6cac1b890..1abdadd831482d90310cfa9a7b411a7426d90803 100644 (file)
@@ -38,7 +38,7 @@ void device_scan(void);
 void device_close_all(void);
 GSList *device_list(void);
 struct device *device_new(struct device_plugin *plugin, int plugin_index,
-                         int num_probes, int probe_type);
+                         int num_probes);
 void device_clear(struct device *device);
 void device_destroy(struct device *dev);
 
index 1ba03b6313b6ff4cb67cd8570fa601eea8e11b01..e3b6ac78c56dbd5de0e27d626671ad9e3ce28fa6 100644 (file)
--- a/sigrok.h
+++ b/sigrok.h
@@ -190,7 +190,6 @@ struct device {
        struct device_plugin *plugin;
        /* A plugin may handle multiple devices of the same type */
        int plugin_index;
-       uint8_t probe_type;
        /* List of struct probe* */
        GSList *probes;
        /* Data acquired by this device, if any */
@@ -204,6 +203,7 @@ enum {
 
 struct probe {
        int index;
+       int type;
        gboolean enabled;
        char *name;
        char *trigger;
@@ -297,8 +297,6 @@ enum {
        DI_CUR_SAMPLERATE,
        /* Supported pattern generator modes */
        DI_PATTERNMODES,
-       /* Probes type, DF_ANALOG needs this to be PROBE_TYPE_ANALOG */
-       DI_PROBE_TYPE,
 };
 
 /*