sensor_get_event()

Retrieve the latest event from the sensor, if available.

Synopsis:

#include <sensor/libsensor.h>
 
int sensor_get_event(sensor_t *sensor, sensor_event_t *sensor_event)

Arguments:

sensor

The sensor to access.

sensor_event

A pointer to a location where the function can store the event retrieved from the sensor.

Library:

libsensor

Description:

If the latest event isn't available, this function returns EAGAIN.

This call is non-blocking.

Returns:

EOK on success, EAGAIN if the latest event is not available, an errno value otherwise.

Last modified: 2013-12-21

comments powered by Disqus