diff options
author | Nick Vaccaro <nvaccaro@google.com> | 2015-05-19 23:15:50 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-05-19 23:15:50 +0000 |
commit | 0212561eed3641576a23421af50c9948f315546b (patch) | |
tree | 88c75b3c9cfa9e0cfe95dce32ebc2c79391cb115 | |
parent | da7d68b77214908887cfe6a709290d8c1b20e768 (diff) | |
parent | a03869ce9a355d3606fccdbab41edc7bb1d32024 (diff) | |
download | android_hardware_invensense-0212561eed3641576a23421af50c9948f315546b.tar.gz android_hardware_invensense-0212561eed3641576a23421af50c9948f315546b.tar.bz2 android_hardware_invensense-0212561eed3641576a23421af50c9948f315546b.zip |
am a03869ce: Merge commit \'9b7ebb51\' into manualmerge
* commit 'a03869ce9a355d3606fccdbab41edc7bb1d32024':
Invensense: 6515: Update HAL to v5_2_0_L_RC26-2015-02-27
32 files changed, 1097 insertions, 347 deletions
diff --git a/6515/Android.mk b/6515/Android.mk index b80cd55..5053e7d 100644 --- a/6515/Android.mk +++ b/6515/Android.mk @@ -1,2 +1 @@ -# libsensors_iio expects IIO drivers for an MPU6515+AK8963 -include $(call all-named-subdir-makefiles,libsensors_iio) +include $(call all-subdir-makefiles) diff --git a/6515/libsensors_iio/Android.mk b/6515/libsensors_iio/Android.mk index 993d52e..f33c7ae 100755 --- a/6515/libsensors_iio/Android.mk +++ b/6515/libsensors_iio/Android.mk @@ -24,7 +24,21 @@ LOCAL_MODULE_OWNER := invensense LOCAL_CFLAGS := -DLOG_TAG=\"Sensors\" -Werror -Wall +# ANDROID version check +$(info YD>>PLATFORM_VERSION=$(PLATFORM_VERSION)) +MAJOR_VERSION :=$(shell echo $(PLATFORM_VERSION) | cut -f1 -d.) +MINOR_VERSION :=$(shell echo $(PLATFORM_VERSION) | cut -f2 -d.) +VERSION_KK :=$(shell test $(MAJOR_VERSION) -eq 4 -a $(MINOR_VERSION) -gt 3 && echo true) +VERSION_L :=$(shell test $(MAJOR_VERSION) -eq 5 -a $(MINOR_VERSION) -eq 0 && echo true) +$(info YD>>ANDRIOD VERSION=$(MAJOR_VERSION).$(MINOR_VERSION)) +$(info YD>>VERSION_L=$(VERSION_L), VERSION_KK=$(VERSION_KK)) +#ANDROID version check END + +ifeq ($(VERSION_KK),true) LOCAL_CFLAGS += -DANDROID_KITKAT +else +LOCAL_CFLAGS += -DANDROID_LOLLIPOP +endif ifneq (,$(filter $(TARGET_BUILD_VARIANT),eng userdebug user)) ifneq ($(COMPILE_INVENSENSE_COMPASS_CAL),0) @@ -89,6 +103,11 @@ else ifneq ($(filter aosp_hammerhead, $(TARGET_PRODUCT)),) LOCAL_MODULE := sensors.hammerhead LOCAL_MODULE_OWNER := invensense +else +ifneq ($(filter aosp_flounder, $(TARGET_PRODUCT)),) +LOCAL_MODULE := sensors.flounder +LOCAL_MODULE_OWNER := invensense +endif endif ifneq ($(filter dory guppy, $(TARGET_DEVICE)),) LOCAL_MODULE := sensors.invensense @@ -98,7 +117,13 @@ endif else # eng, user, & userdebug builds LOCAL_MODULE := sensors.invensense endif # eng, user & userdebug builds +$(info YD>>LOCAL_MODULE=$(LOCAL_MODULE)) + +ifdef TARGET_2ND_ARCH +LOCAL_MODULE_RELATIVE_PATH := hw +else LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw +endif LOCAL_SHARED_LIBRARIES += libmplmpu LOCAL_C_INCLUDES += $(LOCAL_PATH)/software/core/mllite @@ -110,7 +135,11 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/software/core/driver/include/linux LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS := -DLOG_TAG=\"Sensors\" -Werror -Wall +ifeq ($(VERSION_KK),true) LOCAL_CFLAGS += -DANDROID_KITKAT +else +LOCAL_CFLAGS += -DANDROID_LOLLIPOP +endif ifneq (,$(filter $(TARGET_BUILD_VARIANT),eng userdebug user)) ifneq ($(COMPILE_INVENSENSE_COMPASS_CAL),0) @@ -147,6 +176,7 @@ LOCAL_SHARED_LIBRARIES += libdl LOCAL_SHARED_LIBRARIES += liblog LOCAL_SHARED_LIBRARIES += libmllite LOCAL_SHARED_LIBRARIES += libhardware_legacy +$(info YD>>LOCAL_MODULE=$(LOCAL_MODULE), LOCAL_SRC_FILES=$(LOCAL_SRC_FILES), LOCAL_SHARED_LIBRARIES=$(LOCAL_SHARED_LIBRARIES)) include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) diff --git a/6515/libsensors_iio/CompassSensor.IIO.9150.cpp b/6515/libsensors_iio/CompassSensor.IIO.9150.cpp index 585cc2e..a8238f4 100755 --- a/6515/libsensors_iio/CompassSensor.IIO.9150.cpp +++ b/6515/libsensors_iio/CompassSensor.IIO.9150.cpp @@ -332,6 +332,16 @@ void CompassSensor::fillList(struct sensor_t *list) return; } if(!strcmp(compass, "compass") + || !strcmp(compass, "INV_AK09912") + || !strcmp(compass, "AK09912") + || !strcmp(compass, "ak09912")) { + list->maxRange = COMPASS_AKM9912_RANGE; + list->resolution = COMPASS_AKM9912_RESOLUTION; + list->power = COMPASS_AKM9912_POWER; + list->minDelay = COMPASS_AKM9912_MINDELAY; + return; + } + if(!strcmp(compass, "compass") || !strncmp(compass, "mlx90399",3) || !strncmp(compass, "MLX90399",3)) { list->maxRange = COMPASS_MPU9350_RANGE; diff --git a/6515/libsensors_iio/CompassSensor.IIO.primary.cpp b/6515/libsensors_iio/CompassSensor.IIO.primary.cpp index db9a042..6baa4bb 100755 --- a/6515/libsensors_iio/CompassSensor.IIO.primary.cpp +++ b/6515/libsensors_iio/CompassSensor.IIO.primary.cpp @@ -445,6 +445,17 @@ void CompassSensor::fillList(struct sensor_t *list) mMinDelay = list->minDelay; return; } + if(!strcmp(compass, "compass") + || !strcmp(compass, "INV_AK09912") + || !strcmp(compass, "AK09912") + || !strcmp(compass, "ak09912")) { + list->maxRange = COMPASS_AKM9912_RANGE; + list->resolution = COMPASS_AKM9912_RESOLUTION; + list->power = COMPASS_AKM9912_POWER; + list->minDelay = COMPASS_AKM9912_MINDELAY; + mMinDelay = list->minDelay; + return; + } if(!strcmp(compass, "ami306")) { list->maxRange = COMPASS_AMI306_RANGE; list->resolution = COMPASS_AMI306_RESOLUTION; diff --git a/6515/libsensors_iio/MPLSensor.cpp b/6515/libsensors_iio/MPLSensor.cpp index de37fac..8c35b9a 100644 --- a/6515/libsensors_iio/MPLSensor.cpp +++ b/6515/libsensors_iio/MPLSensor.cpp @@ -130,7 +130,21 @@ MPLSensor::MPLSensor(CompassSensor *compass, int (*m_pt2AccelCalLoadFunc)(long * mFlushBatchSet(0), mSkipReadEvents(0), mDataMarkerDetected(0), - mEmptyDataMarkerDetected(0) { + mEmptyDataMarkerDetected(0), + mGyroBatchRate(0), + mAccelBatchRate(0), + mCompassBatchRate(0), + mPressureBatchRate(0), + mQuatBatchRate(0), + mGyroRate(0), + mAccelRate(0), + mCompassRate(0), + mPressureRate(0), + mQuatRate(0), + mResetRate(0), + mDataInterrupt(0), + mFirstBatchCall(1), + mEnableCalled(1) { VFUNC_LOG; inv_error_t rv; @@ -1132,7 +1146,7 @@ int MPLSensor::setDmpFeature(int en) return res; } -int MPLSensor::computeAndSetDmpState() +int MPLSensor::computeDmpState(bool* dmp_state) { int res = 0; bool dmpState = 0; @@ -1154,6 +1168,15 @@ int MPLSensor::computeAndSetDmpState() } }*/ + *dmp_state = dmpState; + + return res; +} + +int MPLSensor::SetDmpState(bool dmpState) +{ + int res = 0; + // set Dmp state res = onDmp(dmpState); if (res < 0) @@ -1170,6 +1193,22 @@ int MPLSensor::computeAndSetDmpState() } } LOGV_IF(PROCESS_VERBOSE, "HAL:DMP is set %s", (dmpState ? "on" : "off")); + mDmpState = dmpState; + return dmpState; + +} + +int MPLSensor::computeAndSetDmpState() +{ + int res = 0; + bool dmpState = 0; + + computeDmpState(&dmpState); + + res = SetDmpState(dmpState); + if (res < 0) + return res; + return dmpState; } @@ -1781,7 +1820,6 @@ int MPLSensor::enableDmpPedometer(int en, int interruptMode) } else { mFeatureActiveMask |= INV_DMP_PEDOMETER_STEP; - mStepCountPollTime = 100000000LL; } clock_gettime(CLOCK_MONOTONIC, &mt_pre); @@ -2483,7 +2521,7 @@ int MPLSensor::setBatch(int en, int toggleEnable) return res; } -int MPLSensor::writeBatchTimeout(int en) +int MPLSensor::calcBatchTimeout(int en, int64_t *out) { VFUNC_LOG; @@ -2493,7 +2531,7 @@ int MPLSensor::writeBatchTimeout(int en) int64_t timeout = 100000000000LL; int64_t ns = 0; for (int i = 0; i < NumSensors; i++) { - LOGV_IF(1, "mFeatureActiveMask=0x%016llx, mEnabled=0x%01x, mBatchEnabled=0x%x", + LOGV_IF(0, "mFeatureActiveMask=0x%016llx, mEnabled=0x%01x, mBatchEnabled=0x%x", mFeatureActiveMask, mEnabled, mBatchEnabled); if (((mEnabled & (1 << i)) && (mBatchEnabled & (1 << i))) || (checkPedStandaloneBatched() && (i == StepDetector))) { @@ -2508,8 +2546,14 @@ int MPLSensor::writeBatchTimeout(int en) timeoutInMs = 0; } - LOGV_IF(PROCESS_VERBOSE, - "HAL: batch timeout set to %lld ms", timeoutInMs); + *out = timeoutInMs; + + return 0; +} + +int MPLSensor::writeBatchTimeout(int en, int64_t timeoutInMs) +{ + VFUNC_LOG; if(mBatchTimeoutInMs != timeoutInMs) { /* write required timeout to sysfs */ @@ -2525,6 +2569,21 @@ int MPLSensor::writeBatchTimeout(int en) return 0; } +int MPLSensor::writeBatchTimeout(int en) +{ + VFUNC_LOG; + + int64_t timeoutInMs = 0; + + calcBatchTimeout(en, &timeoutInMs); + LOGV_IF(PROCESS_VERBOSE, + "HAL: batch timeout set to %lld ms", timeoutInMs); + + writeBatchTimeout(en, timeoutInMs); + + return 0; +} + /* Store calibration file */ void MPLSensor::storeCalibration(void) { @@ -2547,8 +2606,13 @@ int MPLSensor::gyroHandler(sensors_event_t* s) { VHANDLER_LOG; int update; +#if defined ANDROID_LOLLIPOP + update = inv_get_sensor_type_gyroscope(s->gyro.v, &s->gyro.status, + (inv_time_t *)(&s->timestamp)); +#else update = inv_get_sensor_type_gyroscope(s->gyro.v, &s->gyro.status, &s->timestamp); +#endif LOGV_IF(HANDLER_DATA, "HAL:gyro data : %+f %+f %+f -- %lld - %d", s->gyro.v[0], s->gyro.v[1], s->gyro.v[2], s->timestamp, update); return update; @@ -2558,8 +2622,13 @@ int MPLSensor::rawGyroHandler(sensors_event_t* s) { VHANDLER_LOG; int update; - update = inv_get_sensor_type_gyroscope_raw(s->uncalibrated_gyro.uncalib, +#if defined ANDROID_LOLLIPOP + update = inv_get_sensor_type_gyroscope_raw(s->uncalibrated_gyro.uncalib, + &s->gyro.status, (inv_time_t *)(&s->timestamp)); +#else + update = inv_get_sensor_type_gyroscope_raw(s->uncalibrated_gyro.uncalib, &s->gyro.status, &s->timestamp); +#endif if(update) { memcpy(s->uncalibrated_gyro.bias, mGyroBias, sizeof(mGyroBias)); LOGV_IF(HANDLER_DATA,"HAL:gyro bias data : %+f %+f %+f -- %lld - %d", @@ -2577,8 +2646,13 @@ int MPLSensor::accelHandler(sensors_event_t* s) { VHANDLER_LOG; int update; +#if defined ANDROID_LOLLIPOP + update = inv_get_sensor_type_accelerometer( + s->acceleration.v, &s->acceleration.status, (inv_time_t *)(&s->timestamp)); +#else update = inv_get_sensor_type_accelerometer( s->acceleration.v, &s->acceleration.status, &s->timestamp); +#endif LOGV_IF(HANDLER_DATA, "HAL:accel data : %+f %+f %+f -- %lld - %d", s->acceleration.v[0], s->acceleration.v[1], s->acceleration.v[2], s->timestamp, update); @@ -2590,8 +2664,13 @@ int MPLSensor::compassHandler(sensors_event_t* s) { VHANDLER_LOG; int update; +#if defined ANDROID_LOLLIPOP + update = inv_get_sensor_type_magnetic_field( + s->magnetic.v, &s->magnetic.status, (inv_time_t *)(&s->timestamp)); +#else update = inv_get_sensor_type_magnetic_field( s->magnetic.v, &s->magnetic.status, &s->timestamp); +#endif LOGV_IF(HANDLER_DATA, "HAL:compass data: %+f %+f %+f -- %lld - %d", s->magnetic.v[0], s->magnetic.v[1], s->magnetic.v[2], s->timestamp, update); @@ -2604,6 +2683,15 @@ int MPLSensor::rawCompassHandler(sensors_event_t* s) VHANDLER_LOG; int update; //TODO: need to handle uncalib data and bias for 3rd party compass +#if defined ANDROID_LOLLIPOP + if(mCompassSensor->providesCalibration()) { + update = mCompassSensor->readRawSample(s->uncalibrated_magnetic.uncalib, (int64_t *)(&s->timestamp)); + } + else { + update = inv_get_sensor_type_magnetic_field_raw(s->uncalibrated_magnetic.uncalib, + &s->magnetic.status, (inv_time_t *)(&s->timestamp)); + } +#else if(mCompassSensor->providesCalibration()) { update = mCompassSensor->readRawSample(s->uncalibrated_magnetic.uncalib, &s->timestamp); } @@ -2611,6 +2699,7 @@ int MPLSensor::rawCompassHandler(sensors_event_t* s) update = inv_get_sensor_type_magnetic_field_raw(s->uncalibrated_magnetic.uncalib, &s->magnetic.status, &s->timestamp); } +#endif if(update) { memcpy(s->uncalibrated_magnetic.bias, mCompassBias, sizeof(mCompassBias)); LOGV_IF(HANDLER_DATA, "HAL:compass bias data: %+f %+f %+f -- %lld - %d", @@ -2633,8 +2722,13 @@ int MPLSensor::rvHandler(sensors_event_t* s) VHANDLER_LOG; int8_t status; int update; +#if defined ANDROID_LOLLIPOP + update = inv_get_sensor_type_rotation_vector(s->data, &status, + (inv_time_t *)(&s->timestamp)); +#else update = inv_get_sensor_type_rotation_vector(s->data, &status, &s->timestamp); +#endif s->orientation.status = status; update |= isCompassDisabled(); LOGV_IF(HANDLER_DATA, "HAL:rv data: %+f %+f %+f %+f %+f %d- %+lld - %d", @@ -2653,8 +2747,13 @@ int MPLSensor::grvHandler(sensors_event_t* s) VHANDLER_LOG; int8_t status; int update; +#if defined ANDROID_LOLLIPOP + update = inv_get_sensor_type_rotation_vector_6_axis(s->data, &status, + (inv_time_t *)(&s->timestamp)); +#else update = inv_get_sensor_type_rotation_vector_6_axis(s->data, &status, &s->timestamp); +#endif s->orientation.status = status; LOGV_IF(HANDLER_DATA, "HAL:grv data: %+f %+f %+f %+f %+f %d- %+lld - %d", @@ -2667,8 +2766,13 @@ int MPLSensor::laHandler(sensors_event_t* s) { VHANDLER_LOG; int update; +#if defined ANDROID_LOLLIPOP + update = inv_get_sensor_type_linear_acceleration( + s->gyro.v, &s->gyro.status, (inv_time_t *)(&s->timestamp)); +#else update = inv_get_sensor_type_linear_acceleration( s->gyro.v, &s->gyro.status, &s->timestamp); +#endif update |= isCompassDisabled(); LOGV_IF(HANDLER_DATA, "HAL:la data: %+f %+f %+f - %lld - %d", s->gyro.v[0], s->gyro.v[1], s->gyro.v[2], s->timestamp, update); @@ -2679,8 +2783,13 @@ int MPLSensor::gravHandler(sensors_event_t* s) { VHANDLER_LOG; int update; +#if defined ANDROID_LOLLIPOP + update = inv_get_sensor_type_gravity(s->gyro.v, &s->gyro.status, + (inv_time_t *)(&s->timestamp)); +#else update = inv_get_sensor_type_gravity(s->gyro.v, &s->gyro.status, &s->timestamp); +#endif update |= isCompassDisabled(); LOGV_IF(HANDLER_DATA, "HAL:gr data: %+f %+f %+f - %lld - %d", s->gyro.v[0], s->gyro.v[1], s->gyro.v[2], s->timestamp, update); @@ -2691,8 +2800,14 @@ int MPLSensor::orienHandler(sensors_event_t* s) { VHANDLER_LOG; int update; +#if defined ANDROID_LOLLIPOP + update = inv_get_sensor_type_orientation( + s->orientation.v, &s->orientation.status, (inv_time_t *)(&s->timestamp)); +#else update = inv_get_sensor_type_orientation( s->orientation.v, &s->orientation.status, &s->timestamp); + +#endif update |= isCompassDisabled(); LOGV_IF(HANDLER_DATA, "HAL:or data: %f %f %f - %lld - %d", s->orientation.v[0], s->orientation.v[1], s->orientation.v[2], @@ -2725,8 +2840,13 @@ int MPLSensor::gmHandler(sensors_event_t* s) VHANDLER_LOG; int8_t status; int update = 0; +#if defined ANDROID_LOLLIPOP + update = inv_get_sensor_type_geomagnetic_rotation_vector(s->data, &status, + (inv_time_t *)(&s->timestamp)); +#else update = inv_get_sensor_type_geomagnetic_rotation_vector(s->data, &status, &s->timestamp); +#endif s->orientation.status = status; LOGV_IF(HANDLER_DATA, "HAL:gm data: %+f %+f %+f %+f %+f %d- %+lld - %d", s->data[0], s->data[1], s->data[2], s->data[3], s->data[4], s->orientation.status, s->timestamp, update); @@ -2780,7 +2900,7 @@ int MPLSensor::scHandler(sensors_event_t* s) int update = 1; /* Set step count */ -#if defined ANDROID_KITKAT +#if defined ANDROID_KITKAT || defined ANDROID_LOLLIPOP s->u64.step_counter = mLastStepCount; LOGV_IF(HANDLER_DATA, "HAL:sc data: %lld - %lld - %d", s->u64.step_counter, s->timestamp, update); @@ -2797,7 +2917,7 @@ int MPLSensor::metaHandler(sensors_event_t* s, int flags) VHANDLER_LOG; int update = 1; -#if defined ANDROID_KITKAT +#if defined ANDROID_KITKAT || defined ANDROID_LOLLIPOP /* initalize SENSOR_TYPE_META_DATA */ s->version = 0; s->sensor = 0; @@ -2810,7 +2930,7 @@ int MPLSensor::metaHandler(sensors_event_t* s, int flags) s->meta_data.what = flags; s->meta_data.sensor = mFlushSensorEnabledVector[0]; mFlushSensorEnabledVector.removeAt(0); - mFlushBatchSet = 0; + //mFlushBatchSet = 0; LOGV_IF(HANDLER_DATA, "HAL:flush complete data: type=%d what=%d, " "sensor=%d - %lld - %d", @@ -2837,6 +2957,9 @@ int MPLSensor::enable(int32_t handle, int en) if (uint32_t(handle) >= NumSensors) return -EINVAL; + /* set called flag */ + mEnableCalled = 1; + if (!en) mBatchEnabled &= ~(1 << handle); @@ -3626,18 +3749,49 @@ int MPLSensor::readEvents(sensors_event_t* data, int count) } } - // handle partial packet read and end marker - // skip readEvents from hal_outputs - if (!mFlushSensorEnabledVector.isEmpty()) { - if (!mEmptyDataMarkerDetected) { - // turn off sensors in data_builder - resetMplStates(); + if (!mSkipReadEvents) { + for (int i = 0; i < NumSensors; i++) { + int update = 0; + + // handle step detector when ped_q is enabled + if(mPedUpdate) { + if (i == StepDetector) { + update = readDmpPedometerEvents(data, count, ID_P, 1); + mPedUpdate = 0; + if(update == 1 && count > 0) { + data->timestamp = mStepSensorTimestamp; + count--; + numEventReceived++; + continue; + } + } else { + if (mPedUpdate == DATA_FORMAT_STEP) { + continue; + } + } + } + + // load up virtual sensors + if (mEnabled & (1 << i)) { + update = CALL_MEMBER_FN(this, mHandlers[i])(mPendingEvents + i); + mPendingMask |= (1 << i); + + if (update && (count > 0)) { + *data++ = mPendingEvents[i]; + count--; + numEventReceived++; + } + } } - mEmptyDataMarkerDetected = 0; - mDataMarkerDetected = 0; + mCompassOverFlow = 0; + } + // handle partial packet read and end marker + // skip readEvents from hal_outputs + int flush_vec_size = mFlushSensorEnabledVector.size(); + if (flush_vec_size && mDataMarkerDetected && mFlushBatchSet) { // handle flush complete event - for(size_t k = 0; k < mFlushSensorEnabledVector.size(); k++) { + for(int k = 0; k < flush_vec_size; k++) { int sendEvent = metaHandler(&mPendingFlushEvents[k], META_DATA_FLUSH_COMPLETE); if(sendEvent && count > 0) { *data++ = mPendingFlushEvents[k]; @@ -3645,47 +3799,22 @@ int MPLSensor::readEvents(sensors_event_t* data, int count) numEventReceived++; } } - return numEventReceived; - } - - if (mSkipReadEvents) { - return numEventReceived; - } - for (int i = 0; i < NumSensors; i++) { - int update = 0; - - // handle step detector when ped_q is enabled - if(mPedUpdate) { - if (i == StepDetector) { - update = readDmpPedometerEvents(data, count, ID_P, 1); - mPedUpdate = 0; - if(update == 1 && count > 0) { - data->timestamp = mStepSensorTimestamp; - count--; - numEventReceived++; - continue; - } - } else { - if (mPedUpdate == DATA_FORMAT_STEP) { - continue; - } - } + if (!mEmptyDataMarkerDetected) { + // turn off sensors in data_builder + resetMplStates(); } - // load up virtual sensors - if (mEnabled & (1 << i)) { - update = CALL_MEMBER_FN(this, mHandlers[i])(mPendingEvents + i); - mPendingMask |= (1 << i); - - if (update && (count > 0)) { - *data++ = mPendingEvents[i]; - count--; - numEventReceived++; - } + // Double check flush status + if (mFlushSensorEnabledVector.isEmpty()) { + mEmptyDataMarkerDetected = 0; + mDataMarkerDetected = 0; + mFlushBatchSet = 0; + LOGV_IF(0, "Flush completed"); + } else { + LOGV_IF(0, "Flush is still active"); } } - mCompassOverFlow = 0; return numEventReceived; } @@ -3870,7 +3999,6 @@ LOGV_IF(INPUT_DATA, LOGV_IF(0, "STEP DETECTED:0x%x", data_format); } mPedUpdate |= data_format; - mask |= DATA_FORMAT_STEP; // cancels step bit data_format &= (~DATA_FORMAT_STEP); } @@ -3998,7 +4126,7 @@ LOGV_IF(INPUT_DATA, } } else if (data_format == DATA_FORMAT_COMPASS_OF) { - LOGV_IF(ENG_VERBOSE && INPUT_DATA, "COMPASS OF DETECTED:0x%x", data_format); + LOGV_IF(ENG_VERBOSE && INPUT_DATA, "COMPASS OF DETECTED:0x%x", data_format); mask |= DATA_FORMAT_COMPASS_OF; mCompassOverFlow = 1; #ifdef INV_PLAYBACK_DBG @@ -4060,7 +4188,6 @@ LOGV_IF(INPUT_DATA, mFlushBatchSet = 1; } mDataMarkerDetected = 1; - mSkipReadEvents = 1; if (readCounter == 0) { mLeftOverBufferSize = 0; if(doneFlag != 0) { @@ -4086,20 +4213,6 @@ LOGV_IF(INPUT_DATA, mLeftOverBufferSize = 0; } - /* take the latest timestamp */ - if (mask & DATA_FORMAT_STEP) { - /* work around driver output duplicate step detector bit */ - if (latestTimestamp > mStepSensorTimestamp) { - mStepSensorTimestamp = latestTimestamp; - LOGV_IF(INPUT_DATA, - "HAL:input build step: 1 - %lld", mStepSensorTimestamp); - } else { - mPedUpdate = 0; - } - // cancels step bit - mask &= (~DATA_FORMAT_STEP); - } - /* handle data read */ if (mask == DATA_FORMAT_GYRO) { /* batch mode does not batch temperature */ @@ -4146,26 +4259,28 @@ LOGV_IF(INPUT_DATA, } if (mask == DATA_FORMAT_ACCEL) { - mPendingMask |= 1 << Accelerometer; - inv_build_accel(mCachedAccelData, 0, mAccelSensorTimestamp); - LOGV_IF(INPUT_DATA, - "HAL:input inv_build_accel: %+8ld %+8ld %+8ld - %lld", - mCachedAccelData[0], mCachedAccelData[1], - mCachedAccelData[2], mAccelSensorTimestamp); - /* remember inital 6 axis quaternion */ - inv_time_t tempTimestamp; - inv_get_6axis_quaternion(mInitial6QuatValue, &tempTimestamp); - if (mInitial6QuatValue[0] != 0 && mInitial6QuatValue[1] != 0 && - mInitial6QuatValue[2] != 0 && mInitial6QuatValue[3] != 0) { - mInitial6QuatValueAvailable = 1; - LOGV_IF(INPUT_DATA && ENG_VERBOSE, - "HAL:input build 6q init: %+8ld %+8ld %+8ld %+8ld", - mInitial6QuatValue[0], mInitial6QuatValue[1], - mInitial6QuatValue[2], mInitial6QuatValue[3]); - } - latestTimestamp = mAccelSensorTimestamp; + if (mLocalSensorMask & INV_THREE_AXIS_ACCEL) { + mPendingMask |= 1 << Accelerometer; + inv_build_accel(mCachedAccelData, 0, mAccelSensorTimestamp); + LOGV_IF(INPUT_DATA, + "HAL:input inv_build_accel: %+8ld %+8ld %+8ld - %lld", + mCachedAccelData[0], mCachedAccelData[1], + mCachedAccelData[2], mAccelSensorTimestamp); + /* remember inital 6 axis quaternion */ + inv_time_t tempTimestamp; + inv_get_6axis_quaternion(mInitial6QuatValue, &tempTimestamp); + if (mInitial6QuatValue[0] != 0 && mInitial6QuatValue[1] != 0 && + mInitial6QuatValue[2] != 0 && mInitial6QuatValue[3] != 0) { + mInitial6QuatValueAvailable = 1; + LOGV_IF(INPUT_DATA && ENG_VERBOSE, + "HAL:input build 6q init: %+8ld %+8ld %+8ld %+8ld", + mInitial6QuatValue[0], mInitial6QuatValue[1], + mInitial6QuatValue[2], mInitial6QuatValue[3]); + } + latestTimestamp = mAccelSensorTimestamp; + } } - + if (mask == DATA_FORMAT_COMPASS_OF) { /* compass overflow detected */ /* reset compass algorithm */ @@ -4178,7 +4293,7 @@ LOGV_IF(INPUT_DATA, mCachedCompassData[2], mCompassTimestamp); resetCompass(); } - + if ((mask == DATA_FORMAT_COMPASS) && mCompassSensor->isIntegrated()) { int status = 0; if (mCompassSensor->providesCalibration()) { @@ -4272,6 +4387,17 @@ LOGV_IF(INPUT_DATA, } } #endif + /* take the latest timestamp */ + if (mPedUpdate & DATA_FORMAT_STEP) { + /* work around driver output duplicate step detector bit */ + if (latestTimestamp > mStepSensorTimestamp) { + mStepSensorTimestamp = latestTimestamp; + LOGV_IF(INPUT_DATA, + "HAL:input build step: 1 - %lld", mStepSensorTimestamp); + } else { + mPedUpdate = 0; + } + } } //while end } @@ -4615,8 +4741,11 @@ int MPLSensor::getPollTime(void) int MPLSensor::getStepCountPollTime(void) { VFUNC_LOG; - /* clamped to 1ms? as spec, still rather large */ - return 100; + if (mDmpStepCountEnabled) { + // convert poll time from nS to mS + return (mStepCountPollTime / 1000000LL); + } + return 1000; } bool MPLSensor::hasStepCountPendingEvents(void) @@ -4870,6 +4999,12 @@ void MPLSensor::fillAccel(const char* accel, struct sensor_t *list) list[Accelerometer].power = ACCEL_MPU9250_POWER; list[Accelerometer].minDelay = ACCEL_MPU9250_MINDELAY; return; + } else if (accel != NULL && strcmp(accel, "MPU9255") == 0) { + list[Accelerometer].maxRange = ACCEL_MPU9255_RANGE; + list[Accelerometer].resolution = ACCEL_MPU9255_RESOLUTION; + list[Accelerometer].power = ACCEL_MPU9255_POWER; + list[Accelerometer].minDelay = ACCEL_MPU9255_MINDELAY; + return; } else if (accel != NULL && strcmp(accel, "MPU9350") == 0) { list[Accelerometer].maxRange = ACCEL_MPU9350_RANGE; list[Accelerometer].resolution = ACCEL_MPU9350_RESOLUTION; @@ -4928,6 +5063,11 @@ void MPLSensor::fillGyro(const char* gyro, struct sensor_t *list) list[Gyro].resolution = GYRO_MPU9250_RESOLUTION; list[Gyro].power = GYRO_MPU9250_POWER; list[Gyro].minDelay = GYRO_MPU9250_MINDELAY; + } else if( gyro != NULL && strcmp(gyro, "MPU9255") == 0) { + list[Gyro].maxRange = GYRO_MPU9255_RANGE; + list[Gyro].resolution = GYRO_MPU9255_RESOLUTION; + list[Gyro].power = GYRO_MPU9255_POWER; + list[Gyro].minDelay = GYRO_MPU9255_MINDELAY; } else if( gyro != NULL && strcmp(gyro, "MPU9350") == 0) { list[Gyro].maxRange = GYRO_MPU9350_RANGE; list[Gyro].resolution = GYRO_MPU9350_RESOLUTION; @@ -5645,6 +5785,12 @@ int MPLSensor::batch(int handle, int flags, int64_t period_ns, int64_t timeout) return 0; } + if (what == StepCounter) { + mStepCountPollTime = period_ns; + LOGI("HAL: set step count poll time = %lld nS (%.2f Hz)", + mStepCountPollTime, 1000000000.f / mStepCountPollTime); + } + int tempBatch = 0; if (timeout > 0) { tempBatch = mBatchEnabled | (1 << what); @@ -5699,6 +5845,83 @@ int MPLSensor::batch(int handle, int flags, int64_t period_ns, int64_t timeout) mBatchTimeouts[what] = timeout; } + // Check if need to change configurations + int master_enable_call = 0; + int64_t tmp_batch_timeout = 0; + bool tmp_dmp_state = 0; + int64_t tmp_gyro_rate; + int64_t tmp_accel_rate; + int64_t tmp_compass_rate; + int64_t tmp_pressure_rate; + int64_t tmp_quat_rate; + int64_t tmp_reset_rate; + bool skip_reset_data_rate = false; + + if (mFirstBatchCall) { + LOGI_IF(0, "HAL: mFirstBatchCall = %d", mFirstBatchCall); + master_enable_call++; + mFirstBatchCall = 0; + } + + if (mEnableCalled) { + LOGI_IF(0, "HAL: mEnableCalled = %d", mEnableCalled); + master_enable_call++; + mEnableCalled = 0; + } + + if(((int)mOldBatchEnabledMask != batchMode) || batchMode) { + calcBatchTimeout(batchMode, &tmp_batch_timeout); + if (tmp_batch_timeout != mBatchTimeoutInMs) + master_enable_call++; + if (computeDmpState(&tmp_dmp_state) < 0) { + LOGE("HAL:ERR can't compute dmp state"); + } + if (tmp_dmp_state != mDmpState) + master_enable_call++; + } + + if (batchMode == 1) { + if (calcBatchDataRates(&tmp_gyro_rate, &tmp_accel_rate, &tmp_compass_rate, &tmp_pressure_rate, &tmp_quat_rate) < 0) { + LOGE("HAL:ERR can't get batch data rates"); + } + if (tmp_gyro_rate != mGyroBatchRate) + master_enable_call++; + if (tmp_accel_rate != mAccelBatchRate) + master_enable_call++; + if (tmp_compass_rate != mCompassBatchRate) + master_enable_call++; + if (tmp_pressure_rate != mPressureBatchRate) + master_enable_call++; + if (tmp_quat_rate != mQuatBatchRate) + master_enable_call++; + } else { + if (calctDataRates(&tmp_reset_rate, &tmp_gyro_rate, &tmp_accel_rate, &tmp_compass_rate, &tmp_pressure_rate) < 0) { + skip_reset_data_rate = true; + LOGW("HAL:ERR can't get output rate back to original setting"); + } + if (tmp_reset_rate != mResetRate) + master_enable_call++; + if (tmp_gyro_rate != mGyroRate) + master_enable_call++; + if (tmp_accel_rate != mAccelRate) + master_enable_call++; + if (tmp_compass_rate != mCompassRate) + master_enable_call++; + if (tmp_pressure_rate != mPressureRate) + master_enable_call++; + } + uint32_t dataInterrupt = (mEnabled || (mFeatureActiveMask & INV_DMP_BATCH_MODE)); + if (dataInterrupt != mDataInterrupt) + master_enable_call++; + + if (master_enable_call == 0) { + LOGI_IF(0, "HAL: Skip batch configurations"); + goto batch_end; + } else { + LOGI_IF(0, "HAL: Do batch configurations"); + } + + // reset master enable res = masterEnable(0); if (res < 0) { @@ -5800,38 +6023,42 @@ int MPLSensor::batch(int handle, int flags, int64_t period_ns, int64_t timeout) } }*/ - writeBatchTimeout(batchMode); + writeBatchTimeout(batchMode, tmp_batch_timeout); - if (computeAndSetDmpState() < 0) { - LOGE("HAL:ERR can't compute dmp state"); + if (SetDmpState(tmp_dmp_state) < 0) { + LOGE("HAL:ERR can't set dmp state"); } }//end of batch mode modify if (batchMode == 1) { /* set batch rates */ - if (setBatchDataRates() < 0) { + if (setBatchDataRates(tmp_gyro_rate, tmp_accel_rate, tmp_compass_rate, tmp_pressure_rate, tmp_quat_rate) < 0) { LOGE("HAL:ERR can't set batch data rates"); } } else { /* reset sensor rate */ - if (resetDataRates() < 0) { - LOGE("HAL:ERR can't reset output rate back to original setting"); + if (!skip_reset_data_rate) { + if (resetDataRates(tmp_reset_rate, tmp_gyro_rate, tmp_accel_rate, tmp_compass_rate, tmp_pressure_rate) < 0) { + LOGE("HAL:ERR can't reset output rate back to original setting"); + } } } // set sensor data interrupt - uint32_t dataInterrupt = (mEnabled || (mFeatureActiveMask & INV_DMP_BATCH_MODE)); LOGV_IF(SYSFS_VERBOSE, "HAL:sysfs:echo %d > %s (%lld)", !dataInterrupt, mpu.dmp_event_int_on, getTimestamp()); if (write_sysfs_int(mpu.dmp_event_int_on, !dataInterrupt) < 0) { res = -1; LOGE("HAL:ERR can't enable DMP event interrupt"); } + mDataInterrupt = dataInterrupt; if (enabled_sensors || mFeatureActiveMask) { masterEnable(1); } + +batch_end: return res; } @@ -5856,6 +6083,7 @@ int MPLSensor::flush(int handle) LOGV_IF(PROCESS_VERBOSE, "HAL: flush - select sensor %s (handle %d)", sname.string(), handle); + if (((what != StepDetector) && (!(mEnabled & (1 << what)))) || ((what == StepDetector) && !(mFeatureActiveMask & INV_DMP_PEDOMETER))) { LOGV_IF(ENG_VERBOSE, "HAL: flush - sensor %s not enabled", sname.string()); @@ -5867,6 +6095,7 @@ int MPLSensor::flush(int handle) } mFlushSensorEnabledVector.push_back(handle); + mFlushBatchSet = 0; /*write sysfs */ LOGV_IF(SYSFS_VERBOSE, "HAL:sysfs:cat %s (%lld)", @@ -5884,7 +6113,6 @@ int MPLSensor::flush(int handle) LOGV_IF(ENG_VERBOSE, "HAl:flush - mFlushSensorEnabledVector=%d res=%d status=%d", handle, res, status); - mFlushBatchSet = 0; return 0; } @@ -6296,9 +6524,7 @@ int MPLSensor::writeSignificantMotionParams(bool toggleEnable, return res; } -/* set batch data rate */ -/* this function should be optimized */ -int MPLSensor::setBatchDataRates() +int MPLSensor::calcBatchDataRates(int64_t *gyro_rate, int64_t *accel_rate, int64_t *compass_rate, int64_t *pressure_rate, int64_t *quat_rate) { VFUNC_LOG; @@ -6352,7 +6578,7 @@ int MPLSensor::setBatchDataRates() LOGV_IF(PROCESS_VERBOSE, "HAL:MPL quat sample rate: (mpl)=%d us (mpu)=%.2f Hz", mplQuatRate, 1000000000.f / quatRate ); - getDmpRate(&quatRate); + //getDmpRate(&quatRate); } mplGyroRate = (int) gyroRate / 1000LL; @@ -6389,6 +6615,29 @@ int MPLSensor::setBatchDataRates() #endif #endif + *gyro_rate = gyroRate; + *accel_rate = accelRate; + *compass_rate = compassRate; +#ifdef ENABLE_PRESSURE + *pressure_rate = pressureRate; +#endif + *quat_rate = quatRate; + + return 0; +} + +int MPLSensor::MPLSensor::setBatchDataRates(int64_t gyroRate, int64_t accelRate, int64_t compassRate, int64_t pressureRate, int64_t quatRate) +{ + VFUNC_LOG; + + int res = 0; + int tempFd = -1; + + if ((mFeatureActiveMask & INV_DMP_PED_QUATERNION) || + (mFeatureActiveMask & INV_DMP_6AXIS_QUATERNION)) { + getDmpRate(&quatRate); + } + /* takes care of gyro rate */ LOGV_IF(SYSFS_VERBOSE, "HAL:sysfs:echo %.0f > %s (%lld)", 1000000000.f / gyroRate, mpu.gyro_rate, @@ -6418,32 +6667,47 @@ int MPLSensor::setBatchDataRates() mPressureSensor->setDelay(ID_PS, pressureRate); #endif + mGyroBatchRate = gyroRate; + mAccelBatchRate = accelRate; + mCompassBatchRate = compassRate; + mPressureBatchRate = pressureRate; + mQuatBatchRate = quatRate; + return res; } -/* Set sensor rate */ +/* set batch data rate */ /* this function should be optimized */ -int MPLSensor::resetDataRates() +int MPLSensor::setBatchDataRates() { VFUNC_LOG; int res = 0; - int tempFd = -1; - int64_t wanted = 1000000000LL; - int64_t resetRate; int64_t gyroRate; int64_t accelRate; int64_t compassRate; -#ifdef ENABLE_PRESSURE int64_t pressureRate; -#endif + int64_t quatRate; + + calcBatchDataRates(&gyroRate, &accelRate, &compassRate, &pressureRate, &quatRate); + setBatchDataRates(gyroRate, accelRate, compassRate, pressureRate, quatRate); + + return res; +} + +int MPLSensor::calctDataRates(int64_t *resetRate, int64_t *gyroRate, int64_t *accelRate, int64_t *compassRate, int64_t *pressureRate) +{ + VFUNC_LOG; + + int res = 0; + int tempFd = -1; + int64_t wanted = 1000000000LL; if (!mEnabled) { LOGV_IF(ENG_VERBOSE, "skip resetDataRates"); - return 0; + return -1; } - LOGI("HAL:resetDataRates mEnabled=%d", mEnabled); /* search the minimum delay requested across all enabled sensors */ /* skip setting rates if it is not changed */ for (int i = 0; i < NumSensors; i++) { @@ -6460,15 +6724,26 @@ int MPLSensor::resetDataRates() } } - resetRate = wanted; - gyroRate = wanted; - accelRate = wanted; - compassRate = wanted; -#ifdef ENABLE_PRESSURE - pressureRate = wanted; -#endif + *resetRate = wanted; + *gyroRate = wanted; + *accelRate = wanted; + *compassRate = wanted; + *pressureRate = wanted; + + return 0; +} - /* set mpl data rate */ +int MPLSensor::resetDataRates(int64_t resetRate, int64_t gyroRate, int64_t accelRate, int64_t compassRate, int64_t pressureRate) +{ + VFUNC_LOG; + + int res = 0; + int tempFd = -1; + int64_t wanted; + + wanted = resetRate; + + /* set mpl data rate */ inv_set_gyro_sample_rate((int)gyroRate/1000LL); inv_set_accel_sample_rate((int)accelRate/1000LL); inv_set_compass_sample_rate((int)compassRate/1000LL); @@ -6538,6 +6813,34 @@ int MPLSensor::resetDataRates() } } + mResetRate = resetRate; + mGyroRate = gyroRate; + mAccelRate = accelRate; + mCompassRate = compassRate; + mPressureRate = pressureRate; + + return res; +} + +/* Set sensor rate */ +/* this function should be optimized */ +int MPLSensor::resetDataRates() +{ + VFUNC_LOG; + + int res = 0; + int64_t resetRate; + int64_t gyroRate; + int64_t accelRate; + int64_t compassRate; + int64_t pressureRate; + + res = calctDataRates(&resetRate, &gyroRate, &accelRate, &compassRate, &pressureRate); + if (res) + return 0; + + resetDataRates(resetRate, gyroRate, accelRate, compassRate, pressureRate); + return res; } diff --git a/6515/libsensors_iio/MPLSensor.h b/6515/libsensors_iio/MPLSensor.h index 4c2dcea..13ba301 100644 --- a/6515/libsensors_iio/MPLSensor.h +++ b/6515/libsensors_iio/MPLSensor.h @@ -188,6 +188,7 @@ public: int checkBatchEnabled(); int setBatch(int en, int toggleEnable); int writeBatchTimeout(int en); + int writeBatchTimeout(int en, int64_t timeoutInMs); int32_t getEnableMask() { return mEnabled; } void getHandle(int32_t handle, int &what, android::String8 &sname); @@ -294,6 +295,8 @@ protected: void enable_iio_sysfs(void); int setDmpFeature(int en); int computeAndSetDmpState(void); + int computeDmpState(bool* dmp_state); + int SetDmpState(bool dmpState); int enablePedometer(int); int enablePedIndicator(int en); int checkPedStandaloneBatched(void); @@ -413,6 +416,23 @@ protected: int64_t mCompassTimestamp; int64_t mPressureTimestamp; + int64_t mGyroBatchRate; + int64_t mAccelBatchRate; + int64_t mCompassBatchRate; + int64_t mPressureBatchRate; + int64_t mQuatBatchRate; + int64_t mGyroRate; + int64_t mAccelRate; + int64_t mCompassRate; + int64_t mPressureRate; + int64_t mQuatRate; + int64_t mResetRate; + + uint32_t mDataInterrupt; + + bool mFirstBatchCall; + bool mEnableCalled; + struct sysfs_attrbs { char *chip_enable; char *power_state; @@ -519,6 +539,7 @@ protected: uint32_t mSkipReadEvents; bool mDataMarkerDetected; bool mEmptyDataMarkerDetected; + int mDmpState; private: /* added for dynamic get sensor list */ @@ -551,10 +572,15 @@ private: void setAccelBias(); int isCompassDisabled(); int setBatchDataRates(); + int calcBatchDataRates(int64_t *gyro_rate, int64_t *accel_rate, int64_t *compass_rate, int64_t *pressure_rate, int64_t *quat_rate); + int setBatchDataRates(int64_t gyroRate, int64_t accelRate, int64_t compassRate, int64_t pressureRate, int64_t quatRate); int resetDataRates(); + int calctDataRates(int64_t *resetRate, int64_t *gyroRate, int64_t *accelRate, int64_t *compassRate, int64_t *pressureRate); + int resetDataRates(int64_t resetRate, int64_t gyroRate, int64_t accelRate, int64_t compassRate, int64_t pressureRate); void initBias(); void resetMplStates(); void sys_dump(bool fileMode); + int calcBatchTimeout(int en, int64_t *out); }; extern "C" { diff --git a/6515/libsensors_iio/PressureSensor.IIO.secondary.cpp b/6515/libsensors_iio/PressureSensor.IIO.secondary.cpp index be11b6f..6f32cc7 100755 --- a/6515/libsensors_iio/PressureSensor.IIO.secondary.cpp +++ b/6515/libsensors_iio/PressureSensor.IIO.secondary.cpp @@ -197,5 +197,13 @@ int PressureSensor::inv_init_sysfs_attributes(void) sprintf(pressureSysFs.pressure_enable, "%s%s", mSysfsPath, "/pressure_enable"); sprintf(pressureSysFs.pressure_rate, "%s%s", mSysfsPath, "/pressure_rate"); + // Supported by driver ? + FILE *sysfsfp; + sysfsfp = fopen(pressureSysFs.pressure_rate, "r"); + if (sysfsfp == NULL) { + LOGE("HAL: HAL configured to support Pressure sensor but not by driver"); + } else { + fclose(sysfsfp); + } return 0; } diff --git a/6515/libsensors_iio/README_L_arm64 b/6515/libsensors_iio/README_L_arm64 new file mode 100644 index 0000000..eac69ba --- /dev/null +++ b/6515/libsensors_iio/README_L_arm64 @@ -0,0 +1,16 @@ +For building Invensense HAL for Android L Arm 64bit +=================================================== + $ cd $android_L_root + $ . build/envsetup.sh + $ lunch aosp_flounder-userdebug (or any arm64 target) + + $ -> copy Invensense HAL libsensor folder to $android_L_root/hardware/invensense/65xx/ + $ -> modifiy the makefile $android_L_root/hardware/invensense/Android.mk to include htc/nvidia flounder target + + $ make libinvensense_hal + $ make sensors.flounder + + $ adb push $OUT/system/lib/libmllite.so /system/lib/ + $ adb push $OUT/system/lib/libinvensense_hal.so /system/lib/ + $ adb push $OUT/system/lib/hw/sensors.flounder.so /system/lib/hw/ + diff --git a/6515/libsensors_iio/SensorBase.h b/6515/libsensors_iio/SensorBase.h index 1619958..96c9487 100755 --- a/6515/libsensors_iio/SensorBase.h +++ b/6515/libsensors_iio/SensorBase.h @@ -22,7 +22,7 @@ #include <sys/cdefs.h> #include <sys/types.h> -#if defined ANDROID_JELLYBEAN || defined ANDROID_KITKAT +#if defined ANDROID_JELLYBEAN || defined ANDROID_KITKAT || defined ANDROID_LOLLIPOP //build for Jellybean or KitKat #define LOGV_IF ALOGV_IF #define LOGE_IF ALOGE_IF @@ -46,7 +46,7 @@ #define CALL_MEMBER_FN(pobject, ptrToMember) ((pobject)->*(ptrToMember)) #define MAX_SYSFS_NAME_LEN (100) -#define IIO_BUFFER_LENGTH (480) +#define IIO_BUFFER_LENGTH (960) /*****************************************************************************/ diff --git a/6515/libsensors_iio/libmllite.so b/6515/libsensors_iio/libmllite.so Binary files differindex 40abcfa..6a8ae23 100644..100755 --- a/6515/libsensors_iio/libmllite.so +++ b/6515/libsensors_iio/libmllite.so diff --git a/6515/libsensors_iio/libmplmpu.so b/6515/libsensors_iio/libmplmpu.so Binary files differindex 6f01541..189e6c8 100644..100755 --- a/6515/libsensors_iio/libmplmpu.so +++ b/6515/libsensors_iio/libmplmpu.so diff --git a/6515/libsensors_iio/sensor_params.h b/6515/libsensors_iio/sensor_params.h index 28e2031..0f81d45 100755 --- a/6515/libsensors_iio/sensor_params.h +++ b/6515/libsensors_iio/sensor_params.h @@ -29,6 +29,11 @@ #define COMPASS_MPU9250_RESOLUTION (0.15f) #define COMPASS_MPU9250_POWER (10.f) #define COMPASS_MPU9250_MINDELAY (10000) +//MPU9255 INV_COMPASS +#define COMPASS_MPU9255_RANGE (9830.f) +#define COMPASS_MPU9255_RESOLUTION (0.15f) +#define COMPASS_MPU9255_POWER (10.f) +#define COMPASS_MPU9255_MINDELAY (10000) //MPU9150 INV_COMPASS #define COMPASS_MPU9150_RANGE (9830.f) #define COMPASS_MPU9150_RESOLUTION (0.285f) @@ -49,6 +54,11 @@ #define COMPASS_AKM9911_RESOLUTION (0.60f) #define COMPASS_AKM9911_POWER (10.f) #define COMPASS_AKM9911_MINDELAY (10000) +//COMPASS_ID_AK09912C +#define COMPASS_AKM9912_RANGE (9830.f) +#define COMPASS_AKM9912_RESOLUTION (0.15f) +#define COMPASS_AKM9912_POWER (10.f) +#define COMPASS_AKM9912_MINDELAY (10000) //COMPASS_ID_AMI30X #define COMPASS_AMI30X_RANGE (5461.f) #define COMPASS_AMI30X_RESOLUTION (0.9f) @@ -107,6 +117,11 @@ #define ACCEL_MPU9250_RESOLUTION (0.004f * GRAVITY_EARTH) #define ACCEL_MPU9250_POWER (0.5f) #define ACCEL_MPU9250_MINDELAY (5000) +//ACCEL_ID_MPU9255 +#define ACCEL_MPU9255_RANGE (2.f * GRAVITY_EARTH) +#define ACCEL_MPU9255_RESOLUTION (0.004f * GRAVITY_EARTH) +#define ACCEL_MPU9255_POWER (0.5f) +#define ACCEL_MPU9255_MINDELAY (5000) //ACCEL_ID_MPU9150 #define ACCEL_MPU9150_RANGE (2.f * GRAVITY_EARTH) #define ACCEL_MPU9150_RESOLUTION (0.004f * GRAVITY_EARTH) @@ -189,6 +204,11 @@ #define GYRO_MPU9250_RESOLUTION (2000.f / 32768.f * RAD_P_DEG) #define GYRO_MPU9250_POWER (5.5f) #define GYRO_MPU9250_MINDELAY (5000) +//GYRO MPU9255 +#define GYRO_MPU9255_RANGE (2000.f * RAD_P_DEG) +#define GYRO_MPU9255_RESOLUTION (2000.f / 32768.f * RAD_P_DEG) +#define GYRO_MPU9255_POWER (5.5f) +#define GYRO_MPU9255_MINDELAY (5000) //GYRO MPU6500 #define GYRO_MPU6500_RANGE (2000.f * RAD_P_DEG) #define GYRO_MPU6500_RESOLUTION (2000.f / 32768.f * RAD_P_DEG) diff --git a/6515/libsensors_iio/sensors.h b/6515/libsensors_iio/sensors.h index 84263f7..e299228 100644 --- a/6515/libsensors_iio/sensors.h +++ b/6515/libsensors_iio/sensors.h @@ -111,7 +111,63 @@ enum { { name, vendor, version, handle, type, maxRange, resolution, power, minDelay, fifoReservedEventCount, fifoMaxEventCount, reserved[] } */ -#if defined ANDROID_KITKAT +#if defined ANDROID_LOLLIPOP +static struct sensor_t sBaseSensorList[] = +{ + {(const char *)("MPL Gyroscope"), (const char *)("Invensense"), 1, + SENSORS_GYROSCOPE_HANDLE, + SENSOR_TYPE_GYROSCOPE, 2000.0f, 1.0f, 0.5f, 10000, 0, 124, 0,0,0,0,0,0}, + {"MPL Raw Gyroscope", "Invensense", 1, + SENSORS_RAW_GYROSCOPE_HANDLE, + SENSOR_TYPE_GYROSCOPE_UNCALIBRATED, 2000.0f, 1.0f, 0.5f, 10000, 0, 124, 0,0,0,0,0,0}, + {"MPL Accelerometer", "Invensense", 1, + SENSORS_ACCELERATION_HANDLE, + SENSOR_TYPE_ACCELEROMETER, 10240.0f, 1.0f, 0.5f, 10000, 0, 124, 0,0,0,0,0,0}, + {"MPL Magnetic Field", "Invensense", 1, + SENSORS_MAGNETIC_FIELD_HANDLE, + SENSOR_TYPE_MAGNETIC_FIELD, 10240.0f, 1.0f, 0.5f, 10000, 0, 124, 0,0,0,0,0,0}, + {"MPL Raw Magnetic Field", "Invensense", 1, + SENSORS_RAW_MAGNETIC_FIELD_HANDLE, + SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED, 10240.0f, 1.0f, 0.5f, 10000, 0, 124, 0,0,0,0,0,0}, +#ifdef ENABLE_PRESSURE + {"MPL Pressure", "Invensense", 1, + SENSORS_PRESSURE_HANDLE, + SENSOR_TYPE_PRESSURE, 10240.0f, 1.0f, 0.5f, 10000, 0, 165, 0,0,0,0,0,0}, +#endif + {"MPL Orientation", "Invensense", 1, + SENSORS_ORIENTATION_HANDLE, + SENSOR_TYPE_ORIENTATION, 360.0f, 1.0f, 9.7f, 10000, 0, 0, 0,0,0,0,0,0}, + {"MPL Rotation Vector", "Invensense", 1, + SENSORS_ROTATION_VECTOR_HANDLE, + SENSOR_TYPE_ROTATION_VECTOR, 10240.0f, 1.0f, 0.5f, 10000, 0, 0, 0,0,0,0,0,0}, + {"MPL Game Rotation Vector", "Invensense", 1, + SENSORS_GAME_ROTATION_VECTOR_HANDLE, + SENSOR_TYPE_GAME_ROTATION_VECTOR, 10240.0f, 1.0f, 0.5f, 10000, 0, 62, 0,0,0,0,0,0}, + {"MPL Linear Acceleration", "Invensense", 1, + SENSORS_LINEAR_ACCEL_HANDLE, + SENSOR_TYPE_LINEAR_ACCELERATION, 10240.0f, 1.0f, 0.5f, 10000, 0, 0, 0,0,0,0,0,0}, + {"MPL Gravity", "Invensense", 1, + SENSORS_GRAVITY_HANDLE, + SENSOR_TYPE_GRAVITY, 10240.0f, 1.0f, 0.5f, 10000, 0, 0, 0,0,0,0,0,0}, + {"MPL Significant Motion", "Invensense", 1, + SENSORS_SIGNIFICANT_MOTION_HANDLE, + SENSOR_TYPE_SIGNIFICANT_MOTION, 100.0f, 1.0f, 1.1f, 0, 0, 0, 0,0,0,0,0,0}, + {"MPL Step Detector", "Invensense", 1, + SENSORS_PEDOMETER_HANDLE, + SENSOR_TYPE_STEP_DETECTOR, 100.0f, 1.0f, 1.1f, 0, 0, 124, 0,0,0,0,0,0}, + {"MPL Step Counter", "Invensense", 1, + SENSORS_STEP_COUNTER_HANDLE, + SENSOR_TYPE_STEP_COUNTER, 100.0f, 1.0f, 1.1f, 0, 0, 0, 0,0,0,0,0,0}, + {"MPL Geomagnetic Rotation Vector", "Invensense", 1, + SENSORS_GEOMAGNETIC_ROTATION_VECTOR_HANDLE, + SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR, 10240.0f, 1.0f, 0.5f, 5000, 0, 0, 0,0,0,0,0,0}, +#ifdef ENABLE_DMP_SCREEN_AUTO_ROTATION + {"MPL Screen Orientation", "Invensense ", 1, + SENSORS_SCREEN_ORIENTATION_HANDLE, + SENSOR_TYPE_SCREEN_ORIENTATION, 100.0f, 1.0f, 1.1f, 0, 0, 0, 0,0,0,0,0,0}, +#endif +}; +#elif defined ANDROID_KITKAT static struct sensor_t sBaseSensorList[] = { {"MPL Gyroscope", "Invensense", 1, SENSORS_GYROSCOPE_HANDLE, diff --git a/6515/libsensors_iio/sensors_mpl.cpp b/6515/libsensors_iio/sensors_mpl.cpp index df0a97f..268b853 100755 --- a/6515/libsensors_iio/sensors_mpl.cpp +++ b/6515/libsensors_iio/sensors_mpl.cpp @@ -106,7 +106,7 @@ struct sensors_poll_context_t { int pollEvents(sensors_event_t* data, int count); int query(int what, int *value); int batch(int handle, int flags, int64_t period_ns, int64_t timeout); -#if defined ANDROID_KITKAT +#if defined ANDROID_KITKAT || defined ANDROID_LOLLIPOP int flush(int handle); #endif @@ -340,7 +340,8 @@ int sensors_poll_context_t::batch(int handle, int flags, int64_t period_ns, return mSensor->batch(handle, flags, period_ns, timeout); } -#if defined ANDROID_KITKAT +#if defined ANDROID_KITKAT || defined ANDROID_LOLLIPOP + void inv_pending_flush(int handle) { struct handle_entry *the_entry; pthread_mutex_lock(&flush_handles_mutex); @@ -410,7 +411,7 @@ static int poll__batch(struct sensors_poll_device_1 *dev, return ctx->batch(handle, flags, period_ns, timeout); } -#if defined ANDROID_KITKAT +#if defined ANDROID_KITKAT || defined ANDROID_LOLLIPOP static int poll__flush(struct sensors_poll_device_1 *dev, int handle) { @@ -437,7 +438,7 @@ static int open_sensors(const struct hw_module_t* module, const char* id, memset(&dev->device, 0, sizeof(sensors_poll_device_1)); dev->device.common.tag = HARDWARE_DEVICE_TAG; -#if defined ANDROID_KITKAT +#if defined ANDROID_KITKAT || defined ANDROID_LOLLIPOP dev->device.common.version = SENSORS_DEVICE_API_VERSION_1_3; dev->device.flush = poll__flush; #else diff --git a/6515/libsensors_iio/software/build/android/common.mk b/6515/libsensors_iio/software/build/android/common.mk index acd3deb..edf22a2 100644 --- a/6515/libsensors_iio/software/build/android/common.mk +++ b/6515/libsensors_iio/software/build/android/common.mk @@ -5,7 +5,15 @@ SHELL = /bin/bash ## defines # Build for Jellybean -BUILD_ANDROID_JELLYBEAN = $(shell test -d $(ANDROID_ROOT)/frameworks/native && echo 1) +#--yd BUILD_ANDROID_JELLYBEAN = $(shell test -d $(ANDROID_ROOT)/frameworks/native && echo 1) + +# Build for Lollipop +# ANDROID version check +BUILD_ANDROID_LOLLIPOP = $(shell test -d $(ANDROID_ROOT)/bionic/libc/kernel/uapi && echo 1) +#ANDROID version check END + +#--yd PRODUCT = generic_arm64 +#--yd TARGET = android ## libraries ## LIB_PREFIX = lib @@ -18,6 +26,7 @@ SHARED_LIB_EXT = so TARGET ?= android MLLITE_LIB_NAME ?= mllite +#--yd MLLITE_LIB_NAME ?= mllite_64 MPL_LIB_NAME ?= mplmpu ## applications ## @@ -36,12 +45,22 @@ ANDROID_LINK += -fpic ANDROID_LINK += -Wl,--gc-sections ANDROID_LINK += -Wl,--no-whole-archive ANDROID_LINK += -L$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib +ifeq ($(ARCH),arm) ANDROID_LINK += -L$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/system/lib +endif ANDROID_LINK_EXECUTABLE = $(ANDROID_LINK) +ifeq ($(ARCH),arm64) +ANDROID_LINK_EXECUTABLE += -Wl,-dynamic-linker,/system/bin/linker64 +else ANDROID_LINK_EXECUTABLE += -Wl,-dynamic-linker,/system/bin/linker +endif ifneq ($(BUILD_ANDROID_JELLYBEAN),1) -ANDROID_LINK_EXECUTABLE += -Wl,-T,$(ANDROID_ROOT)/build/core/armelf.x +#--yd ANDROID_LINK_EXECUTABLE += -Wl,-T,$(ANDROID_ROOT)/build/core/armelf.x +#--yd ANDROID_LINK_EXECUTABLE += -Wl,-T,$(ANDROID_ROOT)/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/lib/ldscripts/armelf.x +ifeq ($(ARCH),arm64) +ANDROID_LINK_EXECUTABLE += -Wl,-T,$(ANDROID_ROOT)/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/lib/ldscripts/aarch64linux.x +endif endif ANDROID_LINK_EXECUTABLE += $(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib/crtbegin_dynamic.o ANDROID_LINK_EXECUTABLE += $(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib/crtend_android.o @@ -54,20 +73,47 @@ ANDROID_INCLUDES += -I$(ANDROID_ROOT)/frameworks/base/include # ICS ANDROID_INCLUDES += -I$(ANDROID_ROOT)/frameworks/native/include # Jellybean ANDROID_INCLUDES += -I$(ANDROID_ROOT)/external/skia/include ANDROID_INCLUDES += -I$(ANDROID_ROOT)/out/target/product/generic/obj/include -ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libc/arch-arm/include +#--yd ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libc/arch-arm/include + +ifeq ($(BUILD_ANDROID_LOLLIPOP),1) +#for Android L--yd +ANDROID_INCLUDES += -DHAVE_SYS_UIO_H +ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libc/kernel/uapi #LP +ifeq ($(ARCH),arm64) +ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libc/kernel/uapi/asm-arm64 #LP +else +ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libc/kernel/uapi/asm-arm #LP +endif +endif +$(info YD>>>TARGET_ARCH=$(TARGET_ARCH), ARCH=$(ARCH)) +#--yd ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libc/arch-arm64/include +ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libc/arch-$(ARCH)/include ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libc/include ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libstdc++/include ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libc/kernel/common -ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libc/kernel/arch-arm +#--yd ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libc/kernel/arch-arm64 +ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libc/kernel/arch-$(ARCH) ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libm/include -ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libm/include/arch/arm +#--yd ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libm/include/arch/arm64 +ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libm/include/arch/$(ARCH) ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libthread_db/include -ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libm/arm +#--yd ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libm/arm64 +ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libm/$(ARCH) ANDROID_INCLUDES += -I$(ANDROID_ROOT)/bionic/libm + ANDROID_INCLUDES += -I$(ANDROID_ROOT)/out/target/product/generic/obj/SHARED_LIBRARIES/libm_intermediates +#--yd #for Android L--yd +#--yd ANDROID_INCLUDES += -DHAVE_SYS_UIO_H + KERNEL_INCLUDES = -I$(KERNEL_ROOT)/include +ifeq ($(ARCH),arm) +KERNEL_INCLUDES += -I$(KERNEL_ROOT)/arch/arm/include -I$(KERNEL_ROOT)/arch/arm/include/generated +endif + +#--yd KERNEL_INCLUDES = -I$(KERNEL_ROOT)/include -I$(KERNEL_ROOT)/include/uapi -I$(KERNEL_ROOT)/arch/arm64/include -I$(KERNEL_ROOT)/arch/arm64/include/generated -I$(KERNEL_ROOT)/arch/arm64/include/uapi + INV_INCLUDES = -I$(INV_ROOT)/software/core/driver/include INV_INCLUDES += -I$(MLLITE_DIR) INV_INCLUDES += -I$(MLLITE_DIR)/linux diff --git a/6515/libsensors_iio/software/core/driver/include/log.h b/6515/libsensors_iio/software/core/driver/include/log.h index 626b00e..651a22c 100644 --- a/6515/libsensors_iio/software/core/driver/include/log.h +++ b/6515/libsensors_iio/software/core/driver/include/log.h @@ -56,6 +56,11 @@ extern "C" { #endif +#if defined ANDROID_LOLLIPOP +//--yd +#define LOG ALOG +#endif + #if defined ANDROID_JELLYBEAN || defined ANDROID_KITKAT #define LOG ALOG #define LOG_ERRROR ANDROID_LOG_ERROR @@ -89,6 +94,18 @@ extern "C" { #else /* Based off the log priorities in android /system/core/include/android/log.h */ +#if defined ANDROID_LOLLIPOP +//--yd +#define MPL_LOG_UNKNOWN LOG_UNKNOWN +#define MPL_LOG_DEFAULT LOG_DEFAULT +#define MPL_LOG_VERBOSE LOG_VERBOSE +#define MPL_LOG_DEBUG LOG_DEBUG +#define MPL_LOG_INFO LOG_INFO +#define MPL_LOG_WARN LOG_WARN +#define MPL_LOG_ERROR LOG_ERROR +//--yd #define MPL_LOG_FATAL LOG_FATAL +#define MPL_LOG_SILENT LOG_SILENT +#else #define MPL_LOG_UNKNOWN (0) #define MPL_LOG_DEFAULT (1) #define MPL_LOG_VERBOSE (2) @@ -98,6 +115,7 @@ extern "C" { #define MPL_LOG_ERROR (6) #define MPL_LOG_SILENT (8) #endif +#endif /* @@ -129,17 +147,30 @@ extern "C" { __pragma (warning(suppress : 4127 )) \ } while (0) #else +#if defined ANDROID_LOLLIPOP +//--yd +#define MPL_LOGV(fmt, ...) \ + do { \ + if (0) \ + MPL_LOG(MPL_LOG_VERBOSE, MPL_LOG_TAG, fmt, ##__VA_ARGS__);\ + } while (0) +#else #define MPL_LOGV(fmt, ...) \ do { \ if (0) \ MPL_LOG(LOG_VERBOSE, MPL_LOG_TAG, fmt, ##__VA_ARGS__);\ } while (0) #endif - +#endif +#else +#if defined ANDROID_LOLLIPOP +//--yd +#define MPL_LOGV(fmt, ...) MPL_LOG(MPL_LOG_VERBOSE, MPL_LOG_TAG, fmt, ##__VA_ARGS__) #else #define MPL_LOGV(fmt, ...) MPL_LOG(LOG_VERBOSE, MPL_LOG_TAG, fmt, ##__VA_ARGS__) #endif #endif +#endif #ifndef CONDITION #define CONDITION(cond) ((cond) != 0) @@ -161,8 +192,13 @@ extern "C" { * Simplified macro to send a debug log message using the current MPL_LOG_TAG. */ #ifndef MPL_LOGD +#if defined ANDROID_LOLLIPOP +//--yd +#define MPL_LOGD(fmt, ...) MPL_LOG(MPL_LOG_DEBUG, MPL_LOG_TAG, fmt, ##__VA_ARGS__) +#else #define MPL_LOGD(fmt, ...) MPL_LOG(LOG_DEBUG, MPL_LOG_TAG, fmt, ##__VA_ARGS__) #endif +#endif #ifndef MPL_LOGD_IF #define MPL_LOGD_IF(cond, fmt, ...) \ @@ -178,9 +214,14 @@ extern "C" { #ifdef __KERNEL__ #define MPL_LOGI(fmt, ...) pr_info(KERN_INFO MPL_LOG_TAG fmt, ##__VA_ARGS__) #else +#if defined ANDROID_LOLLIPOP +//--yd +#define MPL_LOGI(fmt, ...) MPL_LOG(MPL_LOG_INFO, MPL_LOG_TAG, fmt, ##__VA_ARGS__) +#else #define MPL_LOGI(fmt, ...) MPL_LOG(LOG_INFO, MPL_LOG_TAG, fmt, ##__VA_ARGS__) #endif #endif +#endif #ifndef MPL_LOGI_IF #define MPL_LOGI_IF(cond, fmt, ...) \ @@ -214,16 +255,29 @@ extern "C" { #ifdef __KERNEL__ #define MPL_LOGE(fmt, ...) printk(KERN_ERR MPL_LOG_TAG fmt, ##__VA_ARGS__) #else +#if defined ANDROID_LOLLIPOP +//--yd +#define MPL_LOGE(fmt, ...) MPL_LOG(MPL_LOG_ERROR, MPL_LOG_TAG, fmt, ##__VA_ARGS__) +#else #define MPL_LOGE(fmt, ...) MPL_LOG(LOG_ERROR, MPL_LOG_TAG, fmt, ##__VA_ARGS__) #endif #endif +#endif #ifndef MPL_LOGE_IF +#if defined ANDROID_LOLLIPOP +//--yd +#define MPL_LOGE_IF(cond, fmt, ...) \ + ((CONDITION(cond)) \ + ? MPL_LOG(MPL_LOG_ERROR, MPL_LOG_TAG, fmt, ##__VA_ARGS__) \ + : (void)0) +#else #define MPL_LOGE_IF(cond, fmt, ...) \ ((CONDITION(cond)) \ ? MPL_LOG(LOG_ERROR, MPL_LOG_TAG, fmt, ##__VA_ARGS__) \ : (void)0) #endif +#endif /* --------------------------------------------------------------------- */ diff --git a/6515/libsensors_iio/software/core/mllite/build/android/shared.mk b/6515/libsensors_iio/software/core/mllite/build/android/shared.mk index 1418450..4872315 100644 --- a/6515/libsensors_iio/software/core/mllite/build/android/shared.mk +++ b/6515/libsensors_iio/software/core/mllite/build/android/shared.mk @@ -3,6 +3,17 @@ LIBRARY = $(LIB_PREFIX)$(MLLITE_LIB_NAME).$(SHARED_LIB_EXT) MK_NAME = $(notdir $(CURDIR)/$(firstword $(MAKEFILE_LIST))) +# ANDROID version check +BUILD_ANDROID_LOLLIPOP = $(shell test -d $(ANDROID_ROOT)/bionic/libc/kernel/uapi && echo 1) +$(info YD>>BUILD_ANDROID_LOLLIPOP = $(BUILD_ANDROID_LOLLIPOP)) +#ANDROID version check END + +ifeq ($(BUILD_ANDROID_LOLLIPOP),1) +CFLAGS += -DANDROID_LOLLIPOP +else +CFLAGS += -DANDROID_KITKAT +endif + CROSS ?= $(ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- COMP ?= $(CROSS)gcc LINK ?= $(CROSS)gcc @@ -23,7 +34,9 @@ CFLAGS += -DNDEBUG CFLAGS += -D_REENTRANT CFLAGS += -DLINUX CFLAGS += -DANDROID +ifeq ($(ARCH),arm) CFLAGS += -mthumb-interwork +endif CFLAGS += -fno-exceptions CFLAGS += -ffunction-sections CFLAGS += -funwind-tables @@ -47,7 +60,11 @@ LFLAGS += -shared LFLAGS += -Wl,-soname,$(LIBRARY) LFLAGS += -Wl,-shared,-Bsymbolic LFLAGS += $(ANDROID_LINK) +ifeq ($(ARCH),arm64) +LFLAGS += -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib +else LFLAGS += -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib:$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/system/lib +endif #################################################################################################### ## sources diff --git a/6515/libsensors_iio/software/core/mllite/linux/ml_load_dmp.c b/6515/libsensors_iio/software/core/mllite/linux/ml_load_dmp.c index 960bd2e..12d13dd 100644 --- a/6515/libsensors_iio/software/core/mllite/linux/ml_load_dmp.c +++ b/6515/libsensors_iio/software/core/mllite/linux/ml_load_dmp.c @@ -32,7 +32,7 @@ #define NUM_LOCAL_KEYS (sizeof(dmpTConfig)/sizeof(dmpTConfig[0])) #define NUM_LOCAL_KEYS (sizeof(dmpTConfig)/sizeof(dmpTConfig[0])) #define NUM_LOCAL_KEYS (sizeof(dmpTConfig)/sizeof(dmpTConfig[0])) -#define DMP_CODE_SIZE 2943 +#define DMP_CODE_SIZE 3035 #define FIFO_SIZE 1024 #define RESERVED_SIZE 32 #define MEMORY_SIZE 1024*4 @@ -42,203 +42,209 @@ #endif static const unsigned char dmpMemory[DMP_CODE_SIZE] = { - /* bank # 0 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x0b, 0x10, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x0a, - 0x06, 0xb8, 0x81, 0xa1, 0xe1, 0x89, 0xb2, 0x78, 0x37, 0xf8, 0x5a, 0x9c, 0xcf, 0xdd, 0x85, 0x3b, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0xf0, 0x19, 0x80, 0x40, 0x00, 0x00, 0x00, 0x02, 0xca, 0xe3, 0x09, 0x3e, 0x80, 0x00, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x6e, 0x00, 0x00, 0x06, 0x92, 0x0a, 0x16, 0xc0, 0xdf, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x2b, 0x00, 0x00, 0x16, 0x57, 0x00, 0x00, 0x03, 0x59, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xfa, 0x00, 0x02, 0x6c, 0x1d, 0x36, 0x66, 0x66, 0x66, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1f, 0xdb, 0xe2, 0xb9, 0x3b, 0x7b, 0x11, 0x7b, 0x32, 0x57, 0x83, 0x7b, - /* bank # 1 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0xeb, 0x85, 0x3f, 0xae, 0x14, 0x7b, - 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x72, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xff, 0xff, 0x00, 0x01, 0x00, 0x06, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x58, 0x05, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0xff, - 0x08, 0x00, 0x02, 0x00, 0x04, 0x00, 0x01, 0x00, 0x80, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x6a, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* bank # 2 */ - 0x00, 0x00, 0x00, 0x00, 0x01, 0x47, 0xae, 0x14, 0x3e, 0xb8, 0x51, 0xec, 0x00, 0x0f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x14, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x06, 0x74, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0e, 0x41, 0x28, 0x14, 0xc5, 0xaf, 0x3e, 0xf2, 0x59, 0xd9, 0x4a, 0x5f, 0xc2, 0x36, 0xd9, 0x51, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1b, 0x00, 0x00, 0x00, 0xd9, 0xe8, 0x3e, 0x30, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, - 0xff, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - /* bank # 3 */ - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x18, 0x74, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x10, 0x00, 0x96, 0x00, 0x3c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0xb3, 0x12, 0xb4, 0xcc, 0x0f, 0x1e, 0x1b, 0x51, 0xa0, 0xa3, 0x45, 0xc5, 0xad, 0x1e, 0x16, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x18, 0x85, 0x00, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x67, 0x7d, 0xdf, 0x7e, 0x72, 0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xb8, 0xaa, 0xb3, 0x8d, 0xb4, 0x98, 0x0d, 0x35, 0x5d, - 0xb2, 0xb6, 0xba, 0xaf, 0x8c, 0x96, 0x19, 0x8f, 0x9f, 0xb8, 0xa8, 0x0e, 0x16, 0x1e, 0xb4, 0x9a, - 0xaa, 0x88, 0x2c, 0x54, 0x7c, 0xd8, 0xf1, 0xb8, 0xb4, 0xb0, 0x97, 0x86, 0xa8, 0x31, 0x9b, 0x06, - 0x99, 0x07, 0xab, 0x97, 0x28, 0x88, 0x9b, 0xf0, 0x0c, 0x20, 0x14, 0x40, 0xb0, 0xb4, 0xb8, 0xf0, - 0xa8, 0x8a, 0x9a, 0x28, 0x50, 0x78, 0xb7, 0x9b, 0xa8, 0x29, 0x51, 0x79, 0x24, 0x70, 0x59, 0x44, - 0x69, 0x38, 0x64, 0x48, 0x31, 0xf1, 0xbb, 0xab, 0x88, 0x00, 0x2c, 0x54, 0x7c, 0xf0, 0xb3, 0x8b, - 0xb8, 0xa8, 0x04, 0x28, 0x50, 0x78, 0xf1, 0xb0, 0x88, 0xb4, 0x97, 0x26, 0xa8, 0x59, 0x98, 0xbb, - 0xab, 0xb3, 0x8b, 0x02, 0x26, 0x46, 0x66, 0xb0, 0xb8, 0xf0, 0x8a, 0x9c, 0xa8, 0x29, 0x51, 0x79, - 0x8b, 0x29, 0x51, 0x8a, 0x24, 0x70, 0x59, 0x8b, 0x20, 0x58, 0x8a, 0x44, 0x69, 0x38, 0x8b, 0x39, - 0x40, 0x8a, 0x64, 0x48, 0x31, 0x8b, 0x30, 0x49, 0x88, 0xf1, 0xac, 0x00, 0x2c, 0x54, 0x7c, 0xf0, - 0x8c, 0xa8, 0x04, 0x28, 0x50, 0x78, 0xf1, 0x88, 0x97, 0x26, 0xa8, 0x59, 0x98, 0xac, 0x8c, 0x02, - 0x26, 0x46, 0x66, 0xf0, 0x89, 0x9c, 0xa8, 0x29, 0x51, 0x79, 0x24, 0x70, 0x59, 0x44, 0x69, 0x38, - /* bank # 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0xa2, 0xd0, 0xdf, 0xbb, - 0x92, 0x82, 0xaf, 0xf1, 0xca, 0xf2, 0x35, 0xf1, 0x96, 0x8f, 0xa6, 0xd9, 0x00, 0xd8, 0xff + /* bank # 0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x0b, 0x10, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x0a, + 0x06, 0xb8, 0x81, 0xa1, 0xe1, 0x89, 0xb2, 0x78, 0x37, 0xf8, 0x5a, 0x9c, 0xcf, 0xdd, 0x85, 0x3b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0xf0, 0x19, 0x80, 0x40, 0x00, 0x00, 0x00, 0x02, 0xca, 0xe3, 0x09, 0x3e, 0x80, 0x00, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x6e, 0x00, 0x00, 0x06, 0x92, 0x0a, 0x16, 0xc0, 0xdf, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x2b, 0x00, 0x00, 0x16, 0x57, 0x00, 0x00, 0x03, 0x59, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xfa, 0x00, 0x02, 0x6c, 0x1d, 0x36, 0x66, 0x66, 0x66, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1f, 0xdb, 0xe2, 0xb9, 0x3b, 0x7b, 0x11, 0x7b, 0x32, 0x57, 0x83, 0x7b, + /* bank # 1 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0xeb, 0x85, 0x3f, 0xae, 0x14, 0x7b, + 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x72, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xff, 0xff, 0x00, 0x01, 0x00, 0x06, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x58, 0x05, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0xff, + 0x08, 0x00, 0x02, 0x00, 0x04, 0x00, 0x01, 0x00, 0x80, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x35, 0xa1, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x6a, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x15, 0xe3, 0xa3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* bank # 2 */ + 0x00, 0x00, 0x00, 0x00, 0x01, 0x47, 0xae, 0x14, 0x3e, 0xb8, 0x51, 0xec, 0x00, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x14, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x74, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0e, 0x41, 0x28, 0x14, 0xc5, 0xaf, 0x3e, 0xf2, 0x59, 0xd9, 0x4a, 0x5f, 0xc2, 0x36, 0xd9, 0x51, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1b, 0x00, 0x00, 0x00, 0xd9, 0xe8, 0x3e, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, + 0xff, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* bank # 3 */ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, + 0x00, 0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x11, 0xcc, 0xf7, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x10, 0x00, 0x96, 0x00, 0x3c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0d, 0x28, 0xb2, 0x44, 0xca, 0x7e, 0xb5, 0xa4, 0x53, 0x69, 0xd8, 0xff, 0xc4, 0xfc, 0xbc, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x18, 0x85, 0x00, 0x00, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x67, 0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, 0xf8, 0xa3, 0x85, 0x95, 0x19, 0xda, 0xf4, 0x05, 0xd8, 0xf2, 0xa6, 0xde, 0xdf, + 0xd8, 0xf1, 0xb8, 0xaa, 0xb3, 0x8d, 0xb4, 0x98, 0x0d, 0x35, 0x5d, 0xb2, 0xb6, 0xba, 0xaf, 0x8c, + 0x96, 0x19, 0x8f, 0x9f, 0xb8, 0xa8, 0x0e, 0x16, 0x1e, 0xb4, 0x9a, 0xaa, 0x88, 0x2c, 0x54, 0x7c, + 0xd8, 0xf1, 0xb8, 0xb4, 0xb0, 0x97, 0x86, 0xa8, 0x31, 0x9b, 0x06, 0x99, 0x07, 0xab, 0x97, 0x28, + 0x88, 0x9b, 0xf0, 0x0c, 0x20, 0x14, 0x40, 0xb0, 0xb4, 0xb8, 0xf0, 0xa8, 0x8a, 0x9a, 0x28, 0x50, + 0x78, 0xb7, 0x9b, 0xa8, 0x29, 0x51, 0x79, 0x24, 0x70, 0x59, 0x44, 0x69, 0x38, 0x64, 0x48, 0x31, + 0xf1, 0xbb, 0xab, 0x88, 0x00, 0x2c, 0x54, 0x7c, 0xf0, 0xb3, 0x8b, 0xb8, 0xa8, 0x04, 0x28, 0x50, + 0x78, 0xf1, 0xb0, 0x88, 0xb4, 0x97, 0x26, 0xa8, 0x59, 0x98, 0xbb, 0xab, 0xb3, 0x8b, 0x02, 0x26, + 0x46, 0x66, 0xb0, 0xb8, 0xf0, 0x8a, 0x9c, 0xa8, 0x29, 0x51, 0x79, 0x8b, 0x29, 0x51, 0x8a, 0x24, + 0x70, 0x59, 0x8b, 0x20, 0x58, 0x8a, 0x44, 0x69, 0x38, 0x8b, 0x39, 0x40, 0x8a, 0x64, 0x48, 0x31, + 0x8b, 0x30, 0x49, 0x88, 0xf1, 0xac, 0x00, 0x2c, 0x54, 0x7c, 0xf0, 0x8c, 0xa8, 0x04, 0x28, 0x50, + 0x78, 0xf1, 0x88, 0x97, 0x26, 0xa8, 0x59, 0x98, 0xac, 0x8c, 0x02, 0x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xba, 0xa2, 0xd0, 0xdf, 0xf1, 0xff, 0xd8, 0xf3, 0xb9, 0xa4, + 0xd0, 0xf8, 0xf9, 0xd1, 0xd9, 0xf2, 0xbb, 0xa2, 0xfa, 0xf8, 0xda, 0xf2, 0xbb, 0xa2, 0xfa, 0xd8, + 0xf2, 0xba, 0xa3, 0xde, 0xf8, 0xf8, 0xf8, 0xb3, 0x82, 0xb6, 0x93, 0x25, 0xdb, 0xf1, 0xb1, 0x8e, + 0xb5, 0x9d, 0x05, 0xd9, 0xf2, 0xbb, 0xa0, 0xd0, 0xfa, 0xf8, 0xd8, 0xf2, 0xb3, 0x82, 0xb5, 0x9f, + 0xbb, 0xaf, 0x40, 0x8f, 0xb7, 0x90, 0x1d, 0xda, 0x82, 0xb5, 0x9f, 0xa0, 0xd0, 0x44, 0xd8, 0xb7, + 0x80, 0x92, 0xaf, 0x49, 0xd1, 0xd9, 0xf1, 0xb9, 0xa4, 0xde, 0xa0, 0xde, 0xdf, 0xd8, 0xf1, 0x8c, + 0x9c, 0xbb, 0xac, 0xd0, 0x10, 0xac, 0xde, 0xba, 0xa2, 0xd0, 0xdf, 0xbb, 0x92, 0x82, 0xaf, 0xf1, + 0xca, 0xf2, 0x35, 0xf1, 0x96, 0x8f, 0xa6, 0xd9, 0x00, 0xd8, 0xff }; #define DMP_VERSION (dmpMemory) diff --git a/6515/libsensors_iio/software/core/mllite/linux/ml_sysfs_helper.c b/6515/libsensors_iio/software/core/mllite/linux/ml_sysfs_helper.c index d2b9543..eff5688 100644 --- a/6515/libsensors_iio/software/core/mllite/linux/ml_sysfs_helper.c +++ b/6515/libsensors_iio/software/core/mllite/linux/ml_sysfs_helper.c @@ -34,6 +34,7 @@ static char *chip_name[] = { "MPU3050", "MPU6500", "MPU9250", + "MPU9255", "MPU6XXX", "MPU9350", "MPU6515", diff --git a/6515/libsensors_iio/software/core/mllite/mpl.c b/6515/libsensors_iio/software/core/mllite/mpl.c index c0c7fca..cc881b6 100644..100755 --- a/6515/libsensors_iio/software/core/mllite/mpl.c +++ b/6515/libsensors_iio/software/core/mllite/mpl.c @@ -46,7 +46,7 @@ inv_error_t inv_init_mpl(void) return INV_SUCCESS; } -const char ml_ver[] = "InvenSense MA 5.2.0 K RC23"; +const char ml_ver[] = "InvenSense MA 5.2.0 L RC26"; /** * @brief used to get the MPL version. diff --git a/6515/libsensors_iio/software/core/mpl/build/android/shared.mk b/6515/libsensors_iio/software/core/mpl/build/android/shared.mk index 1d6f904..0963bb4 100644 --- a/6515/libsensors_iio/software/core/mpl/build/android/shared.mk +++ b/6515/libsensors_iio/software/core/mpl/build/android/shared.mk @@ -3,6 +3,17 @@ LIBRARY = $(LIB_PREFIX)$(MPL_LIB_NAME).$(SHARED_LIB_EXT) MK_NAME = $(notdir $(CURDIR)/$(firstword $(MAKEFILE_LIST))) +# ANDROID version check +BUILD_ANDROID_LOLLIPOP = $(shell test -d $(ANDROID_ROOT)/bionic/libc/kernel/uapi && echo 1) +$(info YD>>BUILD_ANDROID_LOLLIPOP = $(BUILD_ANDROID_LOLLIPOP)) +#ANDROID version check END + +ifeq ($(BUILD_ANDROID_LOLLIPOP),1) +CFLAGS += -DANDROID_LOLLIPOP +else +CFLAGS += -DANDROID_KITKAT +endif + CROSS ?= $(ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- COMP ?= $(CROSS)gcc LINK ?= $(CROSS)gcc @@ -25,7 +36,9 @@ CFLAGS += -DNDEBUG CFLAGS += -D_REENTRANT CFLAGS += -DLINUX CFLAGS += -DANDROID +ifeq ($(ARCH),arm) CFLAGS += -mthumb-interwork +endif CFLAGS += -fno-exceptions CFLAGS += -ffunction-sections CFLAGS += -funwind-tables @@ -42,12 +55,17 @@ LLINK += -lcutils LLINK += -lgcc LLINK += -ldl + LFLAGS += $(CMDLINE_LFLAGS) LFLAGS += -shared LFLAGS += -Wl,-soname,$(LIBRARY) LFLAGS += -Wl,-shared,-Bsymbolic LFLAGS += $(ANDROID_LINK) +ifeq ($(ARCH),arm64) +LFLAGS += -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib +else LFLAGS += -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib:$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/system/lib +endif #################################################################################################### ## sources diff --git a/6515/libsensors_iio/software/simple_apps/devnode_parser/build/android/inv_devnode_parser-shared b/6515/libsensors_iio/software/simple_apps/devnode_parser/build/android/inv_devnode_parser-shared Binary files differindex 6ced019..56d04f9 100755 --- a/6515/libsensors_iio/software/simple_apps/devnode_parser/build/android/inv_devnode_parser-shared +++ b/6515/libsensors_iio/software/simple_apps/devnode_parser/build/android/inv_devnode_parser-shared diff --git a/6515/libsensors_iio/software/simple_apps/devnode_parser/build/android/shared.mk b/6515/libsensors_iio/software/simple_apps/devnode_parser/build/android/shared.mk index 38d1fb4..8e45293 100644 --- a/6515/libsensors_iio/software/simple_apps/devnode_parser/build/android/shared.mk +++ b/6515/libsensors_iio/software/simple_apps/devnode_parser/build/android/shared.mk @@ -2,7 +2,18 @@ EXEC = inv_devnode_parser$(SHARED_APP_SUFFIX) MK_NAME = $(notdir $(CURDIR)/$(firstword $(MAKEFILE_LIST))) -CROSS ?= $(ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- +# ANDROID version check +BUILD_ANDROID_LOLLIPOP = $(shell test -d $(ANDROID_ROOT)/bionic/libc/kernel/uapi && echo 1) +$(info YD>>BUILD_ANDROID_LOLLIPOP = $(BUILD_ANDROID_LOLLIPOP)) +#ANDROID version check END + +ifeq ($(BUILD_ANDROID_LOLLIPOP),1) +CFLAGS += -DANDROID_LOLLIPOP +else +CFLAGS += -DANDROID_KITKAT +endif + +#--yd CROSS ?= $(ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- COMP ?= $(CROSS)gcc LINK ?= $(CROSS)gcc @@ -17,13 +28,18 @@ include $(INV_ROOT)/software/build/android/common.mk CFLAGS += $(CMDLINE_CFLAGS) CFLAGS += $(ANDROID_COMPILE) CFLAGS += -Wall +ifeq ($(BUILD_ANDROID_LOLLIPOP),1) +else CFLAGS += -fpic +endif CFLAGS += -nostdlib CFLAGS += -DNDEBUG CFLAGS += -D_REENTRANT CFLAGS += -DLINUX CFLAGS += -DANDROID +ifeq ($(ARCH),arm) CFLAGS += -mthumb-interwork +endif CFLAGS += -fno-exceptions CFLAGS += -ffunction-sections CFLAGS += -funwind-tables @@ -48,7 +64,11 @@ LLINK += -lz LFLAGS += $(CMDLINE_LFLAGS) LFLAGS += $(ANDROID_LINK_EXECUTABLE) +ifeq ($(ARCH),arm64) +LRPATH = -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib +else LRPATH = -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib:$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/system/lib +endif #################################################################################################### ## sources diff --git a/6515/libsensors_iio/software/simple_apps/gesture_test/build/android/inv_gesture_test-shared b/6515/libsensors_iio/software/simple_apps/gesture_test/build/android/inv_gesture_test-shared Binary files differindex f59b8d3..9eabad9 100755 --- a/6515/libsensors_iio/software/simple_apps/gesture_test/build/android/inv_gesture_test-shared +++ b/6515/libsensors_iio/software/simple_apps/gesture_test/build/android/inv_gesture_test-shared diff --git a/6515/libsensors_iio/software/simple_apps/gesture_test/build/android/shared.mk b/6515/libsensors_iio/software/simple_apps/gesture_test/build/android/shared.mk index 8591982..67a20db 100644 --- a/6515/libsensors_iio/software/simple_apps/gesture_test/build/android/shared.mk +++ b/6515/libsensors_iio/software/simple_apps/gesture_test/build/android/shared.mk @@ -2,7 +2,18 @@ EXEC = inv_gesture_test$(SHARED_APP_SUFFIX) MK_NAME = $(notdir $(CURDIR)/$(firstword $(MAKEFILE_LIST))) -CROSS ?= $(ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- +# ANDROID version check +BUILD_ANDROID_LOLLIPOP = $(shell test -d $(ANDROID_ROOT)/bionic/libc/kernel/uapi && echo 1) +$(info YD>>BUILD_ANDROID_LOLLIPOP = $(BUILD_ANDROID_LOLLIPOP)) +#ANDROID version check END + +ifeq ($(BUILD_ANDROID_LOLLIPOP),1) +CFLAGS += -DANDROID_LOLLIPOP +else +CFLAGS += -DANDROID_KITKAT +endif + +#--yd CROSS ?= $(ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- COMP ?= $(CROSS)gcc LINK ?= $(CROSS)gcc @@ -18,13 +29,18 @@ include $(INV_ROOT)/software/build/android/common.mk CFLAGS += $(CMDLINE_CFLAGS) CFLAGS += $(ANDROID_COMPILE) CFLAGS += -Wall +ifeq ($(BUILD_ANDROID_LOLLIPOP),1) +else CFLAGS += -fpic +endif CFLAGS += -nostdlib CFLAGS += -DNDEBUG CFLAGS += -D_REENTRANT CFLAGS += -DLINUX CFLAGS += -DANDROID +ifeq ($(ARCH),arm) CFLAGS += -mthumb-interwork +endif CFLAGS += -fno-exceptions CFLAGS += -ffunction-sections CFLAGS += -funwind-tables @@ -51,7 +67,11 @@ LLINK += -lz LFLAGS += $(CMDLINE_LFLAGS) LFLAGS += $(ANDROID_LINK_EXECUTABLE) +ifeq ($(ARCH),arm64) +LRPATH = -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib +else LRPATH = -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib:$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/system/lib +endif #################################################################################################### ## sources diff --git a/6515/libsensors_iio/software/simple_apps/mpu_iio/build/android/inv_mpu_iio-shared b/6515/libsensors_iio/software/simple_apps/mpu_iio/build/android/inv_mpu_iio-shared Binary files differindex 209700b..943b747 100755 --- a/6515/libsensors_iio/software/simple_apps/mpu_iio/build/android/inv_mpu_iio-shared +++ b/6515/libsensors_iio/software/simple_apps/mpu_iio/build/android/inv_mpu_iio-shared diff --git a/6515/libsensors_iio/software/simple_apps/mpu_iio/build/android/shared.mk b/6515/libsensors_iio/software/simple_apps/mpu_iio/build/android/shared.mk index 2dda9e0..dc6c46b 100644 --- a/6515/libsensors_iio/software/simple_apps/mpu_iio/build/android/shared.mk +++ b/6515/libsensors_iio/software/simple_apps/mpu_iio/build/android/shared.mk @@ -2,7 +2,18 @@ EXEC = inv_mpu_iio$(SHARED_APP_SUFFIX) MK_NAME = $(notdir $(CURDIR)/$(firstword $(MAKEFILE_LIST))) -CROSS ?= $(ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- +# ANDROID version check +BUILD_ANDROID_LOLLIPOP = $(shell test -d $(ANDROID_ROOT)/bionic/libc/kernel/uapi && echo 1) +$(info YD>>BUILD_ANDROID_LOLLIPOP = $(BUILD_ANDROID_LOLLIPOP)) +#ANDROID version check END + +ifeq ($(BUILD_ANDROID_LOLLIPOP),1) +CFLAGS += -DANDROID_LOLLIPOP +else +CFLAGS += -DANDROID_KITKAT +endif + +#--yd CROSS ?= $(ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- COMP ?= $(CROSS)gcc LINK ?= $(CROSS)gcc @@ -18,13 +29,18 @@ include $(INV_ROOT)/software/build/android/common.mk CFLAGS += $(CMDLINE_CFLAGS) CFLAGS += $(ANDROID_COMPILE) CFLAGS += -Wall +ifeq ($(BUILD_ANDROID_LOLLIPOP),1) +else CFLAGS += -fpic +endif CFLAGS += -nostdlib CFLAGS += -DNDEBUG CFLAGS += -D_REENTRANT CFLAGS += -DLINUX CFLAGS += -DANDROID +ifeq ($(ARCH),arm) CFLAGS += -mthumb-interwork +endif CFLAGS += -fno-exceptions CFLAGS += -ffunction-sections CFLAGS += -funwind-tables @@ -35,6 +51,10 @@ CFLAGS += -I$(MLLITE_DIR) CFLAGS += -I$(MPL_DIR) CFLAGS += $(INV_INCLUDES) CFLAGS += $(INV_DEFINES) +#for arm64 --yd +ifeq ($(ARCH),arm64) +#--yd CFLAGS += -Bdynamic -pie +endif LLINK = -lc LLINK += -lm @@ -45,11 +65,20 @@ LLINK += -ldl LLINK += -lstdc++ LLINK += -llog LLINK += -lz +ifeq ($(ARCH),arm64) +#--yd LLINK += -Wl,-dynamic-linker,/system/bin/linker64 -Wl,-z,nocopyreloc +#--yd LLINK += -Wl,-rpath-link=out/target/product/generic_arm64/obj/lib +#--yd LLINK += -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,-maarch64linux -Wl,--no-undefined +endif LFLAGS += $(CMDLINE_LFLAGS) LFLAGS += $(ANDROID_LINK_EXECUTABLE) +ifeq ($(ARCH),arm64) +LRPATH = -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib +else LRPATH = -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib:$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/system/lib +endif #################################################################################################### ## sources diff --git a/6515/libsensors_iio/software/simple_apps/playback/linux/build/android/inv_playback-shared b/6515/libsensors_iio/software/simple_apps/playback/linux/build/android/inv_playback-shared Binary files differindex 692612e..4ba5116 100755 --- a/6515/libsensors_iio/software/simple_apps/playback/linux/build/android/inv_playback-shared +++ b/6515/libsensors_iio/software/simple_apps/playback/linux/build/android/inv_playback-shared diff --git a/6515/libsensors_iio/software/simple_apps/playback/linux/build/android/shared.mk b/6515/libsensors_iio/software/simple_apps/playback/linux/build/android/shared.mk index dc33ee3..98d3954 100644 --- a/6515/libsensors_iio/software/simple_apps/playback/linux/build/android/shared.mk +++ b/6515/libsensors_iio/software/simple_apps/playback/linux/build/android/shared.mk @@ -2,7 +2,18 @@ EXEC = inv_playback$(SHARED_APP_SUFFIX) MK_NAME = $(notdir $(CURDIR)/$(firstword $(MAKEFILE_LIST))) -CROSS ?= $(ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- +# ANDROID version check +BUILD_ANDROID_LOLLIPOP = $(shell test -d $(ANDROID_ROOT)/bionic/libc/kernel/uapi && echo 1) +$(info YD>>BUILD_ANDROID_LOLLIPOP = $(BUILD_ANDROID_LOLLIPOP)) +#ANDROID version check END + +ifeq ($(BUILD_ANDROID_LOLLIPOP),1) +CFLAGS += -DANDROID_LOLLIPOP +else +CFLAGS += -DANDROID_KITKAT +endif + +#--yd CROSS ?= $(ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- COMP ?= $(CROSS)gcc LINK ?= $(CROSS)gcc @@ -19,13 +30,18 @@ include $(INV_ROOT)/software/build/android/common.mk CFLAGS += $(CMDLINE_CFLAGS) CFLAGS += $(ANDROID_COMPILE) CFLAGS += -Wall +ifeq ($(BUILD_ANDROID_LOLLIPOP),1) +else CFLAGS += -fpic +endif CFLAGS += -nostdlib CFLAGS += -DNDEBUG CFLAGS += -D_REENTRANT CFLAGS += -DLINUX CFLAGS += -DANDROID +ifeq ($(ARCH),arm) CFLAGS += -mthumb-interwork +endif CFLAGS += -fno-exceptions CFLAGS += -ffunction-sections CFLAGS += -funwind-tables @@ -51,7 +67,11 @@ LLINK += -lz LFLAGS += $(CMDLINE_LFLAGS) LFLAGS += $(ANDROID_LINK_EXECUTABLE) +ifeq ($(ARCH),arm64) +LRPATH = -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib +else LRPATH = -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib:$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/system/lib +endif #################################################################################################### ## sources diff --git a/6515/libsensors_iio/software/simple_apps/self_test/build/android/inv_self_test-shared b/6515/libsensors_iio/software/simple_apps/self_test/build/android/inv_self_test-shared Binary files differindex c537f77..c46b16a 100755 --- a/6515/libsensors_iio/software/simple_apps/self_test/build/android/inv_self_test-shared +++ b/6515/libsensors_iio/software/simple_apps/self_test/build/android/inv_self_test-shared diff --git a/6515/libsensors_iio/software/simple_apps/self_test/build/android/shared.mk b/6515/libsensors_iio/software/simple_apps/self_test/build/android/shared.mk index ed5fbf6..a00d732 100644 --- a/6515/libsensors_iio/software/simple_apps/self_test/build/android/shared.mk +++ b/6515/libsensors_iio/software/simple_apps/self_test/build/android/shared.mk @@ -2,7 +2,18 @@ EXEC = inv_self_test$(SHARED_APP_SUFFIX) MK_NAME = $(notdir $(CURDIR)/$(firstword $(MAKEFILE_LIST))) -CROSS ?= $(ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- +# ANDROID version check +BUILD_ANDROID_LOLLIPOP = $(shell test -d $(ANDROID_ROOT)/bionic/libc/kernel/uapi && echo 1) +$(info YD>>BUILD_ANDROID_LOLLIPOP = $(BUILD_ANDROID_LOLLIPOP)) +#ANDROID version check END + +ifeq ($(BUILD_ANDROID_LOLLIPOP),1) +CFLAGS += -DANDROID_LOLLIPOP +else +CFLAGS += -DANDROID_KITKAT +endif + +#--yd CROSS ?= $(ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- COMP ?= $(CROSS)gcc LINK ?= $(CROSS)gcc @@ -20,13 +31,18 @@ include $(INV_ROOT)/software/build/android/common.mk CFLAGS += $(CMDLINE_CFLAGS) CFLAGS += $(ANDROID_COMPILE) CFLAGS += -Wall +ifeq ($(BUILD_ANDROID_LOLLIPOP),1) +else CFLAGS += -fpic +endif CFLAGS += -nostdlib CFLAGS += -DNDEBUG CFLAGS += -D_REENTRANT CFLAGS += -DLINUX CFLAGS += -DANDROID +ifeq ($(ARCH),arm) CFLAGS += -mthumb-interwork +endif CFLAGS += -fno-exceptions CFLAGS += -ffunction-sections CFLAGS += -funwind-tables @@ -52,8 +68,11 @@ LLINK += -lz LFLAGS += $(CMDLINE_LFLAGS) LFLAGS += $(ANDROID_LINK_EXECUTABLE) - +ifeq ($(ARCH),arm64) +LRPATH = -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib +else LRPATH = -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib:$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/system/lib +endif #################################################################################################### ## sources diff --git a/6515/libsensors_iio/software/simple_apps/stress_iio/build/android/shared.mk b/6515/libsensors_iio/software/simple_apps/stress_iio/build/android/shared.mk index fe844a5..56e9125 100644 --- a/6515/libsensors_iio/software/simple_apps/stress_iio/build/android/shared.mk +++ b/6515/libsensors_iio/software/simple_apps/stress_iio/build/android/shared.mk @@ -2,7 +2,18 @@ EXEC = inv_stress_iio$(SHARED_APP_SUFFIX) MK_NAME = $(notdir $(CURDIR)/$(firstword $(MAKEFILE_LIST))) -CROSS ?= $(ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- +# ANDROID version check +BUILD_ANDROID_LOLLIPOP = $(shell test -d $(ANDROID_ROOT)/bionic/libc/kernel/uapi && echo 1) +$(info YD>>BUILD_ANDROID_LOLLIPOP = $(BUILD_ANDROID_LOLLIPOP)) +#ANDROID version check END + +ifeq ($(BUILD_ANDROID_LOLLIPOP),1) +CFLAGS += -DANDROID_LOLLIPOP +else +CFLAGS += -DANDROID_KITKAT +endif + +#--yd CROSS ?= $(ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- COMP ?= $(CROSS)gcc LINK ?= $(CROSS)gcc @@ -18,13 +29,18 @@ include $(INV_ROOT)/software/build/android/common.mk CFLAGS += $(CMDLINE_CFLAGS) CFLAGS += $(ANDROID_COMPILE) CFLAGS += -Wall +ifeq ($(BUILD_ANDROID_LOLLIPOP),1) +else CFLAGS += -fpic +endif CFLAGS += -nostdlib CFLAGS += -DNDEBUG CFLAGS += -D_REENTRANT CFLAGS += -DLINUX CFLAGS += -DANDROID +ifeq ($(ARCH),arm) CFLAGS += -mthumb-interwork +endif CFLAGS += -fno-exceptions CFLAGS += -ffunction-sections CFLAGS += -funwind-tables @@ -49,7 +65,11 @@ LLINK += -lz LFLAGS += $(CMDLINE_LFLAGS) LFLAGS += $(ANDROID_LINK_EXECUTABLE) -LRPATH = -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib:$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/system/lib +ifeq ($(ARCH),arm64) +LRPATH = -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib +else +#--yd LRPATH = -Wl,-rpath,$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/obj/lib:$(ANDROID_ROOT)/out/target/product/$(PRODUCT)/system/lib +endif #################################################################################################### ## sources |