struct iio_chan_spec — specification of a single channel
struct iio_chan_spec { enum iio_chan_type type; int channel; int channel2; unsigned long address; int scan_index; struct scan_type; long info_mask_separate; long info_mask_shared_by_type; long info_mask_shared_by_dir; long info_mask_shared_by_all; const struct iio_event_spec * event_spec; unsigned int num_event_specs; const struct iio_chan_spec_ext_info * ext_info; const char * extend_name; const char * datasheet_name; unsigned modified:1; unsigned indexed:1; unsigned output:1; unsigned differential:1; };
What type of measurement is the channel making.
What number do we wish to assign the channel.
If there is a second number for a differential channel then this is it. If modified is set then the value here specifies the modifier.
Driver specific identifier.
Monotonic index to give ordering in scans when read from a buffer.
Sign: 's' or 'u' to specify signed or unsigned
What information is to be exported that is specific to this channel.
What information is to be exported that is shared by all channels of the same type.
What information is to be exported that is shared by all channels of the same direction.
What information is to be exported that is shared by all channels.
Array of events which should be registered for this channel.
Size of the event_spec array.
Array of extended info attributes for this channel. The array is NULL terminated, the last element should have its name field set to NULL.
Allows labeling of channel attributes with an informative name. Note this has no effect codes etc, unlike modifiers.
A name used in in-kernel mapping of channels. It should correspond to the first name that the channel is referred to by in the datasheet (e.g. IND), or the nearest possible compound name (e.g. IND-INC).
Does a modifier apply to this channel. What these are depends on the channel type. Modifier is set in channel2. Examples are IIO_MOD_X for axial sensors about the 'x' axis.
Specify the channel has a numerical index. If not, the channel index number will be suppressed for sysfs attributes but not for event codes.
Channel is output.
Channel is differential.