OSDN Git Service

[REVERTME] Revert "Pass iio provided timestamps without further processing."
[android-x86/hardware-intel-libsensors.git] / description.h
index 8807122..2e62673 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Intel Corporation.
+ * Copyright (C) 2014-2015 Intel Corporation.
  */
 
 #ifndef __DESCRIPTION_H__
@@ -7,25 +7,37 @@
 
 #include "common.h"
 
-#define QUIRK_ALREADY_DECODED  0x01  /* Sensor quirks have been read       */
-#define QUIRK_INITIAL_RATE     0x02  /* Force initial sensor sampling rate */
-#define QUIRK_FIELD_ORDERING   0x04
-#define QUIRK_TERSE_DRIVER     0x08  /* Force duplicate events generation  */
-#define QUIRK_NOISY            0x10  /* High noise level on readings       */
-
-char*  sensor_get_name         (int handle);
-char*  sensor_get_vendor       (int handle);
-int    sensor_get_version      (int handle);
-float  sensor_get_max_range    (int handle);
-float  sensor_get_resolution   (int handle);
-float  sensor_get_power        (int handle);
-float  sensor_get_illumincalib (int handle);
-
-int            sensor_get_fl_prop (int s, const char* sel, float* val);
-
-int            sensor_get_order        (int s, unsigned char map[MAX_CHANNELS]);
+#define QUIRK_ALREADY_DECODED  0x01  /* Sensor quirks have been read         */
+#define QUIRK_INITIAL_RATE     0x02  /* Force initial sensor sampling rate   */
+#define QUIRK_FIELD_ORDERING   0x04  /* Do field remapping for this sensor   */
+#define QUIRK_TERSE_DRIVER     0x08  /* Force duplicate events generation    */
+#define QUIRK_NOISY            0x10  /* High noise level on readings         */
+#define QUIRK_FORCE_CONTINUOUS 0x20  /* Force usage of continuous trigger    */
+
+#ifdef __LP64__
+       typedef uint64_t        flag_t;
+       typedef int64_t         max_delay_t;
+#else
+       typedef uint32_t        flag_t;
+       typedef int32_t         max_delay_t;
+#endif
 
-char* sensor_get_string_type(int s);
-flag_t sensor_get_flags (int s);
+char*          sensor_get_name         (int s);
+char*          sensor_get_vendor       (int s);
+int            sensor_get_version      (int s);
+float          sensor_get_max_range    (int s);
+float          sensor_get_resolution   (int s);
+float          sensor_get_power        (int s);
+flag_t         sensor_get_flags        (int s);
+int32_t                sensor_get_min_delay    (int s);
+max_delay_t    sensor_get_max_delay    (int s);
+float          sensor_get_illumincalib (int s);
+uint32_t       sensor_get_quirks       (int s);
+int            sensor_get_prop         (int s, const char* sel, int* val);
+int            sensor_get_fl_prop      (int s, const char* sel, float* val);
+int            sensor_get_order        (int s,unsigned char map[MAX_CHANNELS]);
+int            sensor_get_cal_steps    (int s);
+char*          sensor_get_string_type  (int s);
+int            sensor_get_st_prop      (int s, const char* sel, char val[MAX_NAME_SIZE]);
 
 #endif