X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=device.c;h=055c37194716f5cd710604ecc0b401b5d045e8a7;hb=71422cb6eb8be34f6fca8a3be7ebe10fe1bea319;hp=04adcccf081d768f45d6cd9ecfafbd09b8ddbb65;hpb=56d0d24535700fb53e47a25ad5c73d34697695fa;p=libsigrok.git diff --git a/device.c b/device.c index 04adcccf..055c3719 100644 --- a/device.c +++ b/device.c @@ -23,7 +23,9 @@ #include "libsigrok.h" #include "libsigrok-internal.h" +/** @cond PRIVATE */ #define LOG_PREFIX "device" +/** @endcond */ /** * @file @@ -83,7 +85,7 @@ SR_PRIV struct sr_channel *sr_channel_new(int index, int type, * * @since 0.2.0 */ -SR_API int sr_dev_probe_name_set(const struct sr_dev_inst *sdi, +SR_API int sr_dev_channel_name_set(const struct sr_dev_inst *sdi, int channelnum, const char *name) { GSList *l; @@ -122,7 +124,7 @@ SR_API int sr_dev_probe_name_set(const struct sr_dev_inst *sdi, * * @since 0.2.0 */ -SR_API int sr_dev_probe_enable(const struct sr_dev_inst *sdi, int channelnum, +SR_API int sr_dev_channel_enable(const struct sr_dev_inst *sdi, int channelnum, gboolean state) { GSList *l; @@ -141,9 +143,9 @@ SR_API int sr_dev_probe_enable(const struct sr_dev_inst *sdi, int channelnum, ch->enabled = state; ret = SR_OK; if (!state != !was_enabled && sdi->driver - && sdi->driver->config_probe_set) { - ret = sdi->driver->config_probe_set( - sdi, ch, SR_PROBE_SET_ENABLED); + && sdi->driver->config_channel_set) { + ret = sdi->driver->config_channel_set( + sdi, ch, SR_CHANNEL_SET_ENABLED); /* Roll back change if it wasn't applicable. */ if (ret == SR_ERR_ARG) ch->enabled = was_enabled; @@ -193,9 +195,9 @@ SR_API int sr_dev_trigger_set(const struct sr_dev_inst *sdi, int channelnum, /* Set new trigger if it has changed. */ ch->trigger = g_strdup(trigger); - if (sdi->driver && sdi->driver->config_probe_set) { - ret = sdi->driver->config_probe_set( - sdi, ch, SR_PROBE_SET_TRIGGER); + if (sdi->driver && sdi->driver->config_channel_set) { + ret = sdi->driver->config_channel_set( + sdi, ch, SR_CHANNEL_SET_TRIGGER); /* Roll back change if it wasn't applicable. */ if (ret == SR_ERR_ARG) { g_free(ch->trigger);