]> sigrok.org Git - libsigrok.git/commitdiff
Add sdi pointer to struct sr_channel.
authorMartin Ling <redacted>
Thu, 19 Mar 2015 21:41:51 +0000 (21:41 +0000)
committerMartin Ling <redacted>
Thu, 19 Mar 2015 21:41:51 +0000 (21:41 +0000)
include/libsigrok/libsigrok.h
src/device.c

index 662e986e56df88995d73a65401823ab588ea4701..0ea67af6769b92f48e03a7ffc8c4691669ddbd0a 100644 (file)
@@ -531,6 +531,8 @@ enum sr_channeltype {
 
 /** Information on single channel. */
 struct sr_channel {
+       /** The device this channel is attached to. */
+       struct sr_dev_inst *sdi;
        /** The index of this channel, starting at 0. Logic channels will
         * be encoded according to this index in SR_DF_LOGIC packets. */
        int index;
index 1c84a7df48d6823f03543f6c580ffe72f94dd5ad..78835d4c9709bdf9c2b02169130875809d1c6013 100644 (file)
@@ -57,6 +57,7 @@ SR_PRIV struct sr_channel *sr_channel_new(struct sr_dev_inst *sdi,
        struct sr_channel *ch;
 
        ch = g_malloc0(sizeof(struct sr_channel));
+       ch->sdi = sdi;
        ch->index = index;
        ch->type = type;
        ch->enabled = enabled;