Updated: October 28, 2024 |
Register a sigevent to be signaled when an event occurs
#include <sensor/sensor_api.h>
sensor_error_t sensor_enable_event(sensor_handle_t handle, sensor_event_t event, sensor_eventmode_t mode, sensor_eventkey_t *key, struct sigevent *sigev)
This function registers a sigevent to be signaled when the specified event occurs. The mode is ignored for status events. For more information, see the sensor_register_data_callback() note about the limit on the number of data callbacks.
SENSOR_EOK when the function successfully completes, otherwise another sensor_error_t value that provides the reason that the call failed.