Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: libserialport libxml2
Diff: channel.c
- Revision:
- 4:ad69b39bf124
- Parent:
- 3:d147beabba0e
--- a/channel.c Mon Jan 30 13:00:39 2017 +0000 +++ b/channel.c Mon Jun 26 14:30:10 2017 +0000 @@ -395,19 +395,19 @@ bool iio_channel_is_enabled(const struct iio_channel *chn) { return chn->index >= 0 && chn->dev->mask && - TEST_BIT(chn->dev->mask, chn->index); + TEST_BIT(chn->dev->mask, chn->number); } void iio_channel_enable(struct iio_channel *chn) { if (chn->is_scan_element && chn->index >= 0 && chn->dev->mask) - SET_BIT(chn->dev->mask, chn->index); + SET_BIT(chn->dev->mask, chn->number); } void iio_channel_disable(struct iio_channel *chn) { if (chn->index >= 0 && chn->dev->mask) - CLEAR_BIT(chn->dev->mask, chn->index); + CLEAR_BIT(chn->dev->mask, chn->number); } void free_channel(struct iio_channel *chn)