aboutsummaryrefslogtreecommitdiffstats
path: root/libsensors
diff options
context:
space:
mode:
authorZiyan <jaraidaniel@gmail.com>2015-08-12 21:59:04 +0200
committerAndreas Blaesius <skate4life@gmx.de>2015-08-15 14:23:14 -0700
commitc0befab5818c9aebd211e1806c88a339cfeb776c (patch)
tree9c8d16ce1d8d84da43d0f5abfe00dfa923b723e0 /libsensors
parent795af716f8e0db0c7f6590c127bac8c404579987 (diff)
downloaddevice_samsung_espressowifi-c0befab5818c9aebd211e1806c88a339cfeb776c.zip
device_samsung_espressowifi-c0befab5818c9aebd211e1806c88a339cfeb776c.tar.gz
device_samsung_espressowifi-c0befab5818c9aebd211e1806c88a339cfeb776c.tar.bz2
espresso-common: libsensors: exclude proximity from P3110 builds
Change-Id: I7e843b6a90fd6c9b79e8c6d0a4305d1fc0b5fe0a
Diffstat (limited to 'libsensors')
-rw-r--r--libsensors/Android.mk2
-rw-r--r--libsensors/piranha_sensors.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/libsensors/Android.mk b/libsensors/Android.mk
index 39cc493..f916e27 100644
--- a/libsensors/Android.mk
+++ b/libsensors/Android.mk
@@ -45,7 +45,7 @@ ifeq ($(TARGET_DEVICE),p5110)
LOCAL_CFLAGS += -DTARGET_DEVICE_P5100
endif
ifeq ($(TARGET_DEVICE),p3100)
- LOCAL_CFLAGS += -DTARGET_DEVICE_P3100
+ LOCAL_CFLAGS += -DTARGET_DEVICE_P3100 -DTARGET_HAS_PROXIMITY_SENSOR
endif
ifeq ($(TARGET_DEVICE),p3110)
LOCAL_CFLAGS += -DTARGET_DEVICE_P3100
diff --git a/libsensors/piranha_sensors.c b/libsensors/piranha_sensors.c
index 7474b33..4ab6943 100644
--- a/libsensors/piranha_sensors.c
+++ b/libsensors/piranha_sensors.c
@@ -53,6 +53,8 @@ struct sensor_t piranha_sensors[] = {
{ "GP2A Light Sensor", "Sharp", 1, SENSOR_TYPE_LIGHT,
SENSOR_TYPE_LIGHT, 0.0f, 0.0f, 0.0f, 0,
0, 0, 0, 0, 0, SENSOR_FLAG_CONTINUOUS_MODE, {0}, },
+#endif
+#ifdef TARGET_HAS_PROXIMITY_SENSOR
{ "GP2A Proximity Sensor", "Sharp", 1, SENSOR_TYPE_PROXIMITY,
SENSOR_TYPE_PROXIMITY, 5.0f, 0.0f, 0.0f, 0,
0, 0, 0, 0, 0, SENSOR_FLAG_WAKE_UP | SENSOR_FLAG_ON_CHANGE_MODE, {0}, },
@@ -70,6 +72,8 @@ struct piranha_sensors_handlers *piranha_sensors_handlers[] = {
#endif
#ifdef TARGET_DEVICE_P3100
&gp2a_light,
+#endif
+#ifdef TARGET_HAS_PROXIMITY_SENSOR
&gp2a_proximity,
#endif
};