OSDN Git Service

iio-sensors: Add infrastructure for IIO events
authorDaniel Baluta <daniel.baluta@intel.com>
Thu, 29 Jan 2015 12:16:26 +0000 (14:16 +0200)
committerDaniel Baluta <daniel.baluta@intel.com>
Fri, 6 Feb 2015 12:26:30 +0000 (14:26 +0200)
commit7dd11cd72d9d69570c0d9ed4ef7d9251d7b23ce1
tree26c95c17a7ed4bf870386331485c8f51bf5a3d4c
parent66e79fc24be5b6ba9c9a8b31b65abae0db729126
iio-sensors: Add infrastructure for IIO events

This introduces event_descriptor_t to represent an event.
Each channel can have multiple events attached.

Activating a sensor of type EVENT implies:
* retrieving associated event_fd file descriptor (see. IIO_GET_EVENT_FD_IOCTL)
* adding event_fd to the watched fds poll set
* enabling IIO event, usually writing 1 to iio:deviceX/events/in_<event_name>_en

Deactivation does the above operations in reverse order.

Change-Id: I305f28456b43ea8a662e49c2c3aa8febd0d7d84f
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
common.h
control.c
enumeration.c
enumeration.h