]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/lecroy-xstream/api.c
lecroy-xstream: Implement config_channel_set API callback
[libsigrok.git] / src / hardware / lecroy-xstream / api.c
index 6b4842ba3b6786441b216fea0e5649ec410bda1c..8d4fe0b291eb775189535e9f8124083146d295cd 100644 (file)
@@ -302,6 +302,16 @@ static int config_set(uint32_t key, GVariant *data,
        return ret;
 }
 
+static int config_channel_set(const struct sr_dev_inst *sdi,
+       struct sr_channel *ch, unsigned int changes)
+{
+       /* Currently we only handle SR_CHANNEL_SET_ENABLED. */
+       if (changes != SR_CHANNEL_SET_ENABLED)
+               return SR_ERR_NA;
+
+       return lecroy_xstream_channel_state_set(sdi, ch->index, ch->enabled);
+}
+
 static int config_list(uint32_t key, GVariant **data,
                const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
@@ -497,6 +507,7 @@ static struct sr_dev_driver lecroy_xstream_driver_info = {
        .dev_clear = dev_clear,
        .config_get = config_get,
        .config_set = config_set,
+       .config_channel_set = config_channel_set,
        .config_list = config_list,
        .dev_open = dev_open,
        .dev_close = dev_close,