Add sdi pointer to struct sr_channel.

This commit is contained in:
Martin Ling 2015-03-19 21:41:51 +00:00
parent 5e23fcab88
commit 837b08660a
2 changed files with 3 additions and 0 deletions

View 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;

View 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;