* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <config.h>
#include <stdlib.h>
+#include "scpi.h"
#include "protocol.h"
SR_PRIV struct sr_dev_driver yokogawa_dlm_driver_info;
goto fail;
sdi = g_malloc0(sizeof(struct sr_dev_inst));
- sdi->status = SR_ST_ACTIVE;
sdi->vendor = g_strdup(MANUFACTURER_NAME);
sdi->model = g_strdup(model_name);
sdi->version = g_strdup(hw_info->firmware_version);
if (dlm_device_init(sdi, model_index) != SR_OK)
goto fail;
- sr_scpi_close(sdi->conn);
-
- sdi->status = SR_ST_INACTIVE;
return sdi;
fail:
static GSList *scan(struct sr_dev_driver *di, GSList *options)
{
- return sr_scpi_scan(di->priv, options, probe_usbtmc_device);
+ return sr_scpi_scan(di->context, options, probe_usbtmc_device);
}
static GSList *dev_list(const struct sr_dev_driver *di)
{
- return ((struct drv_context *)(di->priv))->instances;
+ return ((struct drv_context *)(di->context))->instances;
}
static void clear_helper(void *priv)
if ((cg_type = check_channel_group(devc, cg)) == CG_INVALID)
return SR_ERR;
- ret = SR_ERR_NA;
model = devc->model_config;
state = devc->model_state;
.dev_close = dev_close,
.dev_acquisition_start = dev_acquisition_start,
.dev_acquisition_stop = dev_acquisition_stop,
- .priv = NULL,
+ .context = NULL,
};