Lines Matching refs:mldlCfg
76 static struct mldl_cfg mldlCfg;
198 memset(&mldlCfg, 0, sizeof(mldlCfg));
203 mldlCfg.addr = 0x68; /* default incase the driver doesn't set it */
204 mldlCfg.accel = &gAccel;
205 mldlCfg.compass = &gCompass;
206 mldlCfg.pressure = &gPressure;
207 mldlCfg.pdata = &gPdata;
209 result = (inv_error_t) inv_mpu_open(&mldlCfg, sMLSLHandle,
224 result = (inv_error_t) inv_mpu_suspend(&mldlCfg,
231 result = (inv_error_t) inv_mpu_close(&mldlCfg, sMLSLHandle,
234 memset(&mldlCfg, 0, sizeof(mldlCfg));
271 mldlCfg.requested_sensors = sensors;
308 mldlCfg.requested_sensors = sensors;
309 result = inv_mpu_resume(&mldlCfg,
351 result = inv_mpu_suspend(&mldlCfg,
368 return &mldlCfg;
378 return mldlCfg.addr;
398 mldlCfg.dmp_enable = enableRun;
399 mldlCfg.fifo_enable = enableFIFO;
400 mldlCfg.gyro_needs_reset = TRUE;
432 mldlCfg.int_config = triggers;
433 if (!mldlCfg.gyro_is_suspended) {
434 result = inv_serial_single_write(sMLSLHandle, mldlCfg.addr,
436 (mldlCfg.int_config | mldlCfg.pdata->
439 mldlCfg.gyro_needs_reset = TRUE;
487 mldlCfg.lpf = lpf;
488 mldlCfg.divider = divider;
489 mldlCfg.gyro_needs_reset = TRUE;
512 mldlCfg.full_scale = MPU_FS_250DPS;
514 mldlCfg.full_scale = MPU_FS_500DPS;
516 mldlCfg.full_scale = MPU_FS_1000DPS;
518 mldlCfg.full_scale = MPU_FS_2000DPS;
526 mldlCfg.gyro_needs_reset = TRUE;
547 mldlCfg.ext_sync = extSync;
548 mldlCfg.gyro_needs_reset = TRUE;
557 mldlCfg.ignore_system_suspend = ignore;
597 mldlCfg.clk_src = clkSource;
598 mldlCfg.gyro_needs_reset = TRUE;
615 for (ii = 0; ii < ARRAY_SIZE(mldlCfg.offset_tc); ii++) {
616 mldlCfg.offset_tc[ii] = tc[ii];
619 if (!mldlCfg.gyro_is_suspended) {
621 result = inv_serial_single_write(sMLSLHandle, mldlCfg.addr,
627 result = inv_serial_single_write(sMLSLHandle, mldlCfg.addr,
633 result = inv_serial_single_write(sMLSLHandle, mldlCfg.addr,
641 result = inv_serial_single_write(sMLSLHandle, mldlCfg.addr,
643 ((mldlCfg.offset_tc[0] << 1)
649 reg = ((mldlCfg.offset_tc[1] << 1) & BITS_YG_OFFS_TC);
651 if (mldlCfg.pdata->level_shifter)
654 result = inv_serial_single_write(sMLSLHandle, mldlCfg.addr,
660 result = inv_serial_single_write(sMLSLHandle, mldlCfg.addr,
662 ((mldlCfg.offset_tc[2] << 1)
670 mldlCfg.gyro_needs_reset = TRUE;
689 sf = (2000L * 131) / mldlCfg.gyro_sens_trim;
690 for (ii = 0; ii < ARRAY_SIZE(mldlCfg.offset); ii++) {
692 mldlCfg.offset[ii] = offset[ii];
699 if (!mldlCfg.gyro_is_suspended) {
701 result = inv_serial_write(sMLSLHandle, mldlCfg.addr, 7, regs);
707 mldlCfg.gyro_needs_reset = TRUE;
743 if (mldlCfg.gyro_is_suspended) {
744 memcpy(buffer, &mldlCfg.ram[bank][memAddr], length);
747 result = inv_serial_read_mem(sMLSLHandle, mldlCfg.addr,
789 different = memcmp(&mldlCfg.ram[bank][memAddr], buffer, length);
790 memcpy(&mldlCfg.ram[bank][memAddr], buffer, length);
791 if (!mldlCfg.gyro_is_suspended) {
792 result = inv_serial_write_mem(sMLSLHandle, mldlCfg.addr,
799 mldlCfg.gyro_needs_reset = TRUE;
945 mldlCfg.dmp_cfg1 = (config >> 8);
946 mldlCfg.dmp_cfg2 = (config & 0xff);
976 return mldlCfg.silicon_revision;
986 return mldlCfg.product_revision;
1021 result = inv_serial_read(sMLSLHandle, mldlCfg.addr,