summaryrefslogtreecommitdiff
path: root/libsensors_iio/software/core/mpl
diff options
context:
space:
mode:
Diffstat (limited to 'libsensors_iio/software/core/mpl')
-rw-r--r--libsensors_iio/software/core/mpl/adv_func.h30
-rw-r--r--libsensors_iio/software/core/mpl/auto_calibration.h33
-rw-r--r--libsensors_iio/software/core/mpl/build/android/libmplmpu.sobin130934 -> 168684 bytes
-rw-r--r--libsensors_iio/software/core/mpl/build/android/static.mk110
-rw-r--r--libsensors_iio/software/core/mpl/fusion_9axis.h2
-rw-r--r--libsensors_iio/software/core/mpl/interpolator.h103
-rw-r--r--libsensors_iio/software/core/mpl/inv_log.h7
-rw-r--r--libsensors_iio/software/core/mpl/invensense_adv.h1
-rw-r--r--libsensors_iio/software/core/mpl/mlsetinterrupts.h23
-rw-r--r--libsensors_iio/software/core/mpl/mlsupervisor_9axis.h57
-rw-r--r--libsensors_iio/software/core/mpl/orientation.h42
-rw-r--r--libsensors_iio/software/core/mpl/progressive_no_motion.h39
-rw-r--r--libsensors_iio/software/core/mpl/quat_accuracy_monitor.h1
-rw-r--r--libsensors_iio/software/core/mpl/sensor_moments.h42
-rw-r--r--libsensors_iio/software/core/mpl/shake.h94
-rw-r--r--libsensors_iio/software/core/mpl/state_storage.h25
16 files changed, 98 insertions, 511 deletions
diff --git a/libsensors_iio/software/core/mpl/adv_func.h b/libsensors_iio/software/core/mpl/adv_func.h
deleted file mode 100644
index 3f8595f..0000000
--- a/libsensors_iio/software/core/mpl/adv_func.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- $License:
- Copyright (C) 2011-2012 InvenSense Corporation, All Rights Reserved.
- See included License.txt for License information.
- $
- */
-
-/******************************************************************************
- *
- * $Id$
- *
- *****************************************************************************/
-
-#ifndef MLDMP_ADVFUNC_H__
-#define MLDMP_ADVFUNC_H__
-#include "mltypes.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- float inv_compass_angle(const long *compass, const long *grav, const float *quat);
- inv_error_t inv_set_dmp_quaternion(long *q);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif // MLDMP_ADVFUNC_H__
diff --git a/libsensors_iio/software/core/mpl/auto_calibration.h b/libsensors_iio/software/core/mpl/auto_calibration.h
deleted file mode 100644
index 3dd9827..0000000
--- a/libsensors_iio/software/core/mpl/auto_calibration.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- $License:
- Copyright (C) 2011 InvenSense Corporation, All Rights Reserved.
- $
- */
-
-/******************************************************************************
- *
- * $Id$
- *
- *****************************************************************************/
-
-#ifndef MLDMP_IN_USE_AUTO_CALIBRATION_H__
-#define MLDMP_IN_USE_AUTO_CALIBRATION_H__
-
-#include "mltypes.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-inv_error_t inv_enable_in_use_auto_calibration(void);
-inv_error_t inv_disable_in_use_auto_calibration(void);
-inv_error_t inv_in_use_auto_calibration_is_enabled(unsigned char *is_enabled);
-inv_error_t inv_init_in_use_auto_calibration(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif // MLDMP_IN_USE_AUTO_CALIBRATION_H__
-
diff --git a/libsensors_iio/software/core/mpl/build/android/libmplmpu.so b/libsensors_iio/software/core/mpl/build/android/libmplmpu.so
index 116b618..fbd346f 100644
--- a/libsensors_iio/software/core/mpl/build/android/libmplmpu.so
+++ b/libsensors_iio/software/core/mpl/build/android/libmplmpu.so
Binary files differ
diff --git a/libsensors_iio/software/core/mpl/build/android/static.mk b/libsensors_iio/software/core/mpl/build/android/static.mk
deleted file mode 100644
index 6ad45de..0000000
--- a/libsensors_iio/software/core/mpl/build/android/static.mk
+++ /dev/null
@@ -1,110 +0,0 @@
-MLLITE_LIB_NAME = mllite
-LIBRARY = $(LIB_PREFIX)$(MLLITE_LIB_NAME).$(STATIC_LIB_EXT)
-
-MK_NAME = $(notdir $(CURDIR)/$(firstword $(MAKEFILE_LIST)))
-
-OBJFOLDER = $(CURDIR)/obj
-
-CROSS = arm-none-linux-gnueabi-
-COMP= $(CROSS)gcc
-LINK= $(CROSS)ar cr
-
-MLLITE_DIR = $(MLSDK_ROOT)/mllite
-MPL_DIR = $(MLSDK_ROOT)/mldmp
-MLPLATFORM_DIR = $(MLSDK_ROOT)/platform
-
-include $(MLSDK_ROOT)/Android-common.mk
-
-CFLAGS += $(CMDLINE_CFLAGS)
-CFLAGS += -Wall -fpic
-CFLAGS += -mthumb-interwork -fno-exceptions -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -fmessage-length=0
-CFLAGS += -DNDEBUG
-CFLAGS += -D_REENTRANT -DLINUX -DANDROID
-CFLAGS += -I$(MLLITE_DIR)
-CFLAGS += -I$(MLPLATFORM_DIR)/include
-CFLAGS += -I$(MLSDK_ROOT)/mlutils
-CFLAGS += -I$(MLSDK_ROOT)/mlapps/common
-CFLAGS += $(MLSDK_INCLUDES)
-CFLAGS += $(MLSDK_DEFINES)
-
-VPATH += $(MLLITE_DIR)
-VPATH += $(MLSDK_ROOT)/mlutils
-VPATH += $(MLLITE_DIR)/accel
-VPATH += $(MLLITE_DIR)/compass
-VPATH += $(MLLITE_DIR)/pressure
-VPATH += $(MLLITE_DIR)/mlapps/common
-
-####################################################################################################
-## sources
-
-ML_LIBS = $(MLPLATFORM_DIR)/linux/$(LIB_PREFIX)$(MLPLATFORM_LIB_NAME).$(STATIC_LIB_EXT)
-
-ML_SOURCES += $(MLLITE_DIR)/mldl_cfg_mpu.c
-ML_SOURCES += $(MLLITE_DIR)/mldl_cfg_init_linux.c
-ML_SOURCES += $(MLLITE_DIR)/accel.c
-ML_SOURCES += $(MLLITE_DIR)/compass.c
-ML_SOURCES += $(MLLITE_DIR)/compass_supervisor.c
-ML_SOURCES += $(MLLITE_DIR)/compass_supervisor_adv_callbacks.c
-ML_SOURCES += $(MLLITE_DIR)/key0_96.c
-ML_SOURCES += $(MLLITE_DIR)/pressure.c
-ML_SOURCES += $(MLLITE_DIR)/ml.c
-ML_SOURCES += $(MLLITE_DIR)/ml_invobj.c
-ML_SOURCES += $(MLLITE_DIR)/ml_init.c
-ML_SOURCES += $(MLLITE_DIR)/mlarray_lite.c
-ML_SOURCES += $(MLLITE_DIR)/mlarray_adv.c
-ML_SOURCES += $(MLLITE_DIR)/mlarray_legacy.c
-ML_SOURCES += $(MLLITE_DIR)/mlBiasNoMotion.c
-ML_SOURCES += $(MLLITE_DIR)/mlFIFO.c
-ML_SOURCES += $(MLLITE_DIR)/mlFIFOHW.c
-ML_SOURCES += $(MLLITE_DIR)/mlMathFunc.c
-ML_SOURCES += $(MLLITE_DIR)/mlcontrol.c
-ML_SOURCES += $(MLLITE_DIR)/mldl.c
-ML_SOURCES += $(MLLITE_DIR)/mldmp.c
-ML_SOURCES += $(MLLITE_DIR)/dmpDefault.c
-ML_SOURCES += $(MLLITE_DIR)/mlstates.c
-ML_SOURCES += $(MLLITE_DIR)/mlsupervisor.c
-ML_SOURCES += $(MLLITE_DIR)/ml_stored_data.c
-ML_SOURCES += $(MLLITE_DIR)/ustore_manager.c
-ML_SOURCES += $(MLLITE_DIR)/ustore_mlsl_io.c
-ML_SOURCES += $(MLLITE_DIR)/ustore_adv_fusion_delegate.c
-ML_SOURCES += $(MLLITE_DIR)/ustore_lite_fusion_delegate.c
-ML_SOURCES += $(MLLITE_DIR)/temp_comp_legacy.c
-ML_SOURCES += $(MLLITE_DIR)/mlSetGyroBias.c
-ML_SOURCES += $(MLSDK_ROOT)/mlutils/checksum.c
-ML_SOURCES += $(MLSDK_ROOT)/mlutils/mputest.c
-ML_SOURCES += $(MLLITE_DIR)/mldl_print_cfg.c
-ifeq ($(MPU_NAME),MPU3050)
-ML_SOURCES += $(MLSDK_ROOT)/mlutils/mpu3050test.c
-else
-ML_SOURCES += $(MLSDK_ROOT)/mlutils/mpu6050test.c
-endif
-
-ML_OBJS := $(addsuffix .o,$(ML_SOURCES))
-ML_OBJS_DST = $(addprefix $(OBJFOLDER)/,$(addsuffix .o, $(notdir $(ML_SOURCES))))
-
-####################################################################################################
-## rules
-
-.PHONY: all clean cleanall
-
-all: $(LIBRARY) $(MK_NAME)
-
-$(LIBRARY) : $(OBJFOLDER) $(ML_OBJS_DST) $(ML_LIBS) $(MK_NAME)
- @$(call echo_in_colors, "\n<linking $(LIBRARY) with objects $(ML_OBJS_DST)\n")
- $(LINK) $(LIBRARY) $(ML_OBJS_DST)
- $(CROSS)ranlib $(LIBRARY)
-
-$(OBJFOLDER) :
- @$(call echo_in_colors, "\n<creating object's folder 'obj/'>\n")
- mkdir obj
-
-$(ML_OBJS_DST) : $(OBJFOLDER)/%.c.o : %.c $(MK_NAME)
- @$(call echo_in_colors, "\n<compile $< to $(OBJFOLDER)/$(notdir $@)>\n")
- $(COMP) $(CFLAGS) $(ANDROID_INCLUDES) $(KERNEL_INCLUDES) $(MLSDK_INCLUDES) -o $@ -c $<
-
-clean :
- rm -fR $(OBJFOLDER)
-
-cleanall :
- rm -fR $(LIBRARY) $(OBJFOLDER)
-
diff --git a/libsensors_iio/software/core/mpl/fusion_9axis.h b/libsensors_iio/software/core/mpl/fusion_9axis.h
index 616694a..1ba1ebb 100644
--- a/libsensors_iio/software/core/mpl/fusion_9axis.h
+++ b/libsensors_iio/software/core/mpl/fusion_9axis.h
@@ -26,6 +26,8 @@ extern "C" {
inv_error_t inv_disable_9x_sensor_fusion(void);
inv_error_t inv_start_9x_sensor_fusion(void);
inv_error_t inv_stop_9x_sensor_fusion(void);
+ inv_error_t inv_9x_fusion_set_mag_fb(double fb);
+ inv_error_t inv_9x_fusion_enable_jitter_reduction(int en);
#ifdef __cplusplus
}
diff --git a/libsensors_iio/software/core/mpl/interpolator.h b/libsensors_iio/software/core/mpl/interpolator.h
deleted file mode 100644
index 5eb571d..0000000
--- a/libsensors_iio/software/core/mpl/interpolator.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- $License:
- Copyright (C) 2011 InvenSense Corporation, All Rights Reserved.
- $
- */
-#ifndef INTERPOLATOR_H
-#define INTERPOLATOR_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-//#include "mltypes.h"
-
- /* ------------ */
- /* - Defines. - */
- /* ------------ */
-
-#define MAX_INTERPOLATION (20)
-
-typedef struct {
- long x[2];
- long y[4];
-} tInterpolate2;
-typedef struct {
- long x[2];
- long y[6];
-} tInterpolate3;
-typedef struct {
- long x[5];
- long y[10];
- int idx1;
-} tInterpolate5;
-typedef struct {
- tInterpolate2 state1;
- tInterpolate2 state2;
-} tInterpolate4;
-typedef struct {
- tInterpolate3 state1;
- tInterpolate2 state2;
-} tInterpolate6;
-typedef struct {
- tInterpolate2 state1;
- tInterpolate4 state2;
-} tInterpolate8;
-typedef struct {
- tInterpolate3 state1;
- tInterpolate3 state2;
-} tInterpolate9;
-typedef struct {
- tInterpolate5 state1;
- tInterpolate2 state2;
-} tInterpolate10;
-typedef struct {
- tInterpolate4 state1;
- tInterpolate3 state2;
-} tInterpolate12;
-typedef struct {
- tInterpolate5 state1;
- tInterpolate3 state2;
-} tInterpolate15;
-typedef struct {
- tInterpolate2 state1;
- tInterpolate8 state2;
-} tInterpolate16;
-typedef struct {
- tInterpolate9 state1;
- tInterpolate2 state2;
-} tInterpolate18;
-typedef struct {
- tInterpolate10 state1;
- tInterpolate2 state2;
-} tInterpolate20;
-
-typedef union {
- tInterpolate2 u2;
- tInterpolate3 u3;
- tInterpolate4 u4;
- tInterpolate5 u5;
- tInterpolate6 u6;
- tInterpolate8 u8;
- tInterpolate9 u9;
- tInterpolate10 u10;
- tInterpolate12 u12;
- tInterpolate15 u15;
- tInterpolate16 u16;
- tInterpolate18 u18;
- tInterpolate20 u20;
-} tInterpolateState;
-
- /* --------------------- */
- /* - Function p-types. - */
- /* --------------------- */
-int inv_get_interp_amount( int x );
-int inv_interpolate( int amount, long input, long *output, tInterpolateState *state );
-long inv_fxmult( long x, long y );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* INTERPOLATOR_H */
diff --git a/libsensors_iio/software/core/mpl/inv_log.h b/libsensors_iio/software/core/mpl/inv_log.h
deleted file mode 100644
index 972844b..0000000
--- a/libsensors_iio/software/core/mpl/inv_log.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "mltypes.h"
-#ifndef INV_INV_LOG_H__
-#define INV_INV_LOG_H__
-
-#define INV_LOGE(s)
-
-#endif // INV_INV_LOG_H__
diff --git a/libsensors_iio/software/core/mpl/invensense_adv.h b/libsensors_iio/software/core/mpl/invensense_adv.h
index 9e59c18..12932c9 100644
--- a/libsensors_iio/software/core/mpl/invensense_adv.h
+++ b/libsensors_iio/software/core/mpl/invensense_adv.h
@@ -28,3 +28,4 @@
#include "quaternion_supervisor.h"
#include "mag_disturb.h"
#include "quat_accuracy_monitor.h"
+#include "shake.h"
diff --git a/libsensors_iio/software/core/mpl/mlsetinterrupts.h b/libsensors_iio/software/core/mpl/mlsetinterrupts.h
deleted file mode 100644
index a81dabb..0000000
--- a/libsensors_iio/software/core/mpl/mlsetinterrupts.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- $License:
- Copyright (c) 2008 InvenSense Corporation, All Rights Reserved.
- $
- */
-
-#ifndef MLSETINTERRUPT_H
-#define MLSETINTERRUPT_H
-
-#include "mltypes.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /* DEPRECATED - Scheduled for removal. Do not use */
- inv_error_t MLSetInterrupts(unsigned short interrupts);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* MLSETINTERRUPT_H */
diff --git a/libsensors_iio/software/core/mpl/mlsupervisor_9axis.h b/libsensors_iio/software/core/mpl/mlsupervisor_9axis.h
deleted file mode 100644
index 3779381..0000000
--- a/libsensors_iio/software/core/mpl/mlsupervisor_9axis.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- $License:
- Copyright (C) 2011 InvenSense Corporation, All Rights Reserved.
- $
- */
-
-/******************************************************************************
- *
- * $Id: mlsupervisor_9axis.h 6123 2011-09-30 18:21:11Z mcaramello $
- *
- *****************************************************************************/
-
-#ifndef MLDMP_MLSUPERVISOR_H__
-#define MLDMP_MLSUPERVISOR_H__
-
-#include "mltypes.h"
-
-//#include "temp_comp.h"
-
-struct inv_fusion_t {
- int compassCount;
- long quat[4];
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-inv_error_t inv_enable_9x_fusion(void);
-inv_error_t inv_disable_9x_fusion(void);
-
-inv_error_t inv_enable_9x_fusion_legacy(void);
-inv_error_t inv_disable_9x_fusion_legacy(void);
-
-inv_error_t inv_enable_9x_fusion_new(void);
-inv_error_t inv_disable_9x_fusion_new(void);
-
-inv_error_t inv_enable_9x_fusion_basic(void);
-inv_error_t inv_disable_9x_fusion_basic(void);
-
-inv_error_t inv_enable_9x_fusion_external(void);
-inv_error_t inv_disable_9x_fusion_external(void);
-
-inv_error_t inv_enable_maintain_heading(void);
-inv_error_t inv_disable_maintain_heading(void);
-
-void inv_set_compass_state(long compassState, long accState,
- unsigned long deltaTime,
- int magDisturb, int gotBias,
- int *new_state,
- int *new_accuracy);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // MLDMP_MLSUPERVISOR_H__
diff --git a/libsensors_iio/software/core/mpl/orientation.h b/libsensors_iio/software/core/mpl/orientation.h
deleted file mode 100644
index ab4e45e..0000000
--- a/libsensors_iio/software/core/mpl/orientation.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- $License:
- Copyright (C) 2011 InvenSense Corporation, All Rights Reserved.
- $
- */
-#ifndef MLDMP_ORIENTATION_H__
-#define MLDMP_ORIENTATION_H__
-
-#include "mltypes.h"
-/*******************************************************************************/
-/* Orientations */
-/*******************************************************************************/
-
-#define INV_X_UP 0x01
-#define INV_X_DOWN 0x02
-#define INV_Y_UP 0x04
-#define INV_Y_DOWN 0x08
-#define INV_Z_UP 0x10
-#define INV_Z_DOWN 0x20
-#define INV_ORIENTATION_ALL 0x3F
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- inv_error_t inv_enable_orientation(void);
- inv_error_t inv_disable_orientation(void);
- inv_error_t inv_set_orientation(int orientation);
- inv_error_t inv_set_orientation_cb(void (*callback)(unsigned short));
- inv_error_t inv_get_orientation(int *orientation);
- inv_error_t inv_get_orientation_state(int * state);
- inv_error_t inv_set_orientation_interrupt(unsigned char on);
- inv_error_t inv_set_orientation_thresh(float angle,
- float hysteresis,
- unsigned long time,
- unsigned int axis);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // MLDMP_ORIENTATION_H__
diff --git a/libsensors_iio/software/core/mpl/progressive_no_motion.h b/libsensors_iio/software/core/mpl/progressive_no_motion.h
deleted file mode 100644
index 99333e3..0000000
--- a/libsensors_iio/software/core/mpl/progressive_no_motion.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- $License:
- Copyright (C) 2011 InvenSense Corporation, All Rights Reserved.
- $
- */
-
-/******************************************************************************
- *
- * $Id:$
- *
- *****************************************************************************/
-
-#ifndef MLDMP_PROG_NO_MOTION_H__
-#define MLDMP_PROG_NO_MOTION_H__
-
-#include "mltypes.h"
-
-#define PROG_NO_MOTION 1
-#define PROG_MOTION 2
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* APIs */
-inv_error_t inv_enable_prog_no_motion(void);
-inv_error_t inv_disable_prog_no_motion(void);
-
-/* internal use */
-int inv_get_prog_no_motion_enabled(void);
-void inv_get_prog_no_motion_bias_changed(void);
-int inv_get_prog_no_motion_state(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif // MLDMP_PROG_NO_MOTION_H__
diff --git a/libsensors_iio/software/core/mpl/quat_accuracy_monitor.h b/libsensors_iio/software/core/mpl/quat_accuracy_monitor.h
index 2cf7a50..3c6a2c1 100644
--- a/libsensors_iio/software/core/mpl/quat_accuracy_monitor.h
+++ b/libsensors_iio/software/core/mpl/quat_accuracy_monitor.h
@@ -62,6 +62,7 @@ inv_error_t inv_stop_quat_accuracy_monitor(void);
double get_compassNgravity(void);
double get_init_compassNgravity(void);
+float inv_heading_accuracy_check(float orient[3], float *heading, int8_t *accuracy);
#ifdef __cplusplus
}
diff --git a/libsensors_iio/software/core/mpl/sensor_moments.h b/libsensors_iio/software/core/mpl/sensor_moments.h
deleted file mode 100644
index 73eb363..0000000
--- a/libsensors_iio/software/core/mpl/sensor_moments.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- $License:
- Copyright (C) 2011-2012 InvenSense Corporation, All Rights Reserved.
- See included License.txt for License information.
- $
- */
-
-/******************************************************************************
- *
- * $Id$
- *
- *****************************************************************************/
-
-#ifndef MLDMP_SENSOR_MOMENTS_H__
-#define MLDMP_SENSOR_MOMENTS_H__
-
-#include "mltypes.h"
-
-enum moment_ord {
- SECOND_ORD=0,
- THIRD_ORD,
- FOURTH_ORD,
- MAX_ORD
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- inv_error_t inv_enable_sm(void);
- inv_error_t inv_disable_sm(void);
- inv_error_t inv_sm_record_data(float sample, void *sensor);
- inv_error_t inv_sm_update_evt_act_state(int motion);
- void *inv_init_sm(enum moment_ord);
- float inv_sm_get_filtered_data(void *sensor);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // MLDMP_SENSOR_MOMENTS_H__
-
diff --git a/libsensors_iio/software/core/mpl/shake.h b/libsensors_iio/software/core/mpl/shake.h
new file mode 100644
index 0000000..67acb7b
--- /dev/null
+++ b/libsensors_iio/software/core/mpl/shake.h
@@ -0,0 +1,94 @@
+/*
+ $License:
+ Copyright (C) 2011-2012 InvenSense Corporation, All Rights Reserved.
+ See included License.txt for License information.
+ $
+ */
+#ifndef INV_SHAKE_H__
+#define INV_SHAKE_H__
+
+#include "mltypes.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /* ------------ */
+ /* - Defines. - */
+ /* ------------ */
+
+ #define STATE_ZERO 0
+ #define STATE_INIT_1 1
+ #define STATE_INIT_2 2
+ #define STATE_DETECT 3
+
+ struct t_shake_config_params {
+ long shake_time_min_ms;
+ long shake_time_max_ms;
+ long shake_time_min;
+ long shake_time_max;
+ unsigned char shake_time_set;
+ long shake_time_saved;
+ float shake_deriv_thr;
+ int zero_cross_thr;
+ float accel_delta_min;
+ float accel_delta_max;
+ unsigned char interp_enable;
+ };
+
+ struct t_shake_state_params {
+ unsigned char state;
+ float accel_peak_high;
+ float accel_peak_low;
+ float accel_range;
+ int num_zero_cross;
+ short curr_shake_time;
+ int deriv_major_change;
+ int deriv_major_sign;
+ float accel_buffer[200];
+ float delta_buffer[200];
+ };
+
+ struct t_shake_data_params {
+ float accel_prev;
+ float accel_curr;
+ float delta_prev;
+ float delta_curr;
+ float delta_prev_buffer;
+ };
+
+ struct t_shake_results {
+ //unsigned char shake_int;
+ int shake_number;
+ };
+
+ struct t_shake_cb {
+ void (*shake_callback)(struct t_shake_results *shake_results);
+ };
+
+
+ /* --------------------- */
+ /* - Function p-types. - */
+ /* --------------------- */
+ inv_error_t inv_enable_shake(void);
+ inv_error_t inv_disable_shake(void);
+ inv_error_t inv_init_shake(void);
+ inv_error_t inv_start_shake(void);
+ int inv_set_shake_cb(void (*callback)(struct t_shake_results *shake_results));
+ void inv_config_shake_time_params(long sample_time_ms);
+ void inv_set_shake_accel_delta_min(float accel_g);
+ void inv_set_shake_accel_delta_max(float accel_g);
+ void inv_set_shake_zero_cross_thresh(int num_zero_cross);
+ void inv_set_shake_deriv_thresh(float shake_deriv_thresh);
+ void inv_set_shake_time_min_ms(long time_ms);
+ void inv_set_shake_time_max_ms(long time_ms);
+ void inv_enable_shake_data_interpolation(unsigned char en);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // INV_SHAKE__ \ No newline at end of file
diff --git a/libsensors_iio/software/core/mpl/state_storage.h b/libsensors_iio/software/core/mpl/state_storage.h
deleted file mode 100644
index c1eb47b..0000000
--- a/libsensors_iio/software/core/mpl/state_storage.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- $License:
- Copyright (C) 2011-2012 InvenSense Corporation, All Rights Reserved.
- See included License.txt for License information.
- $
- */
-#ifndef INV_STATE_STORAGE_H__
-#define INV_STATE_STORAGE_H__
-
-#include "mltypes.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-inv_error_t inv_store_data(const void *data, size_t size, unsigned long module,
- unsigned long version);
-inv_error_t inv_load_data(void *data, size_t size, unsigned long module,
- unsigned long version);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // INV_STATE_STORAGE_H__