sensor_wait_event()
Wait for the latest event from the sensor.
Synopsis:
#include <sensor/libsensor.h>
int sensor_wait_event(sensor_t *sensor, sensor_event_t *sensor_event, struct timeval *timeout)
Arguments:
- sensor
-
The sensor to access.
- sensor_event
-
A pointer to a location where the function can store the event retrieved from the sensor.
- timeout
-
Pass a timeval to unblock after a certain period of time has elapsed, or pass NULL to block indefinitely.
Library:
libsensorDescription:
This call will block until either data is available, or until the specified timeout period has passed. If timeout is NULL, this call will block indefinitely.
Returns:
EOK on success, an errno value otherwise.