};
#endif
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc;
-
- devc = priv;
-
ftdi_deinit(&devc->ftdic);
}
static int dev_clear(const struct sr_dev_driver *di)
{
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
SR_TRIGGER_FALLING,
};
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc;
-
- devc = priv;
-
ftdi_free(devc->ftdic);
g_free(devc->final_buf);
}
static int dev_clear(const struct sr_dev_driver *di)
{
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static int add_device(int model, struct libusb_device_descriptor *des,
return std_scan_complete(di, g_slist_append(NULL, sdi));
}
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc;
GHashTableIter iter;
void *value;
- devc = priv;
-
/* Analog generators. */
g_hash_table_iter_init(&iter, devc->ch_ag);
while (g_hash_table_iter_next(&iter, NULL, &value))
static int dev_clear(const struct sr_dev_driver *di)
{
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
return std_scan_complete(di, devices);
}
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc;
-
- devc = priv;
g_free(devc->data_buf);
}
static int dev_clear(const struct sr_dev_driver *di)
{
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static int dev_open(struct sr_dev_inst *sdi)
return std_scan_complete(di, devices);
}
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc;
-
- devc = priv;
g_slist_free(devc->enabled_analog_channels);
}
static int dev_clear(const struct sr_dev_driver *di)
{
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static int dev_open(struct sr_dev_inst *sdi)
return sr_scpi_scan(di->context, options, hmo_probe_serial_device);
}
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc;
-
- devc = priv;
-
hmo_scope_state_free(devc->model_state);
-
g_free(devc->analog_groups);
g_free(devc->digital_groups);
}
static int dev_clear(const struct sr_dev_driver *di)
{
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static int dev_open(struct sr_dev_inst *sdi)
return SR_OK;
}
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc;
-
- devc = priv;
g_slist_free(devc->enabled_channels);
}
static int dev_clear(const struct sr_dev_driver *di)
{
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
return SR_OK;
}
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc;
-
- devc = priv;
g_free(devc->triggersource);
g_slist_free(devc->enabled_channels);
}
static int dev_clear(const struct sr_dev_driver *di)
{
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
return std_scan_complete(di, devices);
}
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc = priv;
-
g_slist_free(devc->enabled_channel);
}
}
}
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static int dev_open(struct sr_dev_inst *sdi)
return std_scan_complete(di, devices);
}
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc;
-
- devc = priv;
-
libusb_free_transfer(devc->xfer_in);
libusb_free_transfer(devc->xfer_out);
}
static int dev_clear(const struct sr_dev_driver *di)
{
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static int dev_open(struct sr_dev_inst *sdi)
/* Note: The IKALOGIC ScanaPLUS always samples at 100MHz. */
static const uint64_t samplerates[1] = { SR_MHZ(100) };
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc;
-
- devc = priv;
-
ftdi_free(devc->ftdic);
g_free(devc->compressed_buf);
g_free(devc->sample_buf);
static int dev_clear(const struct sr_dev_driver *di)
{
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static GSList *scan(struct sr_dev_driver *di, GSList *options)
return sr_scpi_scan(di->context, options, probe_serial_device);
}
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc;
-
- devc = priv;
-
lecroy_xstream_state_free(devc->model_state);
-
g_free(devc->analog_groups);
}
static int dev_clear(const struct sr_dev_driver *di)
{
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static int dev_open(struct sr_dev_inst *sdi)
return NULL;
}
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc;
-
- devc = priv;
-
ftdi_free(devc->ftdic);
g_free(devc->ftdi_buf);
}
static int dev_clear(const struct sr_dev_driver *di)
{
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
static struct sr_dev_driver rigol_ds_driver_info;
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc;
unsigned int i;
- devc = priv;
g_free(devc->data);
g_free(devc->buffer);
for (i = 0; i < ARRAY_SIZE(devc->coupling); i++)
static int dev_clear(const struct sr_dev_driver *di)
{
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
return sr_scpi_close(scpi);
}
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc;
-
- devc = priv;
g_free(devc->channels);
g_free(devc->channel_groups);
}
static int dev_clear(const struct sr_dev_driver *di)
{
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
return sr_scpi_scan(di->context, options, probe_usbtmc_device);
}
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
{
- struct dev_context *devc;
-
- devc = priv;
-
dlm_scope_state_destroy(devc->model_state);
-
g_free(devc->analog_groups);
g_free(devc->digital_groups);
}
static int dev_clear(const struct sr_dev_driver *di)
{
- return std_dev_clear_with_callback(di, clear_helper);
+ return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static int dev_open(struct sr_dev_inst *sdi)