Linux Kernel
3.7.1
|
#include <iio.h>
Data Fields | |
const char *const * | items |
unsigned int | num_items |
int(* | set )(struct iio_dev *, const struct iio_chan_spec *, unsigned int) |
int(* | get )(struct iio_dev *, const struct iio_chan_spec *) |
struct iio_enum - Enum channel info attribute : An array of strings. : Length of the item array. : Set callback function, may be NULL. : Get callback function, may be NULL.
The iio_enum struct can be used to implement enum style channel attributes. Enum style attributes are those which have a set of strings which map to unsigned integer values. The IIO enum helper code takes care of mapping between value and string as well as generating a "_available" file which contains a list of all available items. The set callback will be called when the attribute is updated. The last parameter is the index to the newly activated item. The get callback will be used to query the currently active item and is supposed to return the index for it.