/*
* This file is part of the libsigrok project.
*
- * Copyright (C) 2014-17 Kumar Abhishek <abhishek@theembeddedkitchen.net>
+ * Copyright (C) 2014-2017 Kumar Abhishek <abhishek@theembeddedkitchen.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
struct sr_config *src;
struct sr_dev_inst *sdi;
struct dev_context *devc;
- const char *conn = NULL;
+ const char *conn;
gchar **params;
int i, maxch;
maxch = NUM_CHANNELS;
+ conn = NULL;
for (l = options; l; l = l->next) {
src = l->data;
if (src->key == SR_CONF_NUM_LOGIC_CHANNELS)
/* Probe for /dev/beaglelogic if not connecting via TCP */
if (!conn) {
+ params = NULL;
if (!g_file_test(BEAGLELOGIC_DEV_NODE, G_FILE_TEST_EXISTS))
return NULL;
} else {
/* Default non-zero values (if any) */
devc->fd = -1;
- devc->limit_samples = (uint64_t)10000000;
+ devc->limit_samples = 10000000;
devc->tcp_buffer = 0;
if (!conn) {
/* If continuous sampling, set the limit_samples to max possible value */
if (devc->triggerflags == BL_TRIGGERFLAGS_CONTINUOUS)
- devc->limit_samples = (uint64_t)-1;
+ devc->limit_samples = UINT64_MAX;
/* Configure triggers & send header packet */
if ((trigger = sr_session_trigger_get(sdi->session))) {