Revert "re-enable filter and datastore for DF_LOGIC"

This reverts commit 23da86dfc0a89c7ab951fea31a318a493830eb69.
This commit is contained in:
Bert Vermeulen 2011-01-22 14:18:31 +01:00
parent 97554432e8
commit 6ea7e23526
5 changed files with 6 additions and 20 deletions

View File

@ -29,7 +29,7 @@ void device_scan(void)
{ {
GSList *plugins, *l; GSList *plugins, *l;
struct device_plugin *plugin; struct device_plugin *plugin;
int num_devices, num_probes, i, probe_type; int num_devices, num_probes, i;
plugins = list_hwplugins(); plugins = list_hwplugins();
@ -46,13 +46,7 @@ void device_scan(void)
num_probes num_probes
= (int)(unsigned long)plugin->get_device_info(i, = (int)(unsigned long)plugin->get_device_info(i,
DI_NUM_PROBES); DI_NUM_PROBES);
probe_type = (int)(unsigned long) device_new(plugin, i, num_probes);
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);
} }
} }
} }
@ -75,7 +69,7 @@ GSList *device_list(void)
} }
struct device *device_new(struct device_plugin *plugin, int plugin_index, struct device *device_new(struct device_plugin *plugin, int plugin_index,
int num_probes, int probe_type) int num_probes)
{ {
struct device *device; struct device *device;
int i; int i;
@ -84,7 +78,6 @@ struct device *device_new(struct device_plugin *plugin, int plugin_index,
device = g_malloc0(sizeof(struct device)); device = g_malloc0(sizeof(struct device));
device->plugin = plugin; device->plugin = plugin;
device->plugin_index = plugin_index; device->plugin_index = plugin_index;
device->probe_type = probe_type;
devices = g_slist_append(devices, device); devices = g_slist_append(devices, device);
for (i = 0; i < num_probes; i++) { for (i = 0; i < num_probes; i++) {

View File

@ -163,11 +163,6 @@ static void *hw_get_device_info(int device_index, int device_info_id)
case DI_PATTERNMODES: case DI_PATTERNMODES:
info = &patternmodes; info = &patternmodes;
break; break;
#ifdef DEMO_ANALOG
case DI_PROBE_TYPE:
info = GINT_TO_POINTER(PROBE_TYPE_ANALOG);
break;
#endif
} }
return info; return info;

View File

@ -51,7 +51,7 @@ static int init(struct input *in)
num_probes = DEFAULT_NUM_PROBES; num_probes = DEFAULT_NUM_PROBES;
/* create a virtual device */ /* 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; return SIGROK_OK;
} }

View File

@ -38,7 +38,7 @@ void device_scan(void);
void device_close_all(void); void device_close_all(void);
GSList *device_list(void); GSList *device_list(void);
struct device *device_new(struct device_plugin *plugin, int plugin_index, 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_clear(struct device *device);
void device_destroy(struct device *dev); void device_destroy(struct device *dev);

View File

@ -190,7 +190,6 @@ struct device {
struct device_plugin *plugin; struct device_plugin *plugin;
/* A plugin may handle multiple devices of the same type */ /* A plugin may handle multiple devices of the same type */
int plugin_index; int plugin_index;
uint8_t probe_type;
/* List of struct probe* */ /* List of struct probe* */
GSList *probes; GSList *probes;
/* Data acquired by this device, if any */ /* Data acquired by this device, if any */
@ -204,6 +203,7 @@ enum {
struct probe { struct probe {
int index; int index;
int type;
gboolean enabled; gboolean enabled;
char *name; char *name;
char *trigger; char *trigger;
@ -297,8 +297,6 @@ enum {
DI_CUR_SAMPLERATE, DI_CUR_SAMPLERATE,
/* Supported pattern generator modes */ /* Supported pattern generator modes */
DI_PATTERNMODES, DI_PATTERNMODES,
/* Probes type, DF_ANALOG needs this to be PROBE_TYPE_ANALOG */
DI_PROBE_TYPE,
}; };
/* /*