#include "sigrok-cli.h"
#include "config.h"
-extern struct sr_context *sr_ctx;
-
static void free_drvopts(struct sr_config *src)
{
g_variant_unref(src->data);
} else {
/* No driver specified, let them all scan on their own. */
devices = NULL;
- drivers = sr_driver_list();
+ drivers = sr_driver_list(sr_ctx);
for (i = 0; drivers[i]; i++) {
driver = drivers[i];
if (sr_driver_init(sr_ctx, driver) != SR_OK) {
#include <glib.h>
#include "sigrok-cli.h"
-extern struct sr_context *sr_ctx;
-
struct sr_channel *find_channel(GSList *channellist, const char *channelname)
{
struct sr_channel *ch;
drvname = g_strdup(g_hash_table_lookup(drvargs, "sigrok_key"));
g_hash_table_remove(drvargs, "sigrok_key");
*driver = NULL;
- drivers = sr_driver_list();
+ drivers = sr_driver_list(sr_ctx);
for (i = 0; drivers[i]; i++) {
if (strcmp(drivers[i]->name, drvname))
continue;
#endif
printf("Supported hardware drivers:\n");
- drivers = sr_driver_list();
+ drivers = sr_driver_list(sr_ctx);
for (sl = NULL, i = 0; drivers[i]; i++)
sl = g_slist_append(sl, drivers[i]);
sl = g_slist_sort(sl, sort_drivers);
#define SAVE_CHUNK_SIZE (512 * 1024)
/* main.c */
-struct sr_context *sr_ctx;
+extern struct sr_context *sr_ctx;
int select_channels(struct sr_dev_inst *sdi);
gboolean config_key_has_cap(struct sr_dev_driver *driver,
const struct sr_dev_inst *sdi, struct sr_channel_group *cg,