return ((struct drv_context *)(di->priv))->instances;
}
-static int dev_open(struct sr_dev_inst *sdi)
-{
- struct sr_serial_dev_inst *serial;
-
- serial = sdi->conn;
- if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK)
- return SR_ERR;
-
- sdi->status = SR_ST_ACTIVE;
-
- return SR_OK;
-}
-
static int cleanup(void)
{
return dev_clear();
.config_get = NULL,
.config_set = config_set,
.config_list = config_list,
- .dev_open = dev_open,
+ .dev_open = std_serial_dev_open,
.dev_close = std_serial_dev_close,
.dev_acquisition_start = dev_acquisition_start,
.dev_acquisition_stop = dev_acquisition_stop,
return ((struct drv_context *)(di->priv))->instances;
}
-static int dev_open(struct sr_dev_inst *sdi)
-{
- struct sr_serial_dev_inst *serial;
-
- serial = sdi->conn;
- if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK)
- return SR_ERR;
-
- sdi->status = SR_ST_ACTIVE;
-
- return SR_OK;
-}
-
static int cleanup(void)
{
return dev_clear();
.config_get = NULL,
.config_set = config_set,
.config_list = config_list,
- .dev_open = dev_open,
+ .dev_open = std_serial_dev_open,
.dev_close = std_serial_dev_close,
.dev_acquisition_start = dev_acquisition_start,
.dev_acquisition_stop = dev_acquisition_stop,
return ((struct drv_context *)(center_devs[idx].di->priv))->instances;
}
-static int dev_open(struct sr_dev_inst *sdi)
-{
- struct sr_serial_dev_inst *serial;
-
- serial = sdi->conn;
- if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK)
- return SR_ERR;
-
- sdi->status = SR_ST_ACTIVE;
-
- return SR_OK;
-}
-
static int cleanup(int idx)
{
return dev_clear(idx);
.config_get = NULL, \
.config_set = config_set, \
.config_list = config_list, \
- .dev_open = dev_open, \
+ .dev_open = std_serial_dev_open, \
.dev_close = std_serial_dev_close, \
.dev_acquisition_start = dev_acquisition_start_##ID_UPPER, \
.dev_acquisition_stop = dev_acquisition_stop, \
return ((struct drv_context *)(di->priv))->instances;
}
-static int dev_open(struct sr_dev_inst *sdi)
-{
- struct sr_serial_dev_inst *serial;
-
- serial = sdi->conn;
- if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK)
- return SR_ERR;
-
- sdi->status = SR_ST_ACTIVE;
-
- return SR_OK;
-}
-
static int cleanup(void)
{
return dev_clear();
.config_get = NULL,
.config_set = config_set,
.config_list = config_list,
- .dev_open = dev_open,
+ .dev_open = std_serial_dev_open,
.dev_close = std_serial_dev_close,
.dev_acquisition_start = dev_acquisition_start,
.dev_acquisition_stop = dev_acquisition_stop,
return std_dev_clear(&gmc_mh_1x_2x_rs232_driver_info, NULL);
}
-static int dev_open(struct sr_dev_inst *sdi)
-{
- struct sr_serial_dev_inst *serial = sdi->conn;
- if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK)
- return SR_ERR;
-
- sdi->status = SR_ST_ACTIVE;
-
- return SR_OK;
-}
-
static int dev_close(struct sr_dev_inst *sdi)
{
struct dev_context *devc;
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,
- .dev_open = dev_open,
+ .dev_open = std_serial_dev_open,
.dev_close = dev_close,
.dev_acquisition_start = dev_acq_start_1x_2x_rs232,
.dev_acquisition_stop = dev_acq_stop,
return ((struct drv_context *)(mic_devs[idx].di->priv))->instances;
}
-static int dev_open(struct sr_dev_inst *sdi)
-{
- struct sr_serial_dev_inst *serial;
-
- serial = sdi->conn;
- if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK)
- return SR_ERR;
-
- sdi->status = SR_ST_ACTIVE;
-
- return SR_OK;
-}
-
static int cleanup(int idx)
{
return dev_clear(idx);
.config_get = NULL, \
.config_set = config_set, \
.config_list = config_list, \
- .dev_open = dev_open, \
+ .dev_open = std_serial_dev_open, \
.dev_close = std_serial_dev_close, \
.dev_acquisition_start = dev_acquisition_start_##ID_UPPER, \
.dev_acquisition_stop = dev_acquisition_stop, \
return std_dev_clear(di, NULL);
}
-static int dev_open(struct sr_dev_inst *sdi)
-{
- struct sr_serial_dev_inst *serial;
-
- serial = sdi->conn;
- if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK)
- return SR_ERR;
-
- sdi->status = SR_ST_ACTIVE;
-
- return SR_OK;
-}
-
static int dev_close(struct sr_dev_inst *sdi)
{
struct dev_context *devc;
.config_get = NULL,
.config_set = config_set,
.config_list = config_list,
- .dev_open = dev_open,
+ .dev_open = std_serial_dev_open,
.dev_close = dev_close,
.dev_acquisition_start = dev_acquisition_start,
.dev_acquisition_stop = dev_acquisition_stop,
return ((struct drv_context *)(di->priv))->instances;
}
-static int dev_open(struct sr_dev_inst *sdi)
-{
- struct sr_serial_dev_inst *serial;
-
- serial = sdi->conn;
- if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK)
- return SR_ERR;
-
- sdi->status = SR_ST_ACTIVE;
-
- return SR_OK;
-}
-
static int cleanup(void)
{
return dev_clear();
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,
- .dev_open = dev_open,
+ .dev_open = std_serial_dev_open,
.dev_close = std_serial_dev_close,
.dev_acquisition_start = dev_acquisition_start,
.dev_acquisition_stop = dev_acquisition_stop,
return ((struct drv_context *)(dmms[dmm].di->priv))->instances;
}
-static int dev_open(struct sr_dev_inst *sdi)
-{
- struct sr_serial_dev_inst *serial;
-
- serial = sdi->conn;
- if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK)
- return SR_ERR;
-
- sdi->status = SR_ST_ACTIVE;
-
- return SR_OK;
-}
-
static int cleanup(int dmm)
{
return dev_clear(dmm);
.config_get = NULL, \
.config_set = config_set, \
.config_list = config_list, \
- .dev_open = dev_open, \
+ .dev_open = std_serial_dev_open, \
.dev_close = std_serial_dev_close, \
.dev_acquisition_start = dev_acquisition_start_##ID_UPPER, \
.dev_acquisition_stop = dev_acquisition_stop, \
return std_dev_clear(di, NULL);
}
-static int dev_open(struct sr_dev_inst *sdi)
-{
- struct sr_serial_dev_inst *serial = sdi->conn;
-
- if (serial_open(serial, SERIAL_RDONLY | SERIAL_NONBLOCK) != SR_OK)
- return SR_ERR;
-
- sdi->status = SR_ST_ACTIVE;
-
- return SR_OK;
-}
-
static int cleanup(void)
{
return dev_clear();
.dev_clear = dev_clear,
.config_set = config_set,
.config_list = config_list,
- .dev_open = dev_open,
+ .dev_open = std_serial_dev_open,
.dev_close = std_serial_dev_close,
.dev_acquisition_start = dev_acquisition_start,
.dev_acquisition_stop = dev_acquisition_stop,
return ((struct drv_context *)(di->priv))->instances;
}
-static int dev_open(struct sr_dev_inst *sdi)
-{
- struct sr_serial_dev_inst *serial;
-
- serial = sdi->conn;
- if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK)
- return SR_ERR;
-
- sdi->status = SR_ST_ACTIVE;
-
- return SR_OK;
-}
-
static int cleanup(void)
{
return dev_clear();
.config_get = NULL,
.config_set = config_set,
.config_list = config_list,
- .dev_open = dev_open,
+ .dev_open = std_serial_dev_open,
.dev_close = std_serial_dev_close,
.dev_acquisition_start = dev_acquisition_start,
.dev_acquisition_stop = dev_acquisition_stop,