summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle Repinski <repinski23@gmail.com>2015-12-02 12:32:39 -0600
committerZiyan <jaraidaniel@gmail.com>2016-01-17 22:41:00 +0100
commit153b50ec9714ff4ba6ce083ca0d49fd31658ce15 (patch)
tree8dab0e630a39552385d42a266ba39dfdaf837752
parentb8515d8e0376e300ed17598f0288fad0e6ae0d89 (diff)
downloaddevice_samsung_tuna-153b50ec9714ff4ba6ce083ca0d49fd31658ce15.tar.gz
device_samsung_tuna-153b50ec9714ff4ba6ce083ca0d49fd31658ce15.tar.bz2
device_samsung_tuna-153b50ec9714ff4ba6ce083ca0d49fd31658ce15.zip
sensors: Merge invensense HAL into main tuna HAL.
Since these are both in our device tree now, there's no need to have them be separated. This saves about 14KB of space as well. Change-Id: Ibfcd7da4b30bb261586ecd9373e6fd4a343e0e06
-rwxr-xr-xdevice.mk4
-rw-r--r--invensense/Android.mk1
-rw-r--r--invensense/libinvensense_hal/Android.mk42
-rw-r--r--invensense/libinvensense_hal/sensors.h53
-rw-r--r--invensense/mlsdk/Android.mk76
-rw-r--r--libsensors/Android.mk22
-rw-r--r--libsensors/MPLSensor.cpp (renamed from invensense/libinvensense_hal/MPLSensor.cpp)0
-rw-r--r--libsensors/MPLSensor.h (renamed from invensense/libinvensense_hal/MPLSensor.h)0
-rw-r--r--libsensors/SensorBase.cpp (renamed from invensense/libinvensense_hal/SensorBase.cpp)0
-rw-r--r--libsensors/SensorBase.h (renamed from invensense/libinvensense_hal/SensorBase.h)0
-rw-r--r--libsensors/mlsdk/Android.mk76
-rw-r--r--libsensors/mlsdk/mllite/accel.c (renamed from invensense/mlsdk/mllite/accel.c)0
-rw-r--r--libsensors/mlsdk/mllite/accel.h (renamed from invensense/mlsdk/mllite/accel.h)0
-rw-r--r--libsensors/mlsdk/mllite/compass.c (renamed from invensense/mlsdk/mllite/compass.c)0
-rw-r--r--libsensors/mlsdk/mllite/compass.h (renamed from invensense/mlsdk/mllite/compass.h)0
-rw-r--r--libsensors/mlsdk/mllite/dmpDefault.c (renamed from invensense/mlsdk/mllite/dmpDefault.c)0
-rw-r--r--libsensors/mlsdk/mllite/dmpDefault.h (renamed from invensense/mlsdk/mllite/dmpDefault.h)0
-rw-r--r--libsensors/mlsdk/mllite/dmpDefaultMantis.c (renamed from invensense/mlsdk/mllite/dmpDefaultMantis.c)0
-rw-r--r--libsensors/mlsdk/mllite/dmpKey.h (renamed from invensense/mlsdk/mllite/dmpKey.h)0
-rw-r--r--libsensors/mlsdk/mllite/dmpconfig.txt (renamed from invensense/mlsdk/mllite/dmpconfig.txt)0
-rw-r--r--libsensors/mlsdk/mllite/dmpmap.h (renamed from invensense/mlsdk/mllite/dmpmap.h)0
-rw-r--r--libsensors/mlsdk/mllite/invensense.h (renamed from invensense/mlsdk/mllite/invensense.h)0
-rw-r--r--libsensors/mlsdk/mllite/ml.c (renamed from invensense/mlsdk/mllite/ml.c)0
-rw-r--r--libsensors/mlsdk/mllite/ml.h (renamed from invensense/mlsdk/mllite/ml.h)0
-rw-r--r--libsensors/mlsdk/mllite/mlBiasNoMotion.c (renamed from invensense/mlsdk/mllite/mlBiasNoMotion.c)0
-rw-r--r--libsensors/mlsdk/mllite/mlBiasNoMotion.h (renamed from invensense/mlsdk/mllite/mlBiasNoMotion.h)0
-rw-r--r--libsensors/mlsdk/mllite/mlFIFO.c (renamed from invensense/mlsdk/mllite/mlFIFO.c)0
-rw-r--r--libsensors/mlsdk/mllite/mlFIFO.h (renamed from invensense/mlsdk/mllite/mlFIFO.h)0
-rw-r--r--libsensors/mlsdk/mllite/mlFIFOHW.c (renamed from invensense/mlsdk/mllite/mlFIFOHW.c)0
-rw-r--r--libsensors/mlsdk/mllite/mlFIFOHW.h (renamed from invensense/mlsdk/mllite/mlFIFOHW.h)0
-rw-r--r--libsensors/mlsdk/mllite/mlMathFunc.c (renamed from invensense/mlsdk/mllite/mlMathFunc.c)0
-rw-r--r--libsensors/mlsdk/mllite/mlMathFunc.h (renamed from invensense/mlsdk/mllite/mlMathFunc.h)0
-rw-r--r--libsensors/mlsdk/mllite/mlSetGyroBias.c (renamed from invensense/mlsdk/mllite/mlSetGyroBias.c)0
-rw-r--r--libsensors/mlsdk/mllite/mlSetGyroBias.h (renamed from invensense/mlsdk/mllite/mlSetGyroBias.h)0
-rw-r--r--libsensors/mlsdk/mllite/ml_mputest.c (renamed from invensense/mlsdk/mllite/ml_mputest.c)0
-rw-r--r--libsensors/mlsdk/mllite/ml_mputest.h (renamed from invensense/mlsdk/mllite/ml_mputest.h)0
-rw-r--r--libsensors/mlsdk/mllite/ml_stored_data.c (renamed from invensense/mlsdk/mllite/ml_stored_data.c)0
-rw-r--r--libsensors/mlsdk/mllite/ml_stored_data.h (renamed from invensense/mlsdk/mllite/ml_stored_data.h)0
-rw-r--r--libsensors/mlsdk/mllite/mlarray.c (renamed from invensense/mlsdk/mllite/mlarray.c)0
-rw-r--r--libsensors/mlsdk/mllite/mlarray_legacy.c (renamed from invensense/mlsdk/mllite/mlarray_legacy.c)0
-rw-r--r--libsensors/mlsdk/mllite/mlcontrol.c (renamed from invensense/mlsdk/mllite/mlcontrol.c)0
-rw-r--r--libsensors/mlsdk/mllite/mlcontrol.h (renamed from invensense/mlsdk/mllite/mlcontrol.h)0
-rw-r--r--libsensors/mlsdk/mllite/mldl.c (renamed from invensense/mlsdk/mllite/mldl.c)0
-rw-r--r--libsensors/mlsdk/mllite/mldl.h (renamed from invensense/mlsdk/mllite/mldl.h)0
-rw-r--r--libsensors/mlsdk/mllite/mldl_cfg.h (renamed from invensense/mlsdk/mllite/mldl_cfg.h)0
-rw-r--r--libsensors/mlsdk/mllite/mldl_cfg_mpu.c (renamed from invensense/mlsdk/mllite/mldl_cfg_mpu.c)0
-rw-r--r--libsensors/mlsdk/mllite/mldmp.c (renamed from invensense/mlsdk/mllite/mldmp.c)0
-rw-r--r--libsensors/mlsdk/mllite/mldmp.h (renamed from invensense/mlsdk/mllite/mldmp.h)0
-rw-r--r--libsensors/mlsdk/mllite/mlinclude.h (renamed from invensense/mlsdk/mllite/mlinclude.h)0
-rw-r--r--libsensors/mlsdk/mllite/mlstates.c (renamed from invensense/mlsdk/mllite/mlstates.c)0
-rw-r--r--libsensors/mlsdk/mllite/mlstates.h (renamed from invensense/mlsdk/mllite/mlstates.h)0
-rw-r--r--libsensors/mlsdk/mllite/mlsupervisor.c (renamed from invensense/mlsdk/mllite/mlsupervisor.c)0
-rw-r--r--libsensors/mlsdk/mllite/mlsupervisor.h (renamed from invensense/mlsdk/mllite/mlsupervisor.h)0
-rw-r--r--libsensors/mlsdk/mllite/pressure.c (renamed from invensense/mlsdk/mllite/pressure.c)0
-rw-r--r--libsensors/mlsdk/mllite/pressure.h (renamed from invensense/mlsdk/mllite/pressure.h)0
-rw-r--r--libsensors/mlsdk/mlutils/checksum.c (renamed from invensense/mlsdk/mlutils/checksum.c)0
-rw-r--r--libsensors/mlsdk/mlutils/checksum.h (renamed from invensense/mlsdk/mlutils/checksum.h)0
-rw-r--r--libsensors/mlsdk/mlutils/mputest.c (renamed from invensense/mlsdk/mlutils/mputest.c)0
-rw-r--r--libsensors/mlsdk/mlutils/mputest.h (renamed from invensense/mlsdk/mlutils/mputest.h)0
-rw-r--r--libsensors/mlsdk/mlutils/slave.h (renamed from invensense/mlsdk/mlutils/slave.h)0
-rw-r--r--libsensors/mlsdk/platform/include/i2c.h (renamed from invensense/mlsdk/platform/include/i2c.h)0
-rw-r--r--libsensors/mlsdk/platform/include/linux/mpu.h (renamed from invensense/mlsdk/platform/include/linux/mpu.h)0
-rw-r--r--libsensors/mlsdk/platform/include/log.h (renamed from invensense/mlsdk/platform/include/log.h)0
-rw-r--r--libsensors/mlsdk/platform/include/mlmath.h (renamed from invensense/mlsdk/platform/include/mlmath.h)0
-rw-r--r--libsensors/mlsdk/platform/include/mlos.h (renamed from invensense/mlsdk/platform/include/mlos.h)0
-rw-r--r--libsensors/mlsdk/platform/include/mlsl.h (renamed from invensense/mlsdk/platform/include/mlsl.h)0
-rw-r--r--libsensors/mlsdk/platform/include/mltypes.h (renamed from invensense/mlsdk/platform/include/mltypes.h)0
-rw-r--r--libsensors/mlsdk/platform/include/mpu3050.h (renamed from invensense/mlsdk/platform/include/mpu3050.h)0
-rw-r--r--libsensors/mlsdk/platform/include/stdint_invensense.h (renamed from invensense/mlsdk/platform/include/stdint_invensense.h)0
-rw-r--r--libsensors/mlsdk/platform/linux/kernel/mpuirq.h (renamed from invensense/mlsdk/platform/linux/kernel/mpuirq.h)0
-rw-r--r--libsensors/mlsdk/platform/linux/kernel/slaveirq.h (renamed from invensense/mlsdk/platform/linux/kernel/slaveirq.h)0
-rw-r--r--libsensors/mlsdk/platform/linux/kernel/timerirq.h (renamed from invensense/mlsdk/platform/linux/kernel/timerirq.h)0
-rw-r--r--libsensors/mlsdk/platform/linux/log_linux.c (renamed from invensense/mlsdk/platform/linux/log_linux.c)0
-rw-r--r--libsensors/mlsdk/platform/linux/log_printf_linux.c (renamed from invensense/mlsdk/platform/linux/log_printf_linux.c)0
-rw-r--r--libsensors/mlsdk/platform/linux/mlos_linux.c (renamed from invensense/mlsdk/platform/linux/mlos_linux.c)0
-rw-r--r--libsensors/mlsdk/platform/linux/mlsl_linux_mpu.c (renamed from invensense/mlsdk/platform/linux/mlsl_linux_mpu.c)0
-rw-r--r--libsensors/sensor_params.h (renamed from invensense/libinvensense_hal/sensor_params.h)0
-rw-r--r--libsensors/sensors.h15
78 files changed, 105 insertions, 184 deletions
diff --git a/device.mk b/device.mk
index b5ad8b1..4ac86bb 100755
--- a/device.mk
+++ b/device.mk
@@ -45,10 +45,6 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
libsecril-client
-# Sensors
-PRODUCT_PACKAGES += \
- libinvensense_mpl
-
# Charging mode
PRODUCT_PACKAGES += \
charger_res_images
diff --git a/invensense/Android.mk b/invensense/Android.mk
deleted file mode 100644
index 9b79479..0000000
--- a/invensense/Android.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(call all-named-subdir-makefiles,mlsdk libinvensense_hal)
diff --git a/invensense/libinvensense_hal/Android.mk b/invensense/libinvensense_hal/Android.mk
deleted file mode 100644
index 33e0e2f..0000000
--- a/invensense/libinvensense_hal/Android.mk
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright (C) 2008 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# Modified 2011 by InvenSense, Inc
-
-LOCAL_PATH := $(call my-dir)
-
-# InvenSense fragment of the HAL
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libinvensense_hal.$(TARGET_BOOTLOADER_BOARD_NAME)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -DLOG_TAG=\"Sensors\" -Werror -Wall
-
-LOCAL_SRC_FILES := SensorBase.cpp MPLSensor.cpp
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/../mlsdk/platform/include \
- $(LOCAL_PATH)/../mlsdk/platform/include/linux \
- $(LOCAL_PATH)/../mlsdk/platform/linux \
- $(LOCAL_PATH)/../mlsdk/mllite \
- $(LOCAL_PATH)/../mlsdk/mldmp \
- $(LOCAL_PATH)/../mlsdk/external/aichi \
- $(LOCAL_PATH)/../mlsdk/external/akmd
-
-LOCAL_SHARED_LIBRARIES := liblog libcutils libutils libdl libmllite libmlplatform
-LOCAL_CPPFLAGS := -DLINUX=1
-LOCAL_LDFLAGS := -rdynamic
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/invensense/libinvensense_hal/sensors.h b/invensense/libinvensense_hal/sensors.h
deleted file mode 100644
index 730c14a..0000000
--- a/invensense/libinvensense_hal/sensors.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_SENSORS_H
-#define ANDROID_SENSORS_H
-
-#include <stdint.h>
-#include <errno.h>
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <linux/input.h>
-
-#include <hardware/hardware.h>
-#include <hardware/sensors.h>
-
-__BEGIN_DECLS
-
-/*****************************************************************************/
-
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
-
-#define ID_MPL_BASE (0)
-#define ID_GY (ID_MPL_BASE)
-#define ID_A (ID_GY + 1)
-#define ID_M (ID_A + 1)
-#define ID_O (ID_M + 1)
-#define ID_RV (ID_O + 1)
-#define ID_LA (ID_RV + 1)
-#define ID_GR (ID_LA + 1)
-
-/*****************************************************************************/
-
-/*
- * The SENSORS Module
- */
-
-__END_DECLS
-
-#endif // ANDROID_SENSORS_H
diff --git a/invensense/mlsdk/Android.mk b/invensense/mlsdk/Android.mk
deleted file mode 100644
index 3371c1a..0000000
--- a/invensense/mlsdk/Android.mk
+++ /dev/null
@@ -1,76 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE := libmlplatform
-
-LOCAL_CFLAGS := -D_REENTRANT -DLINUX -DANDROID
-LOCAL_CFLAGS += -Wall -Werror
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/platform/include \
- $(LOCAL_PATH)/platform/include/linux \
- $(LOCAL_PATH)/platform/linux \
- $(LOCAL_PATH)/platform/linux/kernel \
- $(LOCAL_PATH)/mllite
-
-LOCAL_SRC_FILES := \
- platform/linux/mlos_linux.c \
- platform/linux/mlsl_linux_mpu.c
-
-LOCAL_SHARED_LIBRARIES := liblog libm libutils libcutils
-include $(BUILD_SHARED_LIBRARY)
-
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libmllite
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -DNDEBUG -D_REENTRANT -DLINUX -DANDROID
-LOCAL_CFLAGS += -DUNICODE -D_UNICODE -DSK_RELEASE
-LOCAL_CFLAGS += -DI2CDEV=\"/dev/mpu\"
-LOCAL_CFLAGS += -Wall -Werror
-
-# optionally apply the compass filter. this is set in
-# BoardConfig.mk
-ifeq ($(BOARD_INVENSENSE_APPLY_COMPASS_NOISE_FILTER),true)
- LOCAL_CFLAGS += -DAPPLY_COMPASS_FILTER
-endif
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/mldmp \
- $(LOCAL_PATH)/mllite \
- $(LOCAL_PATH)/platform/include \
- $(LOCAL_PATH)/platform/include/linux \
- $(LOCAL_PATH)/mlutils \
- $(LOCAL_PATH)/mlapps/common \
- $(LOCAL_PATH)/mllite/akmd \
- $(LOCAL_PATH)/platform/linux
-
-LOCAL_SRC_FILES := \
- mllite/accel.c \
- mllite/compass.c \
- mllite/pressure.c \
- mllite/mldl_cfg_mpu.c \
- mllite/dmpDefault.c \
- mllite/ml.c \
- mllite/mlarray.c \
- mllite/mlarray_legacy.c \
- mllite/mlFIFO.c \
- mllite/mlFIFOHW.c \
- mllite/mlMathFunc.c \
- mllite/ml_stored_data.c \
- mllite/mlcontrol.c \
- mllite/mldl.c \
- mllite/mldmp.c \
- mllite/mlstates.c \
- mllite/mlsupervisor.c \
- mllite/mlBiasNoMotion.c \
- mllite/mlSetGyroBias.c \
- mllite/ml_mputest.c \
- mlutils/mputest.c \
- mlutils/checksum.c
-
-LOCAL_SHARED_LIBRARIES := libm libutils libcutils liblog libmlplatform
-include $(BUILD_SHARED_LIBRARY)
diff --git a/libsensors/Android.mk b/libsensors/Android.mk
index 98d03b0..2d2d274 100644
--- a/libsensors/Android.mk
+++ b/libsensors/Android.mk
@@ -11,10 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
-
LOCAL_PATH := $(call my-dir)
+include $(call all-named-subdir-makefiles,mlsdk)
+
# HAL module implemenation stored in
# hw/<SENSORS_HARDWARE_MODULE_ID>.<ro.product.board>.so
include $(CLEAR_VARS)
@@ -25,10 +25,19 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_MODULE_TAGS := optional
-LOCAL_CFLAGS := -DLOG_TAG=\"Sensors\"
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../invensense/libinvensense_hal/
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH)/mlsdk/platform/include \
+ $(LOCAL_PATH)/mlsdk/platform/include/linux \
+ $(LOCAL_PATH)/mlsdk/platform/linux \
+ $(LOCAL_PATH)/mlsdk/mllite \
+ $(LOCAL_PATH)/mlsdk/mldmp \
+ $(LOCAL_PATH)/mlsdk/external/aichi \
+ $(LOCAL_PATH)/mlsdk/external/akmd
+
LOCAL_SRC_FILES := \
sensors.cpp \
+ SensorBase.cpp \
+ MPLSensor.cpp \
InputEventReader.cpp \
LightSensor.cpp \
ProximitySensor.cpp \
@@ -36,7 +45,10 @@ LOCAL_SRC_FILES := \
SamsungSensorBase.cpp \
TemperatureSensor.cpp
-LOCAL_SHARED_LIBRARIES := libinvensense_hal.$(TARGET_BOOTLOADER_BOARD_NAME) liblog libcutils libutils libdl
+LOCAL_SHARED_LIBRARIES := liblog libcutils libutils libdl libmllite libmlplatform
+LOCAL_CFLAGS := -DLOG_TAG=\"Sensors\"
+LOCAL_CPPFLAGS := -DLINUX=1
+LOCAL_LDFLAGS := -rdynamic
LOCAL_CLANG := true
LOCAL_CFLAGS += -Wall -Werror
diff --git a/invensense/libinvensense_hal/MPLSensor.cpp b/libsensors/MPLSensor.cpp
index ca08ad5..ca08ad5 100644
--- a/invensense/libinvensense_hal/MPLSensor.cpp
+++ b/libsensors/MPLSensor.cpp
diff --git a/invensense/libinvensense_hal/MPLSensor.h b/libsensors/MPLSensor.h
index ea72c72..ea72c72 100644
--- a/invensense/libinvensense_hal/MPLSensor.h
+++ b/libsensors/MPLSensor.h
diff --git a/invensense/libinvensense_hal/SensorBase.cpp b/libsensors/SensorBase.cpp
index 6d6ab25..6d6ab25 100644
--- a/invensense/libinvensense_hal/SensorBase.cpp
+++ b/libsensors/SensorBase.cpp
diff --git a/invensense/libinvensense_hal/SensorBase.h b/libsensors/SensorBase.h
index eb50550..eb50550 100644
--- a/invensense/libinvensense_hal/SensorBase.h
+++ b/libsensors/SensorBase.h
diff --git a/libsensors/mlsdk/Android.mk b/libsensors/mlsdk/Android.mk
new file mode 100644
index 0000000..d8c0724
--- /dev/null
+++ b/libsensors/mlsdk/Android.mk
@@ -0,0 +1,76 @@
+MLSDK_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_MODULE := libmlplatform
+
+LOCAL_CFLAGS := -D_REENTRANT -DLINUX -DANDROID
+LOCAL_CFLAGS += -Wall -Werror
+
+LOCAL_C_INCLUDES := \
+ $(MLSDK_PATH)/platform/include \
+ $(MLSDK_PATH)/platform/include/linux \
+ $(MLSDK_PATH)/platform/linux \
+ $(MLSDK_PATH)/platform/linux/kernel \
+ $(MLSDK_PATH)/mllite
+
+LOCAL_SRC_FILES := \
+ mlsdk/platform/linux/mlos_linux.c \
+ mlsdk/platform/linux/mlsl_linux_mpu.c
+
+LOCAL_SHARED_LIBRARIES := liblog libm libutils libcutils
+include $(BUILD_SHARED_LIBRARY)
+
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libmllite
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_CFLAGS := -DNDEBUG -D_REENTRANT -DLINUX -DANDROID
+LOCAL_CFLAGS += -DUNICODE -D_UNICODE -DSK_RELEASE
+LOCAL_CFLAGS += -DI2CDEV=\"/dev/mpu\"
+LOCAL_CFLAGS += -Wall -Werror
+
+# optionally apply the compass filter. this is set in
+# BoardConfig.mk
+ifeq ($(BOARD_INVENSENSE_APPLY_COMPASS_NOISE_FILTER),true)
+ LOCAL_CFLAGS += -DAPPLY_COMPASS_FILTER
+endif
+
+LOCAL_C_INCLUDES := \
+ $(MLSDK_PATH)/mldmp \
+ $(MLSDK_PATH)/mllite \
+ $(MLSDK_PATH)/platform/include \
+ $(MLSDK_PATH)/platform/include/linux \
+ $(MLSDK_PATH)/mlutils \
+ $(MLSDK_PATH)/mlapps/common \
+ $(MLSDK_PATH)/mllite/akmd \
+ $(MLSDK_PATH)/platform/linux
+
+LOCAL_SRC_FILES := \
+ mlsdk/mllite/accel.c \
+ mlsdk/mllite/compass.c \
+ mlsdk/mllite/pressure.c \
+ mlsdk/mllite/mldl_cfg_mpu.c \
+ mlsdk/mllite/dmpDefault.c \
+ mlsdk/mllite/ml.c \
+ mlsdk/mllite/mlarray.c \
+ mlsdk/mllite/mlarray_legacy.c \
+ mlsdk/mllite/mlFIFO.c \
+ mlsdk/mllite/mlFIFOHW.c \
+ mlsdk/mllite/mlMathFunc.c \
+ mlsdk/mllite/ml_stored_data.c \
+ mlsdk/mllite/mlcontrol.c \
+ mlsdk/mllite/mldl.c \
+ mlsdk/mllite/mldmp.c \
+ mlsdk/mllite/mlstates.c \
+ mlsdk/mllite/mlsupervisor.c \
+ mlsdk/mllite/mlBiasNoMotion.c \
+ mlsdk/mllite/mlSetGyroBias.c \
+ mlsdk/mllite/ml_mputest.c \
+ mlsdk/mlutils/mputest.c \
+ mlsdk/mlutils/checksum.c
+
+LOCAL_SHARED_LIBRARIES := libm libutils libcutils liblog libmlplatform
+include $(BUILD_SHARED_LIBRARY)
diff --git a/invensense/mlsdk/mllite/accel.c b/libsensors/mlsdk/mllite/accel.c
index b8a0ed2..b8a0ed2 100644
--- a/invensense/mlsdk/mllite/accel.c
+++ b/libsensors/mlsdk/mllite/accel.c
diff --git a/invensense/mlsdk/mllite/accel.h b/libsensors/mlsdk/mllite/accel.h
index d3fbc6a..d3fbc6a 100644
--- a/invensense/mlsdk/mllite/accel.h
+++ b/libsensors/mlsdk/mllite/accel.h
diff --git a/invensense/mlsdk/mllite/compass.c b/libsensors/mlsdk/mllite/compass.c
index c008fbf..c008fbf 100644
--- a/invensense/mlsdk/mllite/compass.c
+++ b/libsensors/mlsdk/mllite/compass.c
diff --git a/invensense/mlsdk/mllite/compass.h b/libsensors/mlsdk/mllite/compass.h
index f0bdb58..f0bdb58 100644
--- a/invensense/mlsdk/mllite/compass.h
+++ b/libsensors/mlsdk/mllite/compass.h
diff --git a/invensense/mlsdk/mllite/dmpDefault.c b/libsensors/mlsdk/mllite/dmpDefault.c
index b649c0d..b649c0d 100644
--- a/invensense/mlsdk/mllite/dmpDefault.c
+++ b/libsensors/mlsdk/mllite/dmpDefault.c
diff --git a/invensense/mlsdk/mllite/dmpDefault.h b/libsensors/mlsdk/mllite/dmpDefault.h
index 1fc7ca6..1fc7ca6 100644
--- a/invensense/mlsdk/mllite/dmpDefault.h
+++ b/libsensors/mlsdk/mllite/dmpDefault.h
diff --git a/invensense/mlsdk/mllite/dmpDefaultMantis.c b/libsensors/mlsdk/mllite/dmpDefaultMantis.c
index 5282dd9..5282dd9 100644
--- a/invensense/mlsdk/mllite/dmpDefaultMantis.c
+++ b/libsensors/mlsdk/mllite/dmpDefaultMantis.c
diff --git a/invensense/mlsdk/mllite/dmpKey.h b/libsensors/mlsdk/mllite/dmpKey.h
index 3e2e667..3e2e667 100644
--- a/invensense/mlsdk/mllite/dmpKey.h
+++ b/libsensors/mlsdk/mllite/dmpKey.h
diff --git a/invensense/mlsdk/mllite/dmpconfig.txt b/libsensors/mlsdk/mllite/dmpconfig.txt
index 4643ed5..4643ed5 100644
--- a/invensense/mlsdk/mllite/dmpconfig.txt
+++ b/libsensors/mlsdk/mllite/dmpconfig.txt
diff --git a/invensense/mlsdk/mllite/dmpmap.h b/libsensors/mlsdk/mllite/dmpmap.h
index cb53c7c..cb53c7c 100644
--- a/invensense/mlsdk/mllite/dmpmap.h
+++ b/libsensors/mlsdk/mllite/dmpmap.h
diff --git a/invensense/mlsdk/mllite/invensense.h b/libsensors/mlsdk/mllite/invensense.h
index 586dd25..586dd25 100644
--- a/invensense/mlsdk/mllite/invensense.h
+++ b/libsensors/mlsdk/mllite/invensense.h
diff --git a/invensense/mlsdk/mllite/ml.c b/libsensors/mlsdk/mllite/ml.c
index d830be7..d830be7 100644
--- a/invensense/mlsdk/mllite/ml.c
+++ b/libsensors/mlsdk/mllite/ml.c
diff --git a/invensense/mlsdk/mllite/ml.h b/libsensors/mlsdk/mllite/ml.h
index 67e47e2..67e47e2 100644
--- a/invensense/mlsdk/mllite/ml.h
+++ b/libsensors/mlsdk/mllite/ml.h
diff --git a/invensense/mlsdk/mllite/mlBiasNoMotion.c b/libsensors/mlsdk/mllite/mlBiasNoMotion.c
index aaf98d2..aaf98d2 100644
--- a/invensense/mlsdk/mllite/mlBiasNoMotion.c
+++ b/libsensors/mlsdk/mllite/mlBiasNoMotion.c
diff --git a/invensense/mlsdk/mllite/mlBiasNoMotion.h b/libsensors/mlsdk/mllite/mlBiasNoMotion.h
index 030dbf9..030dbf9 100644
--- a/invensense/mlsdk/mllite/mlBiasNoMotion.h
+++ b/libsensors/mlsdk/mllite/mlBiasNoMotion.h
diff --git a/invensense/mlsdk/mllite/mlFIFO.c b/libsensors/mlsdk/mllite/mlFIFO.c
index 3279b35..3279b35 100644
--- a/invensense/mlsdk/mllite/mlFIFO.c
+++ b/libsensors/mlsdk/mllite/mlFIFO.c
diff --git a/invensense/mlsdk/mllite/mlFIFO.h b/libsensors/mlsdk/mllite/mlFIFO.h
index 2114eb3..2114eb3 100644
--- a/invensense/mlsdk/mllite/mlFIFO.h
+++ b/libsensors/mlsdk/mllite/mlFIFO.h
diff --git a/invensense/mlsdk/mllite/mlFIFOHW.c b/libsensors/mlsdk/mllite/mlFIFOHW.c
index e806b95..e806b95 100644
--- a/invensense/mlsdk/mllite/mlFIFOHW.c
+++ b/libsensors/mlsdk/mllite/mlFIFOHW.c
diff --git a/invensense/mlsdk/mllite/mlFIFOHW.h b/libsensors/mlsdk/mllite/mlFIFOHW.h
index 6f70185..6f70185 100644
--- a/invensense/mlsdk/mllite/mlFIFOHW.h
+++ b/libsensors/mlsdk/mllite/mlFIFOHW.h
diff --git a/invensense/mlsdk/mllite/mlMathFunc.c b/libsensors/mlsdk/mllite/mlMathFunc.c
index 31b42bc..31b42bc 100644
--- a/invensense/mlsdk/mllite/mlMathFunc.c
+++ b/libsensors/mlsdk/mllite/mlMathFunc.c
diff --git a/invensense/mlsdk/mllite/mlMathFunc.h b/libsensors/mlsdk/mllite/mlMathFunc.h
index 70fa9f4..70fa9f4 100644
--- a/invensense/mlsdk/mllite/mlMathFunc.h
+++ b/libsensors/mlsdk/mllite/mlMathFunc.h
diff --git a/invensense/mlsdk/mllite/mlSetGyroBias.c b/libsensors/mlsdk/mllite/mlSetGyroBias.c
index bd14d2e..bd14d2e 100644
--- a/invensense/mlsdk/mllite/mlSetGyroBias.c
+++ b/libsensors/mlsdk/mllite/mlSetGyroBias.c
diff --git a/invensense/mlsdk/mllite/mlSetGyroBias.h b/libsensors/mlsdk/mllite/mlSetGyroBias.h
index e56f18b..e56f18b 100644
--- a/invensense/mlsdk/mllite/mlSetGyroBias.h
+++ b/libsensors/mlsdk/mllite/mlSetGyroBias.h
diff --git a/invensense/mlsdk/mllite/ml_mputest.c b/libsensors/mlsdk/mllite/ml_mputest.c
index ffb17cd..ffb17cd 100644
--- a/invensense/mlsdk/mllite/ml_mputest.c
+++ b/libsensors/mlsdk/mllite/ml_mputest.c
diff --git a/invensense/mlsdk/mllite/ml_mputest.h b/libsensors/mlsdk/mllite/ml_mputest.h
index 705d3cc..705d3cc 100644
--- a/invensense/mlsdk/mllite/ml_mputest.h
+++ b/libsensors/mlsdk/mllite/ml_mputest.h
diff --git a/invensense/mlsdk/mllite/ml_stored_data.c b/libsensors/mlsdk/mllite/ml_stored_data.c
index 35da3e8..35da3e8 100644
--- a/invensense/mlsdk/mllite/ml_stored_data.c
+++ b/libsensors/mlsdk/mllite/ml_stored_data.c
diff --git a/invensense/mlsdk/mllite/ml_stored_data.h b/libsensors/mlsdk/mllite/ml_stored_data.h
index 74c2b7c..74c2b7c 100644
--- a/invensense/mlsdk/mllite/ml_stored_data.h
+++ b/libsensors/mlsdk/mllite/ml_stored_data.h
diff --git a/invensense/mlsdk/mllite/mlarray.c b/libsensors/mlsdk/mllite/mlarray.c
index 2ee9a8c..2ee9a8c 100644
--- a/invensense/mlsdk/mllite/mlarray.c
+++ b/libsensors/mlsdk/mllite/mlarray.c
diff --git a/invensense/mlsdk/mllite/mlarray_legacy.c b/libsensors/mlsdk/mllite/mlarray_legacy.c
index 20d9116..20d9116 100644
--- a/invensense/mlsdk/mllite/mlarray_legacy.c
+++ b/libsensors/mlsdk/mllite/mlarray_legacy.c
diff --git a/invensense/mlsdk/mllite/mlcontrol.c b/libsensors/mlsdk/mllite/mlcontrol.c
index 278438a..278438a 100644
--- a/invensense/mlsdk/mllite/mlcontrol.c
+++ b/libsensors/mlsdk/mllite/mlcontrol.c
diff --git a/invensense/mlsdk/mllite/mlcontrol.h b/libsensors/mlsdk/mllite/mlcontrol.h
index abdefa3..abdefa3 100644
--- a/invensense/mlsdk/mllite/mlcontrol.h
+++ b/libsensors/mlsdk/mllite/mlcontrol.h
diff --git a/invensense/mlsdk/mllite/mldl.c b/libsensors/mlsdk/mllite/mldl.c
index ee7258f..ee7258f 100644
--- a/invensense/mlsdk/mllite/mldl.c
+++ b/libsensors/mlsdk/mllite/mldl.c
diff --git a/invensense/mlsdk/mllite/mldl.h b/libsensors/mlsdk/mllite/mldl.h
index 961d860..961d860 100644
--- a/invensense/mlsdk/mllite/mldl.h
+++ b/libsensors/mlsdk/mllite/mldl.h
diff --git a/invensense/mlsdk/mllite/mldl_cfg.h b/libsensors/mlsdk/mllite/mldl_cfg.h
index fb2e402..fb2e402 100644
--- a/invensense/mlsdk/mllite/mldl_cfg.h
+++ b/libsensors/mlsdk/mllite/mldl_cfg.h
diff --git a/invensense/mlsdk/mllite/mldl_cfg_mpu.c b/libsensors/mlsdk/mllite/mldl_cfg_mpu.c
index ff97348..ff97348 100644
--- a/invensense/mlsdk/mllite/mldl_cfg_mpu.c
+++ b/libsensors/mlsdk/mllite/mldl_cfg_mpu.c
diff --git a/invensense/mlsdk/mllite/mldmp.c b/libsensors/mlsdk/mllite/mldmp.c
index d16bdaf..d16bdaf 100644
--- a/invensense/mlsdk/mllite/mldmp.c
+++ b/libsensors/mlsdk/mllite/mldmp.c
diff --git a/invensense/mlsdk/mllite/mldmp.h b/libsensors/mlsdk/mllite/mldmp.h
index ff3d24e..ff3d24e 100644
--- a/invensense/mlsdk/mllite/mldmp.h
+++ b/libsensors/mlsdk/mllite/mldmp.h
diff --git a/invensense/mlsdk/mllite/mlinclude.h b/libsensors/mlsdk/mllite/mlinclude.h
index fdbdef3..fdbdef3 100644
--- a/invensense/mlsdk/mllite/mlinclude.h
+++ b/libsensors/mlsdk/mllite/mlinclude.h
diff --git a/invensense/mlsdk/mllite/mlstates.c b/libsensors/mlsdk/mllite/mlstates.c
index e44f100..e44f100 100644
--- a/invensense/mlsdk/mllite/mlstates.c
+++ b/libsensors/mlsdk/mllite/mlstates.c
diff --git a/invensense/mlsdk/mllite/mlstates.h b/libsensors/mlsdk/mllite/mlstates.h
index cbaa610..cbaa610 100644
--- a/invensense/mlsdk/mllite/mlstates.h
+++ b/libsensors/mlsdk/mllite/mlstates.h
diff --git a/invensense/mlsdk/mllite/mlsupervisor.c b/libsensors/mlsdk/mllite/mlsupervisor.c
index 2546903..2546903 100644
--- a/invensense/mlsdk/mllite/mlsupervisor.c
+++ b/libsensors/mlsdk/mllite/mlsupervisor.c
diff --git a/invensense/mlsdk/mllite/mlsupervisor.h b/libsensors/mlsdk/mllite/mlsupervisor.h
index 62b427e..62b427e 100644
--- a/invensense/mlsdk/mllite/mlsupervisor.h
+++ b/libsensors/mlsdk/mllite/mlsupervisor.h
diff --git a/invensense/mlsdk/mllite/pressure.c b/libsensors/mlsdk/mllite/pressure.c
index f32229f..f32229f 100644
--- a/invensense/mlsdk/mllite/pressure.c
+++ b/libsensors/mlsdk/mllite/pressure.c
diff --git a/invensense/mlsdk/mllite/pressure.h b/libsensors/mlsdk/mllite/pressure.h
index 77c5d43..77c5d43 100644
--- a/invensense/mlsdk/mllite/pressure.h
+++ b/libsensors/mlsdk/mllite/pressure.h
diff --git a/invensense/mlsdk/mlutils/checksum.c b/libsensors/mlsdk/mlutils/checksum.c
index a97477d..a97477d 100644
--- a/invensense/mlsdk/mlutils/checksum.c
+++ b/libsensors/mlsdk/mlutils/checksum.c
diff --git a/invensense/mlsdk/mlutils/checksum.h b/libsensors/mlsdk/mlutils/checksum.h
index 4d3f046..4d3f046 100644
--- a/invensense/mlsdk/mlutils/checksum.h
+++ b/libsensors/mlsdk/mlutils/checksum.h
diff --git a/invensense/mlsdk/mlutils/mputest.c b/libsensors/mlsdk/mlutils/mputest.c
index 4a598ff..4a598ff 100644
--- a/invensense/mlsdk/mlutils/mputest.c
+++ b/libsensors/mlsdk/mlutils/mputest.c
diff --git a/invensense/mlsdk/mlutils/mputest.h b/libsensors/mlsdk/mlutils/mputest.h
index d3347c5..d3347c5 100644
--- a/invensense/mlsdk/mlutils/mputest.h
+++ b/libsensors/mlsdk/mlutils/mputest.h
diff --git a/invensense/mlsdk/mlutils/slave.h b/libsensors/mlsdk/mlutils/slave.h
index 45449f6..45449f6 100644
--- a/invensense/mlsdk/mlutils/slave.h
+++ b/libsensors/mlsdk/mlutils/slave.h
diff --git a/invensense/mlsdk/platform/include/i2c.h b/libsensors/mlsdk/platform/include/i2c.h
index c3002d5..c3002d5 100644
--- a/invensense/mlsdk/platform/include/i2c.h
+++ b/libsensors/mlsdk/platform/include/i2c.h
diff --git a/invensense/mlsdk/platform/include/linux/mpu.h b/libsensors/mlsdk/platform/include/linux/mpu.h
index 04fa7b6..04fa7b6 100644
--- a/invensense/mlsdk/platform/include/linux/mpu.h
+++ b/libsensors/mlsdk/platform/include/linux/mpu.h
diff --git a/invensense/mlsdk/platform/include/log.h b/libsensors/mlsdk/platform/include/log.h
index 8485074..8485074 100644
--- a/invensense/mlsdk/platform/include/log.h
+++ b/libsensors/mlsdk/platform/include/log.h
diff --git a/invensense/mlsdk/platform/include/mlmath.h b/libsensors/mlsdk/platform/include/mlmath.h
index 424a43b..424a43b 100644
--- a/invensense/mlsdk/platform/include/mlmath.h
+++ b/libsensors/mlsdk/platform/include/mlmath.h
diff --git a/invensense/mlsdk/platform/include/mlos.h b/libsensors/mlsdk/platform/include/mlos.h
index 97c8c88..97c8c88 100644
--- a/invensense/mlsdk/platform/include/mlos.h
+++ b/libsensors/mlsdk/platform/include/mlos.h
diff --git a/invensense/mlsdk/platform/include/mlsl.h b/libsensors/mlsdk/platform/include/mlsl.h
index 535d117..535d117 100644
--- a/invensense/mlsdk/platform/include/mlsl.h
+++ b/libsensors/mlsdk/platform/include/mlsl.h
diff --git a/invensense/mlsdk/platform/include/mltypes.h b/libsensors/mlsdk/platform/include/mltypes.h
index 90a126b..90a126b 100644
--- a/invensense/mlsdk/platform/include/mltypes.h
+++ b/libsensors/mlsdk/platform/include/mltypes.h
diff --git a/invensense/mlsdk/platform/include/mpu3050.h b/libsensors/mlsdk/platform/include/mpu3050.h
index bd0ac32..bd0ac32 100644
--- a/invensense/mlsdk/platform/include/mpu3050.h
+++ b/libsensors/mlsdk/platform/include/mpu3050.h
diff --git a/invensense/mlsdk/platform/include/stdint_invensense.h b/libsensors/mlsdk/platform/include/stdint_invensense.h
index d238813..d238813 100644
--- a/invensense/mlsdk/platform/include/stdint_invensense.h
+++ b/libsensors/mlsdk/platform/include/stdint_invensense.h
diff --git a/invensense/mlsdk/platform/linux/kernel/mpuirq.h b/libsensors/mlsdk/platform/linux/kernel/mpuirq.h
index 352170b..352170b 100644
--- a/invensense/mlsdk/platform/linux/kernel/mpuirq.h
+++ b/libsensors/mlsdk/platform/linux/kernel/mpuirq.h
diff --git a/invensense/mlsdk/platform/linux/kernel/slaveirq.h b/libsensors/mlsdk/platform/linux/kernel/slaveirq.h
index beb352b..beb352b 100644
--- a/invensense/mlsdk/platform/linux/kernel/slaveirq.h
+++ b/libsensors/mlsdk/platform/linux/kernel/slaveirq.h
diff --git a/invensense/mlsdk/platform/linux/kernel/timerirq.h b/libsensors/mlsdk/platform/linux/kernel/timerirq.h
index dc3eea2..dc3eea2 100644
--- a/invensense/mlsdk/platform/linux/kernel/timerirq.h
+++ b/libsensors/mlsdk/platform/linux/kernel/timerirq.h
diff --git a/invensense/mlsdk/platform/linux/log_linux.c b/libsensors/mlsdk/platform/linux/log_linux.c
index 7f7de0e..7f7de0e 100644
--- a/invensense/mlsdk/platform/linux/log_linux.c
+++ b/libsensors/mlsdk/platform/linux/log_linux.c
diff --git a/invensense/mlsdk/platform/linux/log_printf_linux.c b/libsensors/mlsdk/platform/linux/log_printf_linux.c
index e6499f3..e6499f3 100644
--- a/invensense/mlsdk/platform/linux/log_printf_linux.c
+++ b/libsensors/mlsdk/platform/linux/log_printf_linux.c
diff --git a/invensense/mlsdk/platform/linux/mlos_linux.c b/libsensors/mlsdk/platform/linux/mlos_linux.c
index 8704f4b..8704f4b 100644
--- a/invensense/mlsdk/platform/linux/mlos_linux.c
+++ b/libsensors/mlsdk/platform/linux/mlos_linux.c
diff --git a/invensense/mlsdk/platform/linux/mlsl_linux_mpu.c b/libsensors/mlsdk/platform/linux/mlsl_linux_mpu.c
index 00d5973..00d5973 100644
--- a/invensense/mlsdk/platform/linux/mlsl_linux_mpu.c
+++ b/libsensors/mlsdk/platform/linux/mlsl_linux_mpu.c
diff --git a/invensense/libinvensense_hal/sensor_params.h b/libsensors/sensor_params.h
index 056e587..056e587 100644
--- a/invensense/libinvensense_hal/sensor_params.h
+++ b/libsensors/sensor_params.h
diff --git a/libsensors/sensors.h b/libsensors/sensors.h
index 18517f9..786feab 100644
--- a/libsensors/sensors.h
+++ b/libsensors/sensors.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_SAMSUNG_SENSORS_H
-#define ANDROID_SAMSUNG_SENSORS_H
+#ifndef TUNA_SENSORS_H
+#define TUNA_SENSORS_H
#include <stdint.h>
#include <errno.h>
@@ -33,6 +33,15 @@ __BEGIN_DECLS
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+#define ID_MPL_BASE (0)
+#define ID_GY (ID_MPL_BASE)
+#define ID_A (ID_GY + 1)
+#define ID_M (ID_A + 1)
+#define ID_O (ID_M + 1)
+#define ID_RV (ID_O + 1)
+#define ID_LA (ID_RV + 1)
+#define ID_GR (ID_LA + 1)
+
#define ID_SAMSUNG_BASE (0x1000)
#define ID_L (ID_SAMSUNG_BASE)
#define ID_P (ID_L + 1)
@@ -44,4 +53,4 @@ __BEGIN_DECLS
__END_DECLS
-#endif /* ANDROID_SAMSUNG_SENSORS_H */
+#endif /* TUNA_SENSORS_H */