summaryrefslogtreecommitdiffstats
path: root/libsensors_iio/sensors.h
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2012-10-03 20:16:57 -0700
committerJP Abgrall <jpa@google.com>2012-10-03 20:16:57 -0700
commit33ce91b37062fa63af192f5643de93f3beebe854 (patch)
treeba6a03c7954a32ce23b00c6d46cd3d524f4d7007 /libsensors_iio/sensors.h
parent64ca18f95225d0a86f7ccfd1d21c23971b9f77ae (diff)
downloadandroid_hardware_invensense-33ce91b37062fa63af192f5643de93f3beebe854.tar.gz
android_hardware_invensense-33ce91b37062fa63af192f5643de93f3beebe854.tar.bz2
android_hardware_invensense-33ce91b37062fa63af192f5643de93f3beebe854.zip
1. Removed all #ifdef in HAL's member APIs. 2. Added necessary comments as reference. 3. Made changes for coding style, optimization and so on per prior comments. 4. Now raw/calibrated gyroscope sensors could co-exist Default sensor would be calibrated gyroscope sensor for getDefaultSensor() call in Android. * Correctly handle onPower()/masterEnable(). * Use the support functions for reading/writing sysfs. 1 line instead of 9 all over the place. * Fix return code for {read,write}_sysfs_int(): was > 0 in case of failure instead of < 0. Bug: 7211625 Change-Id: Ib49dab8ca0f48f45a2838de72f4f8ac011d0e68f
Diffstat (limited to 'libsensors_iio/sensors.h')
-rw-r--r--libsensors_iio/sensors.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/libsensors_iio/sensors.h b/libsensors_iio/sensors.h
index 0556c10..7264043 100644
--- a/libsensors_iio/sensors.h
+++ b/libsensors_iio/sensors.h
@@ -36,6 +36,20 @@ __BEGIN_DECLS
#endif
#define ID_MPL_BASE (0)
+
+enum {
+ ID_GY = ID_MPL_BASE,
+ ID_RG,
+ ID_A,
+ ID_M,
+ ID_O,
+ ID_RV,
+ ID_LA,
+ ID_GR,
+ ID_SO
+};
+
+/*
#define ID_GY (ID_MPL_BASE)
#define ID_A (ID_GY + 1)
#define ID_M (ID_A + 1)
@@ -43,15 +57,6 @@ __BEGIN_DECLS
#define ID_RV (ID_O + 1)
#define ID_LA (ID_RV + 1)
#define ID_GR (ID_LA + 1)
-
-/*#define ID_MPL_BASE (0)
-#define ID_RV (ID_MPL_BASE)
-#define ID_LA (ID_RV + 1)
-#define ID_GR (ID_LA + 1)
-#define ID_GY (ID_GR + 1)
-#define ID_A (ID_GY + 1)
-#define ID_M (ID_A + 1)
-#define ID_O (ID_M + 1)
*/
/*****************************************************************************/