From 85779371e527f94e865dc0450c703676d858bc30 Mon Sep 17 00:00:00 2001 From: Kyle Repinski Date: Mon, 9 Nov 2015 15:13:48 -0600 Subject: invensense: Remove MPU6050 ifdef stuff. The header files necessary for those sensors aren't even here anyway. --- invensense/libinvensense_hal/Android.mk | 1 - invensense/mlsdk/Android.mk | 2 - invensense/mlsdk/mllite/compass.c | 41 --- invensense/mlsdk/mllite/dmpKey.h | 34 --- invensense/mlsdk/mllite/ml.c | 105 +------- invensense/mlsdk/mllite/ml.h | 7 - invensense/mlsdk/mllite/mlBiasNoMotion.c | 86 ------- invensense/mlsdk/mllite/mlFIFO.c | 141 +---------- invensense/mlsdk/mllite/mlFIFOHW.c | 10 +- invensense/mlsdk/mllite/ml_mputest.c | 4 - invensense/mlsdk/mllite/mldl.c | 43 +--- invensense/mlsdk/mllite/mldl_cfg.h | 14 +- invensense/mlsdk/mllite/mldl_cfg_mpu.c | 3 - invensense/mlsdk/mllite/mlsupervisor.c | 10 - invensense/mlsdk/mlutils/mputest.c | 301 +---------------------- invensense/mlsdk/platform/include/mpu3050.h | 4 - invensense/mlsdk/platform/linux/mlsl_linux_mpu.c | 10 +- 17 files changed, 13 insertions(+), 803 deletions(-) diff --git a/invensense/libinvensense_hal/Android.mk b/invensense/libinvensense_hal/Android.mk index dbcd799..33e0e2f 100644 --- a/invensense/libinvensense_hal/Android.mk +++ b/invensense/libinvensense_hal/Android.mk @@ -23,7 +23,6 @@ LOCAL_MODULE := libinvensense_hal.$(TARGET_BOOTLOADER_BOARD_NAME) LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS := -DLOG_TAG=\"Sensors\" -Werror -Wall -LOCAL_CFLAGS += -DCONFIG_MPU_SENSORS_MPU3050=1 LOCAL_SRC_FILES := SensorBase.cpp MPLSensor.cpp diff --git a/invensense/mlsdk/Android.mk b/invensense/mlsdk/Android.mk index e57d2e5..3371c1a 100644 --- a/invensense/mlsdk/Android.mk +++ b/invensense/mlsdk/Android.mk @@ -6,7 +6,6 @@ LOCAL_MODULE_TAGS := optional LOCAL_MODULE := libmlplatform LOCAL_CFLAGS := -D_REENTRANT -DLINUX -DANDROID -LOCAL_CFLAGS += -DCONFIG_MPU_SENSORS_MPU3050 LOCAL_CFLAGS += -Wall -Werror LOCAL_C_INCLUDES := \ @@ -29,7 +28,6 @@ LOCAL_MODULE := libmllite LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS := -DNDEBUG -D_REENTRANT -DLINUX -DANDROID -LOCAL_CFLAGS += -DCONFIG_MPU_SENSORS_MPU3050 LOCAL_CFLAGS += -DUNICODE -D_UNICODE -DSK_RELEASE LOCAL_CFLAGS += -DI2CDEV=\"/dev/mpu\" LOCAL_CFLAGS += -Wall -Werror diff --git a/invensense/mlsdk/mllite/compass.c b/invensense/mlsdk/mllite/compass.c index dcae0cd..c008fbf 100644 --- a/invensense/mlsdk/mllite/compass.c +++ b/invensense/mlsdk/mllite/compass.c @@ -304,48 +304,7 @@ inv_error_t inv_get_compass_data(long *data) inv_obj.compass_overunder = (int)tmp[6]; } else { -#if defined CONFIG_MPU_SENSORS_MPU6050A2 || \ - defined CONFIG_MPU_SENSORS_MPU6050B1 - result = inv_get_external_sensor_data(data, 3); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } -#if defined CONFIG_MPU_SENSORS_MPU6050A2 - { - static unsigned char first = TRUE; - // one-off write to AKM - if (first) { - unsigned char regs[] = { - // beginning Mantis register for one-off slave R/W - MPUREG_I2C_SLV4_ADDR, - // the slave to write to - mldl_cfg->pdata->compass.address, - // the register to write to - /*mldl_cfg->compass->trigger->reg */ 0x0A, - // the value to write - /*mldl_cfg->compass->trigger->value */ 0x01, - // enable the write - 0xC0 - }; - result = - inv_serial_write(inv_get_serial_handle(), mldl_cfg->addr, - ARRAY_SIZE(regs), regs); - first = FALSE; - } else { - unsigned char regs[] = { - MPUREG_I2C_SLV4_CTRL, - 0xC0 - }; - result = - inv_serial_write(inv_get_serial_handle(), mldl_cfg->addr, - ARRAY_SIZE(regs), regs); - } - } -#endif -#else return INV_ERROR_INVALID_CONFIGURATION; -#endif // CONFIG_MPU_SENSORS_xxxx } data[0] = inv_q30_mult(data[0], inv_obj.compass_asa[0]); data[1] = inv_q30_mult(data[1], inv_obj.compass_asa[1]); diff --git a/invensense/mlsdk/mllite/dmpKey.h b/invensense/mlsdk/mllite/dmpKey.h index 0c5ab0a..3e2e667 100644 --- a/invensense/mlsdk/mllite/dmpKey.h +++ b/invensense/mlsdk/mllite/dmpKey.h @@ -372,7 +372,6 @@ #define DINC7A 0x7a #define DINC7B 0x7b -#if defined CONFIG_MPU_SENSORS_MPU3050 #define DINA80 0x80 #define DINA90 0x90 #define DINAA0 0xa0 @@ -394,39 +393,6 @@ #define DINAC3 0xc3 #define DINAC4 0xc4 #define DINAC5 0xc5 -#elif defined CONFIG_MPU_SENSORS_MPU6050A2 || \ - defined CONFIG_MPU_SENSORS_MPU6050B1 - -#define DINA80 0x80 -#define DINA90 0x90 -#define DINAA0 0xa0 -#define DINAC9 0xc9 -#define DINACB 0xcb -#define DINACD 0xcd -#define DINACF 0xcf -#define DINAC8 0xc8 -#define DINACA 0xca -#define DINACC 0xcc -#define DINACE 0xce -#define DINAD8 0xd8 -#define DINADD 0xdd -#define DINAF8 0xf0 -#define DINAFE 0xfe - -#define DINBF8 0xf8 -#define DINAC0 0xb0 -#define DINAC1 0xb1 -#define DINAC2 0xb4 -#define DINAC3 0xb5 -#define DINAC4 0xb8 -#define DINAC5 0xb9 -#define DINBC0 0xc0 -#define DINBC2 0xc2 -#define DINBC4 0xc4 -#define DINBC6 0xc6 -#else -#error No CONFIG_MPU_SENSORS_xxxx has been defined. -#endif #endif // DMPKEY_H__ diff --git a/invensense/mlsdk/mllite/ml.c b/invensense/mlsdk/mllite/ml.c index 5ee91d0..d830be7 100644 --- a/invensense/mlsdk/mllite/ml.c +++ b/invensense/mlsdk/mllite/ml.c @@ -233,13 +233,8 @@ inv_error_t inv_apply_calibration(void) if (NULL != mldl_cfg->accel){ RANGE_FIXEDPOINT_TO_FLOAT(mldl_cfg->accel->range, accelScale); inv_obj.accel_sens = (long)(accelScale * 65536L); - /* sensitivity adjustment, typically = 2 (for +/- 2 gee) */ -#if defined CONFIG_MPU_SENSORS_MPU6050A2 || \ - defined CONFIG_MPU_SENSORS_MPU6050B1 - inv_obj.accel_sens /= 32768 / mldl_cfg->accel_sens_trim; -#else - inv_obj.accel_sens /= 2; -#endif + /* sensitivity adjustment, typically = 2 (for +/- 2 gee) */ + inv_obj.accel_sens /= 2; } if (NULL != mldl_cfg->compass){ RANGE_FIXEDPOINT_TO_FLOAT(mldl_cfg->compass->range, magScale); @@ -460,7 +455,7 @@ inv_error_t inv_reset_motion(void) inv_obj.motion_state = INV_MOTION; inv_obj.flags[INV_MOTION_STATE_CHANGE] = INV_MOTION; inv_obj.no_motion_accel_time = inv_get_tick_count(); -#if defined CONFIG_MPU_SENSORS_MPU3050 + regs[0] = DINAD8 + 2; regs[1] = DINA0C; regs[2] = DINAD8 + 1; @@ -469,8 +464,7 @@ inv_error_t inv_reset_motion(void) LOG_RESULT_LOCATION(result); return result; } -#else -#endif + regs[0] = (unsigned char)((inv_obj.motion_duration >> 8) & 0xff); regs[1] = (unsigned char)(inv_obj.motion_duration & 0xff); result = inv_set_mpu_memory(KEY_D_1_106, 2, regs); @@ -804,12 +798,7 @@ inv_error_t inv_set_accel_calibration(float range, signed char *orientation) } if (mldl_cfg->accel->id) { -#if defined CONFIG_MPU_SENSORS_MPU6050A2 || \ - defined CONFIG_MPU_SENSORS_MPU6050B1 - unsigned char tmp[3] = { DINA0C, DINAC9, DINA2C }; -#else unsigned char tmp[3] = { DINA4C, DINACD, DINA6C }; -#endif struct mldl_cfg *mldl_cfg = inv_get_dl_config(); unsigned char regs[3]; unsigned short orient; @@ -831,15 +820,8 @@ inv_error_t inv_set_accel_calibration(float range, signed char *orientation) regs[0] = DINA26; regs[1] = DINA46; -#if defined CONFIG_MPU_SENSORS_MPU3050 || defined CONFIG_MPU_SENSORS_MPU6050A2 regs[2] = DINA66; -#else - if (MPL_PROD_KEY(mldl_cfg->product_id, mldl_cfg->product_revision) - == MPU_PRODUCT_KEY_B1_E1_5) - regs[2] = DINA76; - else - regs[2] = DINA66; -#endif + if (orient & 4) regs[0] |= 1; if (orient & 0x20) @@ -949,16 +931,9 @@ inv_error_t inv_set_gyro_calibration(float range, signed char *orientation) } { -#if defined CONFIG_MPU_SENSORS_MPU6050A2 || \ - defined CONFIG_MPU_SENSORS_MPU6050B1 - unsigned char tmpD = DINA4C; - unsigned char tmpE = DINACD; - unsigned char tmpF = DINA6C; -#else unsigned char tmpD = DINAC9; unsigned char tmpE = DINA2C; unsigned char tmpF = DINACB; -#endif regs[3] = DINA36; regs[4] = DINA56; regs[5] = DINA76; @@ -1125,16 +1100,11 @@ inv_error_t inv_set_dead_zone(void) if (cntrl_params.functions & INV_DEAD_ZONE) { reg = 0x08; } else { -#if defined CONFIG_MPU_SENSORS_MPU6050A2 || \ - defined CONFIG_MPU_SENSORS_MPU6050B1 - reg = 0; -#else if (inv_params_obj.bias_mode & INV_BIAS_FROM_LPF) { reg = 0x2; } else { reg = 0; } -#endif } result = inv_set_mpu_memory(KEY_D_0_163, 1, ®); @@ -1817,70 +1787,5 @@ void inv_set_mode_change(inv_error_t(*mode_change_func) } /** -* Mantis setup -*/ -#ifdef CONFIG_MPU_SENSORS_MPU6050B1 -inv_error_t inv_set_mpu_6050_config() -{ - long temp; - inv_error_t result; - unsigned char big8[4]; - unsigned char atc[4]; - long s[3], s2[3]; - int kk; - struct mldl_cfg *mldlCfg = inv_get_dl_config(); - - result = inv_serial_read(inv_get_serial_handle(), inv_get_mpu_slave_addr(), - 0x0d, 4, atc); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - - temp = atc[3] & 0x3f; - if (temp >= 32) - temp = temp - 64; - temp = (temp << 21) | 0x100000; - temp += (1L << 29); - temp = -temp; - result = inv_set_mpu_memory(KEY_D_ACT0, 4, inv_int32_to_big8(temp, big8)); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - - for (kk = 0; kk < 3; ++kk) { - s[kk] = atc[kk] & 0x3f; - if (s[kk] > 32) - s[kk] = s[kk] - 64; - s[kk] *= 2516582L; - } - - for (kk = 0; kk < 3; ++kk) { - s2[kk] = mldlCfg->pdata->orientation[kk * 3] * s[0] + - mldlCfg->pdata->orientation[kk * 3 + 1] * s[1] + - mldlCfg->pdata->orientation[kk * 3 + 2] * s[2]; - } - result = inv_set_mpu_memory(KEY_D_ACSX, 4, inv_int32_to_big8(s2[0], big8)); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - result = inv_set_mpu_memory(KEY_D_ACSY, 4, inv_int32_to_big8(s2[1], big8)); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - result = inv_set_mpu_memory(KEY_D_ACSZ, 4, inv_int32_to_big8(s2[2], big8)); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - - return result; -} -#endif - -/** * @} */ diff --git a/invensense/mlsdk/mllite/ml.h b/invensense/mlsdk/mllite/ml.h index 838cd49..67e47e2 100644 --- a/invensense/mlsdk/mllite/ml.h +++ b/invensense/mlsdk/mllite/ml.h @@ -456,13 +456,6 @@ struct inv_obj_t { /*API for setting bias update function */ inv_error_t inv_set_bias_update(unsigned short biasFunction); -#if defined CONFIG_MPU_SENSORS_MPU6050A2 || \ - defined CONFIG_MPU_SENSORS_MPU6050B1 - inv_error_t inv_turn_on_bias_from_no_motion(void); - inv_error_t inv_turn_off_bias_from_no_motion(void); - inv_error_t inv_set_mpu_6050_config(void); -#endif - /* Legacy functions for handling augmented data*/ inv_error_t inv_get_array(int dataSet, long *data); inv_error_t inv_get_float_array(int dataSet, float *data); diff --git a/invensense/mlsdk/mllite/mlBiasNoMotion.c b/invensense/mlsdk/mllite/mlBiasNoMotion.c index 0afe627..aaf98d2 100644 --- a/invensense/mlsdk/mllite/mlBiasNoMotion.c +++ b/invensense/mlsdk/mllite/mlBiasNoMotion.c @@ -71,30 +71,6 @@ inv_error_t inv_set_motion_callback(void (*func) (unsigned short motion_state)) return INV_SUCCESS; } -#if defined CONFIG_MPU_SENSORS_MPU6050A2 || \ - defined CONFIG_MPU_SENSORS_MPU6050B1 -/** Turns on the feature to compute gyro bias from No Motion */ -inv_error_t inv_turn_on_bias_from_no_motion() -{ - inv_error_t result; - unsigned char regs[3] = { 0x0d, DINA35, 0x5d }; - inv_params_obj.bias_mode |= INV_BIAS_FROM_NO_MOTION; - result = inv_set_mpu_memory(KEY_CFG_MOTION_BIAS, 3, regs); - return result; -} - -/** Turns off the feature to compute gyro bias from No Motion -*/ -inv_error_t inv_turn_off_bias_from_no_motion() -{ - inv_error_t result; - unsigned char regs[3] = { DINA90 + 8, DINA90 + 8, DINA90 + 8 }; - inv_params_obj.bias_mode &= ~INV_BIAS_FROM_NO_MOTION; - result = inv_set_mpu_memory(KEY_CFG_MOTION_BIAS, 3, regs); - return result; -} -#endif - inv_error_t inv_update_bias(void) { INVENSENSE_FUNC_START; @@ -237,7 +213,6 @@ inv_error_t MLPollMotionStatus(struct inv_obj_t * inv_obj) inv_obj->poll_no_motion = currentTime; -#if defined CONFIG_MPU_SENSORS_MPU3050 if (inv_get_gyro_present() && ((inv_params_obj.bias_mode & INV_BIAS_FROM_FAST_NO_MOTION) == 0)) { static long repeatBiasUpdateTime = 0; @@ -309,52 +284,7 @@ inv_error_t MLPollMotionStatus(struct inv_obj_t * inv_obj) } } } -#else // CONFIG_MPU_SENSORS_MPU3050 - if (inv_get_gyro_present() - && ((inv_params_obj.bias_mode & INV_BIAS_FROM_FAST_NO_MOTION) == 0)) { - result = inv_get_mpu_memory(KEY_D_1_98, 2, regs); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - - motionFlag = (unsigned short)regs[0] * 256 + (unsigned short)regs[1]; - - _mlDebug(MPL_LOGV("motionFlag from RAM : 0x%04X\n", motionFlag); - ) - if (motionFlag > 0) { - unsigned char biasReg[12]; - long biasTmp2[3], biasTmp[3]; - int i; - - if (inv_obj->last_motion != motionFlag) { - result = inv_get_mpu_memory(KEY_D_2_96, 12, biasReg); - for (i = 0; i < 3; i++) { - biasTmp2[i] = inv_big8_to_int32(&biasReg[i * 4]); - } - // Rotate bias vector by the transpose of the orientation matrix - for (i = 0; i < 3; ++i) { - biasTmp[i] = - inv_q30_mult(biasTmp2[0], - inv_obj->gyro_orient[i]) + - inv_q30_mult(biasTmp2[1], - inv_obj->gyro_orient[i + 3]) + - inv_q30_mult(biasTmp2[2], inv_obj->gyro_orient[i + 6]); - } - inv_obj->gyro_bias[0] = inv_q30_mult(biasTmp[0], 1501974482L); - inv_obj->gyro_bias[1] = inv_q30_mult(biasTmp[1], 1501974482L); - inv_obj->gyro_bias[2] = inv_q30_mult(biasTmp[2], 1501974482L); - } - inv_set_motion_state(INV_NO_MOTION); - } else { - // We are in a motion state - inv_set_motion_state(INV_MOTION); - } - inv_obj->last_motion = motionFlag; - - } -#endif // CONFIG_MPU_SENSORS_MPU3050 return INV_SUCCESS; } @@ -365,14 +295,6 @@ inv_error_t inv_enable_bias_no_motion(void) result = inv_register_fifo_rate_process(MLPollMotionStatus, INV_PRIORITY_BIAS_NO_MOTION); -#if defined CONFIG_MPU_SENSORS_MPU6050A2 || \ - defined CONFIG_MPU_SENSORS_MPU6050B1 - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - result = inv_turn_on_bias_from_no_motion(); -#endif return result; } @@ -381,13 +303,5 @@ inv_error_t inv_disable_bias_no_motion(void) inv_error_t result; inv_params_obj.bias_mode &= ~INV_BIAS_FROM_NO_MOTION; result = inv_unregister_fifo_rate_process(MLPollMotionStatus); -#if defined CONFIG_MPU_SENSORS_MPU6050A2 || \ - defined CONFIG_MPU_SENSORS_MPU6050B1 - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - result = inv_turn_off_bias_from_no_motion(); -#endif return result; } diff --git a/invensense/mlsdk/mllite/mlFIFO.c b/invensense/mlsdk/mllite/mlFIFO.c index 221e72d..a5d0c9f 100644 --- a/invensense/mlsdk/mllite/mlFIFO.c +++ b/invensense/mlsdk/mllite/mlFIFO.c @@ -33,15 +33,7 @@ #include #include "mpu.h" -#if defined CONFIG_MPU_SENSORS_MPU6050A2 -# include "mpu6050a2.h" -#elif defined CONFIG_MPU_SENSORS_MPU6050B1 -# include "mpu6050b1.h" -#elif defined CONFIG_MPU_SENSORS_MPU3050 -# include "mpu3050.h" -#else -#error Invalid or undefined CONFIG_MPU_SENSORS_MPUxxxx -#endif +#include "mpu3050.h" #include "mlFIFO.h" #include "mlFIFOHW.h" #include "dmpKey.h" @@ -765,18 +757,8 @@ inv_error_t inv_process_fifo_packet(const unsigned char *dmpData) */ long inv_decode_temperature(short tempReg) { -#if defined CONFIG_MPU_SENSORS_MPU6050A2 - // Celcius = 35 + (T + 3048.7)/325.9 - return 2906830L + inv_q30_mult((long)tempReg << 16, 3294697L); -#endif -#if defined CONFIG_MPU_SENSORS_MPU6050B1 - // Celcius = 35 + (T + 927.4)/360.6 - return 2462307L + inv_q30_mult((long)tempReg << 16, 2977653L); -#endif -#if defined CONFIG_MPU_SENSORS_MPU3050 // Celcius = 35 + (T + 13200)/280 return 5383314L + inv_q30_mult((long)tempReg << 16, 3834792L); -#endif } /** @internal @@ -957,24 +939,8 @@ inv_error_t inv_get_gyro_and_accel_sensor(long *data) */ inv_error_t inv_get_external_sensor_data(long *data, int size) { -#if defined CONFIG_MPU_SENSORS_MPU6050A2 || \ - defined CONFIG_MPU_SENSORS_MPU6050B1 - int ii; - if (data == NULL) - return INV_ERROR_INVALID_PARAMETER; - - if (!fifo_obj.data_config[CONFIG_RAW_EXTERNAL]) - return INV_ERROR_FEATURE_NOT_ENABLED; - - for (ii = 0; ii < size && ii < 6; ii++) { - data[ii] = fifo_obj.decoded[REF_RAW_EXTERNAL + ii]; - } - - return INV_SUCCESS; -#else memset(data, 0, COMPASS_NUM_AXES * sizeof(long)); return INV_ERROR_FEATURE_NOT_IMPLEMENTED; -#endif } /** @@ -1298,61 +1264,6 @@ inv_error_t inv_send_quaternion(uint_fast16_t accuracy) inv_error_t inv_send_sensor_data(uint_fast16_t elements, uint_fast16_t accuracy) { int result; -#if defined CONFIG_MPU_SENSORS_MPU6050A2 || \ - defined CONFIG_MPU_SENSORS_MPU6050B1 - unsigned char regs[7] = { DINAA0 + 3, DINAA0 + 3, DINAA0 + 3, - DINAA0 + 3, DINAA0 + 3, DINAA0 + 3, - DINAA0 + 3 - }; - - if (inv_get_state() < INV_STATE_DMP_OPENED) - return INV_ERROR_SM_IMPROPER_STATE; - - if (accuracy) - accuracy = INV_16_BIT; - - elements = inv_set_fifo_reference(elements, accuracy, REF_RAW, 7); - - if (elements & 1) - fifo_obj.data_config[CONFIG_TEMPERATURE] = 1 | INV_16_BIT; - else - fifo_obj.data_config[CONFIG_TEMPERATURE] = 0; - if (elements & 0x7e) - fifo_obj.data_config[CONFIG_RAW_DATA] = - (0x3f & (elements >> 1)) | INV_16_BIT; - else - fifo_obj.data_config[CONFIG_RAW_DATA] = 0; - - if (elements & INV_ELEMENT_1) { - regs[0] = DINACA; - } - if (elements & INV_ELEMENT_2) { - regs[1] = DINBC4; - } - if (elements & INV_ELEMENT_3) { - regs[2] = DINACC; - } - if (elements & INV_ELEMENT_4) { - regs[3] = DINBC6; - } - if (elements & INV_ELEMENT_5) { - regs[4] = DINBC0; - } - if (elements & INV_ELEMENT_6) { - regs[5] = DINAC8; - } - if (elements & INV_ELEMENT_7) { - regs[6] = DINBC2; - } - result = inv_set_mpu_memory(KEY_CFG_15, 7, regs); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - - return inv_set_footer(); - -#else INVENSENSE_FUNC_START; unsigned char regs[4] = { DINAA0 + 3, DINAA0 + 3, @@ -1402,7 +1313,6 @@ inv_error_t inv_send_sensor_data(uint_fast16_t elements, uint_fast16_t accuracy) fifo_obj.data_config[CONFIG_RAW_DATA] = 0; return inv_set_footer(); -#endif } /** Sends raw external data to the FIFO. @@ -1417,56 +1327,7 @@ inv_error_t inv_send_sensor_data(uint_fast16_t elements, uint_fast16_t accuracy) inv_error_t inv_send_external_sensor_data(uint_fast16_t elements, uint_fast16_t accuracy) { -#if defined CONFIG_MPU_SENSORS_MPU6050A2 || \ - defined CONFIG_MPU_SENSORS_MPU6050B1 - int result; - unsigned char regs[6] = { DINAA0 + 3, DINAA0 + 3, - DINAA0 + 3, DINAA0 + 3, - DINAA0 + 3, DINAA0 + 3 }; - - if (inv_get_state() < INV_STATE_DMP_OPENED) - return INV_ERROR_SM_IMPROPER_STATE; - - if (accuracy) - accuracy = INV_16_BIT; - - elements = inv_set_fifo_reference(elements, accuracy, REF_RAW_EXTERNAL, 6); - - if (elements) - fifo_obj.data_config[CONFIG_RAW_EXTERNAL] = elements | INV_16_BIT; - else - fifo_obj.data_config[CONFIG_RAW_EXTERNAL] = 0; - - if (elements & INV_ELEMENT_1) { - regs[0] = DINBC2; - } - if (elements & INV_ELEMENT_2) { - regs[1] = DINACA; - } - if (elements & INV_ELEMENT_3) { - regs[2] = DINBC4; - } - if (elements & INV_ELEMENT_4) { - regs[3] = DINBC0; - } - if (elements & INV_ELEMENT_5) { - regs[4] = DINAC8; - } - if (elements & INV_ELEMENT_6) { - regs[5] = DINACC; - } - - result = inv_set_mpu_memory(KEY_CFG_EXTERNAL, sizeof(regs), regs); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - - return inv_set_footer(); - -#else return INV_ERROR_FEATURE_NOT_IMPLEMENTED; // Feature not supported -#endif } /** diff --git a/invensense/mlsdk/mllite/mlFIFOHW.c b/invensense/mlsdk/mllite/mlFIFOHW.c index 1dd5294..e806b95 100644 --- a/invensense/mlsdk/mllite/mlFIFOHW.c +++ b/invensense/mlsdk/mllite/mlFIFOHW.c @@ -35,15 +35,7 @@ #include #include "mpu.h" -#if defined CONFIG_MPU_SENSORS_MPU6050A2 -# include "mpu6050a2.h" -#elif defined CONFIG_MPU_SENSORS_MPU6050B1 -# include "mpu6050b1.h" -#elif defined CONFIG_MPU_SENSORS_MPU3050 -# include "mpu3050.h" -#else -#error Invalid or undefined CONFIG_MPU_SENSORS_MPUxxxx -#endif +#include "mpu3050.h" #include "mlFIFOHW.h" #include "ml.h" #include "mldl.h" diff --git a/invensense/mlsdk/mllite/ml_mputest.c b/invensense/mlsdk/mllite/ml_mputest.c index d7fc608..ffb17cd 100644 --- a/invensense/mlsdk/mllite/ml_mputest.c +++ b/invensense/mlsdk/mllite/ml_mputest.c @@ -134,11 +134,7 @@ inv_error_t inv_self_test_factory_calibrate(void *mlsl_handle, */ inv_error_t inv_self_test_run(void) { -#ifdef CONFIG_MPU_SENSORS_MPU3050 return inv_self_test_factory_calibrate(inv_get_serial_handle(), TRUE); -#else - return inv_self_test_factory_calibrate(inv_get_serial_handle(), FALSE); -#endif } /** diff --git a/invensense/mlsdk/mllite/mldl.c b/invensense/mlsdk/mllite/mldl.c index 10470e6..ee7258f 100644 --- a/invensense/mlsdk/mllite/mldl.c +++ b/invensense/mlsdk/mllite/mldl.c @@ -39,15 +39,7 @@ #include #include "mpu.h" -#if defined CONFIG_MPU_SENSORS_MPU6050A2 -# include "mpu6050a2.h" -#elif defined CONFIG_MPU_SENSORS_MPU6050B1 -# include "mpu6050b1.h" -#elif defined CONFIG_MPU_SENSORS_MPU3050 -# include "mpu3050.h" -#else -#error Invalid or undefined CONFIG_MPU_SENSORS_MPUxxxx -#endif +#include "mpu3050.h" #include "mldl.h" #include "mldl_cfg.h" #include "compass.h" @@ -422,12 +414,10 @@ inv_error_t inv_get_dl_cfg_int(unsigned char triggers) { inv_error_t result = INV_SUCCESS; -#if defined CONFIG_MPU_SENSORS_MPU3050 /* Mantis has 8 bits of interrupt config bits */ if (triggers & !(BIT_MPU_RDY_EN | BIT_DMP_INT_EN | BIT_RAW_RDY_EN)) { return INV_ERROR_INVALID_PARAMETER; } -#endif mldlCfg.int_config = triggers; if (!mldlCfg.gyro_is_suspended) { @@ -617,7 +607,6 @@ inv_error_t inv_set_offsetTC(const unsigned char *tc) } if (!mldlCfg.gyro_is_suspended) { -#ifdef CONFIG_MPU_SENSORS_MPU3050 result = inv_serial_single_write(sMLSLHandle, mldlCfg.addr, MPUREG_XG_OFFS_TC, tc[0]); if (result) { @@ -636,36 +625,6 @@ inv_error_t inv_set_offsetTC(const unsigned char *tc) LOG_RESULT_LOCATION(result); return result; } -#else - unsigned char reg; - result = inv_serial_single_write(sMLSLHandle, mldlCfg.addr, - MPUREG_XG_OFFS_TC, - ((mldlCfg.offset_tc[0] << 1) - & BITS_XG_OFFS_TC)); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - reg = ((mldlCfg.offset_tc[1] << 1) & BITS_YG_OFFS_TC); -#ifdef CONFIG_MPU_SENSORS_MPU6050B1 - if (mldlCfg.pdata->level_shifter) - reg |= BIT_I2C_MST_VDDIO; -#endif - result = inv_serial_single_write(sMLSLHandle, mldlCfg.addr, - MPUREG_YG_OFFS_TC, reg); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - result = inv_serial_single_write(sMLSLHandle, mldlCfg.addr, - MPUREG_ZG_OFFS_TC, - ((mldlCfg.offset_tc[2] << 1) - & BITS_ZG_OFFS_TC)); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } -#endif } else { mldlCfg.gyro_needs_reset = TRUE; } diff --git a/invensense/mlsdk/mllite/mldl_cfg.h b/invensense/mlsdk/mllite/mldl_cfg.h index b4914e2..fb2e402 100644 --- a/invensense/mlsdk/mllite/mldl_cfg.h +++ b/invensense/mlsdk/mllite/mldl_cfg.h @@ -30,15 +30,7 @@ #include "mltypes.h" #include "mlsl.h" #include -#if defined CONFIG_MPU_SENSORS_MPU6050A2 -# include "mpu6050a2.h" -#elif defined CONFIG_MPU_SENSORS_MPU6050B1 -# include "mpu6050b1.h" -#elif defined CONFIG_MPU_SENSORS_MPU3050 -# include "mpu3050.h" -#else -#error Invalid or undefined CONFIG_MPU_SENSORS_MPUxxxx -#endif +#include "mpu3050.h" #include "log.h" @@ -106,10 +98,6 @@ struct mldl_cfg { unsigned char silicon_revision; unsigned char product_id; unsigned short gyro_sens_trim; -#if defined CONFIG_MPU_SENSORS_MPU6050A2 || \ - defined CONFIG_MPU_SENSORS_MPU6050B1 - unsigned short accel_sens_trim; -#endif /* Driver/Kernel related state information */ int gyro_is_bypassed; diff --git a/invensense/mlsdk/mllite/mldl_cfg_mpu.c b/invensense/mlsdk/mllite/mldl_cfg_mpu.c index 74c0f14..5a6f06a 100644 --- a/invensense/mlsdk/mllite/mldl_cfg_mpu.c +++ b/invensense/mlsdk/mllite/mldl_cfg_mpu.c @@ -79,9 +79,6 @@ void mpu_print_cfg(struct mldl_cfg * mldl_cfg) MPL_LOGD("mldl_cfg.silicon_revision = %02x\n", mldl_cfg->silicon_revision); MPL_LOGD("mldl_cfg.product_id = %02x\n", mldl_cfg->product_id); MPL_LOGD("mldl_cfg.gyro_sens_trim = %02x\n", mldl_cfg->gyro_sens_trim); -#if defined CONFIG_MPU_SENSORS_MPU6050A2 || defined CONFIG_MPU_SENSORS_MPU6050B1 - MPL_LOGD("mldl_cfg.accel_sens_trim = %02x\n", mldl_cfg->accel_sens_trim); -#endif if (mldl_cfg->accel) { MPL_LOGD("slave_accel->suspend = %p\n", mldl_cfg->accel->suspend); diff --git a/invensense/mlsdk/mllite/mlsupervisor.c b/invensense/mlsdk/mllite/mlsupervisor.c index ea6b7ec..a7b35df 100644 --- a/invensense/mlsdk/mllite/mlsupervisor.c +++ b/invensense/mlsdk/mllite/mlsupervisor.c @@ -86,16 +86,6 @@ void inv_init_sensor_fusion_supervisor(void) yas_filter_init(&f); f.init(&handle); -#if defined CONFIG_MPU_SENSORS_MPU6050A2 || \ - defined CONFIG_MPU_SENSORS_MPU6050B1 - if (inv_compass_present()) { - struct mldl_cfg *mldl_cfg = inv_get_dl_config(); - if (mldl_cfg->pdata->compass.bus == EXT_SLAVE_BUS_SECONDARY) { - (void)inv_send_external_sensor_data(INV_ELEMENT_1 | INV_ELEMENT_2 | INV_ELEMENT_3, INV_16_BIT); - } - } -#endif - if (ml_supervisor_cb.supervisor_reset_func != NULL) { ml_supervisor_cb.supervisor_reset_func(); } diff --git a/invensense/mlsdk/mlutils/mputest.c b/invensense/mlsdk/mlutils/mputest.c index ac0fa30..4a598ff 100644 --- a/invensense/mlsdk/mlutils/mputest.c +++ b/invensense/mlsdk/mlutils/mputest.c @@ -275,7 +275,6 @@ void inv_set_test_parameters(unsigned int slave_addr, float sensitivity, #define Y (1) #define Z (2) -#ifdef CONFIG_MPU_SENSORS_MPU3050 /** * @brief Test the gyroscope sensor. * Implements the core logic of the MPU Self Test. @@ -546,235 +545,6 @@ int inv_test_gyro_3050(void *mlsl_handle, return retVal; } -#else /* CONFIG_MPU_SENSORS_MPU3050 */ - -/** - * @brief Test the gyroscope sensor. - * Implements the core logic of the MPU Self Test but does not provide - * a PASS/FAIL output as in the MPU-3050 implementation. - * @param mlsl_handle - * serial interface handle to allow serial communication with the - * device, both gyro and accelerometer. - * @param gyro_biases - * output pointer to store the initial bias calculation provided - * by the MPU Self Test. Requires 3 elements for gyro X, Y, - * and Z. - * @param temp_avg - * output pointer to store the initial average temperature as - * provided by the MPU Self Test. - * - * @return 0 on success. - * A non-zero error code on error. - */ -int inv_test_gyro_6050(void *mlsl_handle, - short gyro_biases[3], short *temp_avg) -{ - inv_error_t result; - - int total_count = 0; - int total_count_axis[3] = {0, 0, 0}; - int packet_count; - short x[DEF_TEST_TIME_PER_AXIS / 8 * 4] = {0}; - short y[DEF_TEST_TIME_PER_AXIS / 8 * 4] = {0}; - short z[DEF_TEST_TIME_PER_AXIS / 8 * 4] = {0}; - unsigned char regs[7]; - - int temperature = 0; - float Avg[3]; - int i, j, tmp; - char tmpStr[200]; - - /* sample rate = 8ms */ - result = inv_serial_single_write( - mlsl_handle, mputestCfgPtr->addr, - MPUREG_SMPLRT_DIV, 0x07); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - - regs[0] = 0x03; /* filter = 42Hz, analog_sample rate = 1 KHz */ - switch (DEF_GYRO_FULLSCALE) { - case 2000: - regs[0] |= 0x18; - break; - case 1000: - regs[0] |= 0x10; - break; - case 500: - regs[0] |= 0x08; - break; - case 250: - default: - regs[0] |= 0x00; - break; - } - result = inv_serial_single_write( - mlsl_handle, mputestCfgPtr->addr, - MPUREG_CONFIG, regs[0]); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - result = inv_serial_single_write( - mlsl_handle, mputestCfgPtr->addr, - MPUREG_INT_ENABLE, 0x00); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - - /* 1st, timing test */ - for (j = 0; j < 3; j++) { - MPL_LOGI("Collecting gyro data from %s gyro PLL\n", a_name[j]); - - /* turn on all gyros, use gyro X for clocking - Set to Y and Z for 2nd and 3rd iteration */ -#ifdef CONFIG_MPU_SENSORS_MPU6050A2 - result = inv_serial_single_write( - mlsl_handle, mputestCfgPtr->addr, - MPUREG_PWR_MGMT_1, BITS_PWRSEL | (j + 1)); -#else - result = inv_serial_single_write( - mlsl_handle, mputestCfgPtr->addr, - MPUREG_PWR_MGMT_1, j + 1); -#endif - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - - /* wait for 2 ms after switching clock source */ - usleep(2000); - - /* enable/reset FIFO */ - result = inv_serial_single_write( - mlsl_handle, mputestCfgPtr->addr, - MPUREG_USER_CTRL, BIT_FIFO_EN | BIT_FIFO_RST); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - - tmp = (int)(test_setup.test_time_per_axis / 600); - while (tmp-- > 0) { - /* enable XYZ gyro in FIFO and nothing else */ - result = inv_serial_single_write(mlsl_handle, - mputestCfgPtr->addr, MPUREG_FIFO_EN, - BIT_GYRO_XOUT | BIT_GYRO_YOUT | BIT_GYRO_ZOUT); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - - /* wait for 600 ms for data */ - usleep(600000); - /* stop storing gyro in the FIFO */ - result = inv_serial_single_write( - mlsl_handle, mputestCfgPtr->addr, - MPUREG_FIFO_EN, 0x00); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - /* Getting number of bytes in FIFO */ - result = inv_serial_read( - mlsl_handle, mputestCfgPtr->addr, - MPUREG_FIFO_COUNTH, 2, dataout); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - /* number of 6 B packets in the FIFO */ - packet_count = CHARS_TO_SHORT(dataout) / 6; - sprintf(tmpStr, "Packet Count: %d - ", packet_count); - - if (abs(packet_count - test_setup.packet_thresh) - <= /* Within +/- total_timing_tol % range */ - test_setup.total_timing_tol * test_setup.packet_thresh) { - for (i = 0; i < packet_count; i++) { - /* getting FIFO data */ - result = inv_serial_read_fifo(mlsl_handle, - mputestCfgPtr->addr, 6, dataout); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - x[total_count + i] = CHARS_TO_SHORT(&dataout[0]); - y[total_count + i] = CHARS_TO_SHORT(&dataout[2]); - z[total_count + i] = CHARS_TO_SHORT(&dataout[4]); - if (VERBOSE_OUT) { - MPL_LOGI("Gyros %-4d : %+13d %+13d %+13d\n", - total_count + i, x[total_count + i], - y[total_count + i], z[total_count + i]); - } - } - total_count += packet_count; - total_count_axis[j] += packet_count; - sprintf(tmpStr, "%sOK", tmpStr); - } else { - sprintf(tmpStr, "%sNOK - samples ignored", tmpStr); - } - MPL_LOGI("%s\n", tmpStr); - } - - /* remove gyros from FIFO */ - result = inv_serial_single_write( - mlsl_handle, mputestCfgPtr->addr, - MPUREG_FIFO_EN, 0x00); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - - /* Read Temperature */ - result = inv_serial_read(mlsl_handle, mputestCfgPtr->addr, - MPUREG_TEMP_OUT_H, 2, dataout); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - temperature += (short)CHARS_TO_SHORT(dataout); - } - - MPL_LOGI("\n"); - MPL_LOGI("Total %d samples\n", total_count); - MPL_LOGI("\n"); - - /* 2nd, check bias from X and Y PLL clock source */ - tmp = total_count != 0 ? total_count : 1; - for (i = 0, - Avg[X] = .0f, Avg[Y] = .0f, Avg[Z] = .0f; - i < total_count; i++) { - Avg[X] += 1.f * x[i] / tmp; - Avg[Y] += 1.f * y[i] / tmp; - Avg[Z] += 1.f * z[i] / tmp; - } - MPL_LOGI("bias : %+13.3f %+13.3f %+13.3f (LSB)\n", - Avg[X], Avg[Y], Avg[Z]); - if (VERBOSE_OUT) { - MPL_LOGI(" : %+13.3f %+13.3f %+13.3f (dps)\n", - Avg[X] / adjGyroSens, - Avg[Y] / adjGyroSens, - Avg[Z] / adjGyroSens); - } - - temperature /= 3; - if (VERBOSE_OUT) - MPL_LOGI("Temperature : %+13.3f %13s %13s (deg. C)\n", - SHORT_TO_TEMP_C(temperature), "", ""); - - /* load into final storage */ - *temp_avg = (short)temperature; - gyro_biases[X] = FLOAT_TO_SHORT(Avg[X]); - gyro_biases[Y] = FLOAT_TO_SHORT(Avg[Y]); - gyro_biases[Z] = FLOAT_TO_SHORT(Avg[Z]); - - return INV_SUCCESS; -} - -#endif /* CONFIG_MPU_SENSORS_MPU3050 */ - #ifdef TRACK_IDS /** * @internal @@ -992,12 +762,12 @@ static inv_error_t inv_device_power_mgmt(void *mlsl_handle, result = inv_serial_single_write( mlsl_handle, mputestCfgPtr->addr, MPUREG_PWR_MGM, pwr_mgm | BIT_H_RESET); -#ifndef CONFIG_MPU_SENSORS_MPU6050A2 + if (result) { LOG_RESULT_LOCATION(result); return result; } -#endif + inv_sleep(5); /* re-read power mgmt reg - @@ -1011,17 +781,6 @@ static inv_error_t inv_device_power_mgmt(void *mlsl_handle, } /* wake up */ -#ifdef CONFIG_MPU_SENSORS_MPU6050A2 - if ((b & BITS_PWRSEL) != BITS_PWRSEL) { - result = inv_serial_single_write( - mlsl_handle, mputestCfgPtr->addr, - MPUREG_PWR_MGM, BITS_PWRSEL); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - } -#else if (pwr_mgm & BIT_SLEEP) { result = inv_serial_single_write( mlsl_handle, mputestCfgPtr->addr, @@ -1031,32 +790,10 @@ static inv_error_t inv_device_power_mgmt(void *mlsl_handle, return result; } } -#endif - inv_sleep(60); -#if defined(CONFIG_MPU_SENSORS_MPU6050A2) || \ - defined(CONFIG_MPU_SENSORS_MPU6050B1) - result = inv_serial_single_write( - mlsl_handle, mputestCfgPtr->addr, - MPUREG_INT_PIN_CFG, BIT_BYPASS_EN); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } -#endif + inv_sleep(60); } else { /* restore the power state the part was found in */ -#ifdef CONFIG_MPU_SENSORS_MPU6050A2 - if ((pwr_mgm & BITS_PWRSEL) != BITS_PWRSEL) { - result = inv_serial_single_write( - mlsl_handle, mputestCfgPtr->addr, - MPUREG_PWR_MGM, pwr_mgm); - if (result) { - LOG_RESULT_LOCATION(result); - return result; - } - } -#else if (pwr_mgm & BIT_SLEEP) { result = inv_serial_single_write( mlsl_handle, mputestCfgPtr->addr, @@ -1066,7 +803,6 @@ static inv_error_t inv_device_power_mgmt(void *mlsl_handle, return result; } } -#endif } return INV_SUCCESS; @@ -1140,15 +876,8 @@ int inv_mpu_test(void *mlsl_handle, uint_fast8_t provide_result) test_setup.gyro_fs = (int)(32768.f / adjGyroSens); /* collect gyro and temperature data */ -#ifdef CONFIG_MPU_SENSORS_MPU3050 result = inv_test_gyro_3050(mlsl_handle, gyro_biases, &temp_avg, provide_result); -#else - MPL_LOGW_IF(provide_result, - "Self Test for MPU-6050 devices is for bias correction only: " - "no test PASS/FAIL result will be provided\n"); - result = inv_test_gyro_6050(mlsl_handle, gyro_biases, &temp_avg); -#endif MPL_LOGI("\n"); MPL_LOGI("Test time : %ld ms\n", inv_get_tick_count() - testStart); @@ -1163,28 +892,12 @@ int inv_mpu_test(void *mlsl_handle, uint_fast8_t provide_result) accelSens[0] = (long)(32768L / fs); accelSens[1] = (long)(32768L / fs); accelSens[2] = (long)(32768L / fs); -#if defined CONFIG_MPU_SENSORS_MPU6050B1 - if (MPL_PROD_KEY(mputestCfgPtr->product_id, - mputestCfgPtr->product_revision) == MPU_PRODUCT_KEY_B1_E1_5) { - accelSens[2] /= 2; - } else { - unsigned short trim_corr = 16384 / mputestCfgPtr->accel_sens_trim; - accelSens[0] /= trim_corr; - accelSens[1] /= trim_corr; - accelSens[2] /= trim_corr; - } -#endif } else { /* would be 0, but 1 to avoid divide-by-0 below */ accelSens[0] = accelSens[1] = accelSens[2] = 1; } -#ifdef CONFIG_MPU_SENSORS_MPU3050 result = inv_test_accel(mlsl_handle, accel_biases, accelSens[2], provide_result); -#else - result = inv_test_accel(mlsl_handle, accel_biases, accelSens[2], - FALSE); -#endif if (result) return result; @@ -1342,17 +1055,9 @@ static inv_error_t test_get_data( inv_error_t result; unsigned char data[20]; struct ext_slave_descr *slave = mputestCfgPtr->accel; -#ifndef CONFIG_MPU_SENSORS_MPU3050 - struct ext_slave_platform_data *pdata = &mputestCfgPtr->pdata->accel; -#endif -#ifdef CONFIG_MPU_SENSORS_MPU3050 result = inv_serial_read(mlsl_handle, mputestCfgPtr->addr, 0x23, 6, data); -#else - result = inv_serial_read(mlsl_handle, pdata->address, slave->read_reg, - slave->read_len, data); -#endif if (result) { LOG_RESULT_LOCATION(result); return result; diff --git a/invensense/mlsdk/platform/include/mpu3050.h b/invensense/mlsdk/platform/include/mpu3050.h index c363a00..bd0ac32 100644 --- a/invensense/mlsdk/platform/include/mpu3050.h +++ b/invensense/mlsdk/platform/include/mpu3050.h @@ -27,10 +27,6 @@ #include #endif -#if !defined CONFIG_MPU_SENSORS_MPU3050 -#error MPU6000 build including MPU3050 header -#endif - #define MPU_NAME "mpu3050" #define DEFAULT_MPU_SLAVEADDR 0x68 diff --git a/invensense/mlsdk/platform/linux/mlsl_linux_mpu.c b/invensense/mlsdk/platform/linux/mlsl_linux_mpu.c index bb7b851..51cbebe 100644 --- a/invensense/mlsdk/platform/linux/mlsl_linux_mpu.c +++ b/invensense/mlsdk/platform/linux/mlsl_linux_mpu.c @@ -47,15 +47,7 @@ #include #include "mpu.h" -#if defined CONFIG_MPU_SENSORS_MPU6050A2 -# include "mpu6050a2.h" -#elif defined CONFIG_MPU_SENSORS_MPU6050B1 -# include "mpu6050b1.h" -#elif defined CONFIG_MPU_SENSORS_MPU3050 -# include "mpu3050.h" -#else -#error Invalid or undefined CONFIG_MPU_SENSORS_MPUxxxx -#endif +#include "mpu3050.h" #include "mlsl.h" #include "mlos.h" -- cgit v1.1