{
GSList *plugins, *l;
struct device_plugin *plugin;
- int num_devices, num_probes, i, probe_type;
+ int num_devices, num_probes, i;
plugins = list_hwplugins();
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);
}
}
}
}
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;
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++) {
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;
}
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);
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 */
struct probe {
int index;
+ int type;
gboolean enabled;
char *name;
char *trigger;
DI_CUR_SAMPLERATE,
/* Supported pattern generator modes */
DI_PATTERNMODES,
- /* Probes type, DF_ANALOG needs this to be PROBE_TYPE_ANALOG */
- DI_PROBE_TYPE,
};
/*