|
libiio 1.0
Library for interfacing with IIO devices
|

Data Structures | |
| struct | iio_event |
| Represents a IIO event. More... | |
Functions | |
| __api __check_ret const struct iio_channel * | iio_event_get_channel (const struct iio_event *event, const struct iio_device *dev, bool diff) |
| Get a pointer to the IIO channel that corresponds to this event. | |
| __api __check_ret struct iio_event_stream * | iio_device_create_event_stream (const struct iio_device *dev) |
| Create an events stream for the given IIO device. | |
| __api void | iio_event_stream_destroy (struct iio_event_stream *stream) |
| Destroy the given event stream. | |
| __api int | iio_event_stream_read (struct iio_event_stream *stream, struct iio_event *out_event, bool nonblock) |
| Read an event from the event stream. | |
| __api __check_ret struct iio_event_stream * iio_device_create_event_stream | ( | const struct iio_device * | dev | ) |
Create an events stream for the given IIO device.
| dev | A pointer to an iio_device structure |
| __api __check_ret const struct iio_channel * iio_event_get_channel | ( | const struct iio_event * | event, |
| const struct iio_device * | dev, | ||
| bool | diff | ||
| ) |
Get a pointer to the IIO channel that corresponds to this event.
| event | A pointer to an iio_event structure |
| dev | A pointer to the iio_device structure that delivered the event |
| diff | If set, retrieve the differential channel |

| __api void iio_event_stream_destroy | ( | struct iio_event_stream * | stream | ) |
Destroy the given event stream.
| stream | A pointer to an iio_event_stream structure |
| __api int iio_event_stream_read | ( | struct iio_event_stream * | stream, |
| struct iio_event * | out_event, | ||
| bool | nonblock | ||
| ) |
Read an event from the event stream.
| stream | A pointer to an iio_event_stream structure |
| out_event | An pointer to an iio_event structure, that will be filled by this function. |
| nonblock | if True, the operation won't block and return -EBUSY if there is currently no event in the queue. |
NOTE: it is possible to stop a blocking call of iio_event_stream_read by calling iio_event_stream_destroy in a different thread or signal handler. In that case, iio_event_stream_read will return -EINTR.