X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Ftondaj-sl-814%2Fapi.c;h=07a8ecae283cdbf97456e9da03a388dc4586f978;hb=1c47e0da8f2571bc34dbdc368c3c1f55318c3aa0;hp=b41ef9a819adc24a433da3869765d91738d48ce6;hpb=4f840ce965b1c30c5ab75afecc56193cbaf5c1b3;p=libsigrok.git diff --git a/src/hardware/tondaj-sl-814/api.c b/src/hardware/tondaj-sl-814/api.c index b41ef9a8..07a8ecae 100644 --- a/src/hardware/tondaj-sl-814/api.c +++ b/src/hardware/tondaj-sl-814/api.c @@ -18,9 +18,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include -#include "libsigrok.h" +#include #include "libsigrok-internal.h" #include "protocol.h" @@ -54,7 +55,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) const char *conn, *serialcomm; struct sr_serial_dev_inst *serial; - drvc = di->priv; + drvc = di->context; drvc->instances = NULL; devices = NULL; @@ -107,7 +108,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) 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 int cleanup(const struct sr_dev_driver *di) @@ -130,8 +131,6 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd switch (key) { case SR_CONF_LIMIT_SAMPLES: devc->limit_samples = g_variant_get_uint64(data); - sr_dbg("Setting sample limit to %" PRIu64 ".", - devc->limit_samples); break; default: return SR_ERR_NA; @@ -174,7 +173,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, devc = sdi->priv; devc->cb_data = cb_data; - /* Send header packet to the session bus. */ std_session_send_df_header(cb_data, LOG_PREFIX); /* Poll every 500ms, or whenever some data comes in. */ @@ -207,5 +205,5 @@ SR_PRIV struct sr_dev_driver tondaj_sl_814_driver_info = { .dev_close = std_serial_dev_close, .dev_acquisition_start = dev_acquisition_start, .dev_acquisition_stop = dev_acquisition_stop, - .priv = NULL, + .context = NULL, };