Lines Matching refs:chan
105 mraa_iio_channel* chan; in mraa_iio_get_channel_data() local
118 chan = &dev->channels[chan_num]; in mraa_iio_get_channel_data()
119 chan->index = chan_num; in mraa_iio_get_channel_data()
129 ret = sscanf(readbuf, "%ce:%c%u/%u>>%u", &shortbuf, &signchar, &chan->bits_used, in mraa_iio_get_channel_data()
130 &padint, &chan->shift); in mraa_iio_get_channel_data()
131 chan->bytes = padint / 8; in mraa_iio_get_channel_data()
132 if (curr_bytes % chan->bytes == 0) { in mraa_iio_get_channel_data()
133 chan->location = curr_bytes; in mraa_iio_get_channel_data()
135 chan->location = curr_bytes - curr_bytes % chan->bytes + chan->bytes; in mraa_iio_get_channel_data()
137 curr_bytes = chan->location + chan->bytes; in mraa_iio_get_channel_data()
145 chan->signedd = (signchar == 's'); in mraa_iio_get_channel_data()
146 chan->lendian = (shortbuf == 'l'); in mraa_iio_get_channel_data()
147 if (chan->bits_used == 64) { in mraa_iio_get_channel_data()
148 chan->mask = ~0; in mraa_iio_get_channel_data()
150 chan->mask = (1 << chan->bits_used) - 1; in mraa_iio_get_channel_data()
164 chan->enabled = (int) strtol(readbuf, NULL, 10); in mraa_iio_get_channel_data()
166 if (chan->enabled) { in mraa_iio_get_channel_data()
167 dev->datasize += chan->bytes; in mraa_iio_get_channel_data()
591 mraa_iio_channel* chan; in mraa_iio_update_channels() local
609 chan = &dev->channels[chan_num]; in mraa_iio_update_channels()
610 chan->index = chan_num; in mraa_iio_update_channels()
626 chan->enabled = (int) strtol(readbuf, NULL, 10); in mraa_iio_update_channels()
628 if (chan->enabled) { in mraa_iio_update_channels()
629 dev->datasize += chan->bytes; in mraa_iio_update_channels()