int (*finalize)(int s, struct sensors_event_t* data);
};
+/*
+ * Whenever we have sensor data recorded for a sensor in the associated
+ * sensor_info cell, its report_pending field is set to a non-zero value
+ * indicating how we got this data.
+ */
+#define DATA_TRIGGER 1 /* From /dev/iio:device fd */
+#define DATA_SYSFS 2 /* Through polling */
+#define DATA_DUPLICATE 3 /* Duplicate of triggered motion sample */
+
struct sensor_info_t
{
char friendly_name[MAX_NAME_SIZE]; /* ex: Accelerometer */
/*
* This flag is set if we acquired data from the sensor but did not
* forward it to upper layers (i.e. Android) yet. If so, report_buffer
- * contains that data.
+ * contains that data. Valid values are 0: empty, 1: normal, 2: repeat
+ * of last acquired value after timeout.
*/
int report_pending;