return NULL;
}
-static int dev_open(struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- return SR_OK;
-}
-
-static int dev_close(struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- return SR_OK;
-}
-
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,
- .dev_open = dev_open,
- .dev_close = dev_close,
+ .dev_open = std_dummy_dev_open,
+ .dev_close = std_dummy_dev_close,
.dev_acquisition_start = dev_acquisition_start,
.dev_acquisition_stop = dev_acquisition_stop,
.context = NULL,
return ret;
}
-static int dev_acquisition_start(const struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- return SR_OK;
-}
-
-static int dev_acquisition_stop(struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- return SR_OK;
-}
-
static struct sr_dev_driver conrad_digi_35_cpu_driver_info = {
.name = "conrad-digi-35-cpu",
.longname = "Conrad DIGI 35 CPU",
.config_list = config_list,
.dev_open = std_serial_dev_open,
.dev_close = std_serial_dev_close,
- .dev_acquisition_start = dev_acquisition_start,
- .dev_acquisition_stop = dev_acquisition_stop,
+ .dev_acquisition_start = std_dummy_dev_acquisition_start,
+ .dev_acquisition_stop = std_dummy_dev_acquisition_stop,
.context = NULL,
};
SR_REGISTER_DEV_DRIVER(conrad_digi_35_cpu_driver_info);
return std_scan_complete(di, g_slist_append(NULL, sdi));
}
-static int dev_open(struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- return SR_OK;
-}
-
-static int dev_close(struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- return SR_OK;
-}
-
static void clear_helper(void *priv)
{
struct dev_context *devc;
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,
- .dev_open = dev_open,
- .dev_close = dev_close,
+ .dev_open = std_dummy_dev_open,
+ .dev_close = std_dummy_dev_close,
.dev_acquisition_start = dev_acquisition_start,
.dev_acquisition_stop = dev_acquisition_stop,
.context = NULL,
return SR_OK;
}
-static int dev_acquisition_start(const struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- return SR_OK;
-}
-
SR_PRIV struct sr_dev_driver rohde_schwarz_sme_0x_driver_info = {
.name = "rohde-schwarz-sme-0x",
.longname = "Rohde&Schwarz SME-0x",
.config_list = config_list,
.dev_open = dev_open,
.dev_close = dev_close,
- .dev_acquisition_start = dev_acquisition_start,
+ .dev_acquisition_start = std_dummy_dev_acquisition_start,
.dev_acquisition_stop = std_serial_dev_acquisition_stop,
.context = NULL,
};
return sr_usb_open(drvc->sr_ctx->libusb_ctx, usb);
}
-static int dev_close(struct sr_dev_inst *sdi)
-{
- (void)sdi;
-
- /* TODO */
-
- return SR_OK;
-}
-
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
{
.config_set = config_set, \
.config_list = config_list, \
.dev_open = dev_open, \
- .dev_close = dev_close, \
+ .dev_close = std_dummy_dev_close /* TODO */, \
.dev_acquisition_start = dev_acquisition_start, \
.dev_acquisition_stop = dev_acquisition_stop, \
.context = NULL, \
SR_PRIV int std_init(struct sr_dev_driver *di, struct sr_context *sr_ctx);
SR_PRIV int std_cleanup(const struct sr_dev_driver *di);
+SR_PRIV int std_dummy_dev_open(struct sr_dev_inst *sdi);
+SR_PRIV int std_dummy_dev_close(struct sr_dev_inst *sdi);
+SR_PRIV int std_dummy_dev_acquisition_start(const struct sr_dev_inst *sdi);
+SR_PRIV int std_dummy_dev_acquisition_stop(struct sr_dev_inst *sdi);
#ifdef HAVE_LIBSERIALPORT
SR_PRIV int std_serial_dev_open(struct sr_dev_inst *sdi);
SR_PRIV int std_serial_dev_acquisition_stop(struct sr_dev_inst *sdi);
return ret;
}
+/**
+ * Dummmy driver dev_open() callback API helper.
+ *
+ * @param[in] sdi The device instance to use. May be NULL (unused).
+ *
+ * @retval SR_OK Success.
+ */
+SR_PRIV int std_dummy_dev_open(struct sr_dev_inst *sdi)
+{
+ (void)sdi;
+
+ return SR_OK;
+}
+
+/**
+ * Dummmy driver dev_close() callback API helper.
+ *
+ * @param[in] sdi The device instance to use. May be NULL (unused).
+ *
+ * @retval SR_OK Success.
+ */
+SR_PRIV int std_dummy_dev_close(struct sr_dev_inst *sdi)
+{
+ (void)sdi;
+
+ return SR_OK;
+}
+
+/**
+ * Dummmy driver dev_acquisition_start() callback API helper.
+ *
+ * @param[in] sdi The device instance to use. May be NULL (unused).
+ *
+ * @retval SR_OK Success.
+ */
+SR_PRIV int std_dummy_dev_acquisition_start(const struct sr_dev_inst *sdi)
+{
+ (void)sdi;
+
+ return SR_OK;
+}
+
+/**
+ * Dummmy driver dev_acquisition_stop() callback API helper.
+ *
+ * @param[in] sdi The device instance to use. May be NULL (unused).
+ *
+ * @retval SR_OK Success.
+ */
+SR_PRIV int std_dummy_dev_acquisition_stop(struct sr_dev_inst *sdi)
+{
+ (void)sdi;
+
+ return SR_OK;
+}
+
/**
* Standard API helper for sending an SR_DF_HEADER packet.
*