Lines Matching refs:en
1123 int MPLSensor::onDmp(int en) in onDmp() argument
1129 mDmpOn = en; in onDmp()
1146 } else if (status != en) { in onDmp()
1148 en, mpu.dmp_on, getTimestamp()); in onDmp()
1149 if (write_sysfs_int(mpu.dmp_on, en) < 0) { in onDmp()
1152 mDmpOn = en; in onDmp()
1154 if(!en) { in onDmp()
1160 en, mpu.dmp_int_on, getTimestamp()); in onDmp()
1161 if (write_sysfs_int(mpu.dmp_int_on, en) < 0) { in onDmp()
1166 if (!en) { in onDmp()
1168 en, mpu.dmp_event_int_on, getTimestamp()); in onDmp()
1169 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in onDmp()
1175 mDmpOn = en; in onDmp()
1177 if(!en) { in onDmp()
1188 int MPLSensor::enablePedIndicator(int en) in enablePedIndicator() argument
1193 if (en) { in enablePedIndicator()
1206 LOGV_IF(ENG_VERBOSE, "HAL:Toggling step indicator to %d", en); in enablePedIndicator()
1208 en, mpu.step_indicator_on, getTimestamp()); in enablePedIndicator()
1209 if (write_sysfs_int(mpu.step_indicator_on, en) < 0) { in enablePedIndicator()
1224 int MPLSensor::enablePedStandalone(int en) in enablePedStandalone() argument
1228 if (!en) { in enablePedStandalone()
1277 int MPLSensor:: enablePedStandaloneData(int en) in enablePedStandaloneData() argument
1285 en, mpu.step_detector_on, getTimestamp()); in enablePedStandaloneData()
1286 if (write_sysfs_int(mpu.step_detector_on, en) < 0) { in enablePedStandaloneData()
1293 en, mpu.step_indicator_on, getTimestamp()); in enablePedStandaloneData()
1294 if (write_sysfs_int(mpu.step_indicator_on, en) < 0) { in enablePedStandaloneData()
1299 if (!en) { in enablePedStandaloneData()
1342 int MPLSensor::enablePedQuaternion(int en) in enablePedQuaternion() argument
1346 if (!en) { in enablePedQuaternion()
1363 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in enablePedQuaternion()
1395 int MPLSensor::enablePedQuaternionData(int en) in enablePedQuaternionData() argument
1403 en, mpu.ped_q_on, getTimestamp()); in enablePedQuaternionData()
1404 if (write_sysfs_int(mpu.ped_q_on, en) < 0) { in enablePedQuaternionData()
1417 if (!en) { in enablePedQuaternionData()
1494 int MPLSensor::enable6AxisQuaternion(int en) in enable6AxisQuaternion() argument
1498 if (!en) { in enable6AxisQuaternion()
1516 int MPLSensor::enable6AxisQuaternionData(int en) in enable6AxisQuaternionData() argument
1524 en, mpu.six_axis_q_on, getTimestamp()); in enable6AxisQuaternionData()
1525 if (write_sysfs_int(mpu.six_axis_q_on, en) < 0) { in enable6AxisQuaternionData()
1530 if (!en) { in enable6AxisQuaternionData()
1628 int MPLSensor::enableLPQuaternion(int en) in enableLPQuaternion() argument
1632 if (!en) { in enableLPQuaternion()
1650 int MPLSensor::enableQuaternionData(int en) in enableQuaternionData() argument
1658 en, mpu.three_axis_q_on, getTimestamp()); in enableQuaternionData()
1659 if (write_sysfs_int(mpu.three_axis_q_on, en) < 0) { in enableQuaternionData()
1664 if (!en) { in enableQuaternionData()
1674 int MPLSensor::enableDmpPedometer(int en, int interruptMode) in enableDmpPedometer() argument
1689 if (en == 1) { in enableDmpPedometer()
1692 en, mpu.pedometer_on, getTimestamp()); in enableDmpPedometer()
1693 if (write_sysfs_int(mpu.pedometer_on, en) < 0) { in enableDmpPedometer()
1702 en, mpu.pedometer_int_on, getTimestamp()); in enableDmpPedometer()
1703 if (write_sysfs_int(mpu.pedometer_int_on, en) < 0) { in enableDmpPedometer()
1741 en, mpu.dmp_event_int_on, getTimestamp()); in enableDmpPedometer()
1742 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in enableDmpPedometer()
1769 en, mpu.pedometer_on, getTimestamp()); in enableDmpPedometer()
1770 if (write_sysfs_int(mpu.pedometer_on, en) < 0) { in enableDmpPedometer()
1798 en, mpu.pedometer_int_on, getTimestamp()); in enableDmpPedometer()
1799 if (write_sysfs_int(mpu.pedometer_int_on, en) < 0) { in enableDmpPedometer()
1809 en, mpu.dmp_event_int_on, getTimestamp()); in enableDmpPedometer()
1810 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in enableDmpPedometer()
1817 if(en || enabled_sensors || mFeatureActiveMask) { in enableDmpPedometer()
1823 int MPLSensor::masterEnable(int en) in masterEnable() argument
1829 en, mpu.master_enable, getTimestamp()); in masterEnable()
1830 res = write_sysfs_int(mpu.master_enable, en); in masterEnable()
1834 int MPLSensor::enableGyro(int en) in enableGyro() argument
1842 en, mpu.gyro_enable, getTimestamp()); in enableGyro()
1843 res = write_sysfs_int(mpu.gyro_enable, en); in enableGyro()
1845 en, mpu.gyro_fifo_enable, getTimestamp()); in enableGyro()
1846 res += write_sysfs_int(mpu.gyro_fifo_enable, en); in enableGyro()
1848 if (!en) { in enableGyro()
1856 int MPLSensor::enableLowPowerAccel(int en) in enableLowPowerAccel() argument
1863 res = write_sysfs_int(mpu.motion_lpa_on, en); in enableLowPowerAccel()
1865 en, mpu.motion_lpa_on, getTimestamp()); in enableLowPowerAccel()
1869 int MPLSensor::enableAccel(int en) in enableAccel() argument
1877 en, mpu.accel_enable, getTimestamp()); in enableAccel()
1878 res = write_sysfs_int(mpu.accel_enable, en); in enableAccel()
1880 en, mpu.accel_fifo_enable, getTimestamp()); in enableAccel()
1881 res += write_sysfs_int(mpu.accel_fifo_enable, en); in enableAccel()
1883 if (!en) { in enableAccel()
1891 int MPLSensor::enableCompass(int en, int rawSensorRequested) in enableCompass() argument
1898 res = mCompassSensor->enable(ID_RM, en); in enableCompass()
1900 res = mCompassSensor->enable(ID_M, en); in enableCompass()
1902 if (en == 0 || res != 0) { in enableCompass()
1910 int MPLSensor::enablePressure(int en) in enablePressure() argument
1917 res = mPressureSensor->enable(ID_PS, en); in enablePressure()
2049 int MPLSensor::enableSensors(unsigned long sensors, int en, uint32_t changed) in enableSensors() argument
2087 if (!cal_stored && (!en && (changed & (1 << Gyro)))) { in enableSensors()
2115 if (!cal_stored && (!en && (changed & (1 << MagneticField)))) { in enableSensors()
2326 int MPLSensor::setBatch(int en, int toggleEnable) in setBatch() argument
2342 if (en) { in setBatch()
2366 if (en && (mFeatureActiveMask & INV_DMP_PEDOMETER) && in setBatch()
2376 if (en && (mFeatureActiveMask & INV_DMP_PEDOMETER) && in setBatch()
2389 if (en && (featureMask & INV_DMP_PED_INDICATOR) && in setBatch()
2399 if (en && (mEnabled & (1 << GameRotationVector)) && in setBatch()
2420 if (en) { in setBatch()
2758 int MPLSensor::enable(int32_t handle, int en) in enable() argument
2773 (en? "en" : "dis")); in enable()
2774 enableDmpPedometer(en, 0); in enable()
2775 mDmpStepCountEnabled = !!en; in enable()
2782 (en? "en" : "dis")); in enable()
2783 enableDmpPedometer(en, 1); in enable()
2784 mDmpPedometerEnabled = !!en; in enable()
2797 (en? "en" : "dis")); in enable()
2798 enableDmpSignificantMotion(en); in enable()
2799 mDmpSignificantMotionEnabled = !!en; in enable()
2806 (en? "en" : "dis")); in enable()
2807 enableDmpOrientation(en && isDmpDisplayOrientationOn()); in enable()
2808 mDmpOrientationEnabled = !!en; in enable()
2867 int newState = en ? 1 : 0; in enable()
2923 if (!en) in enable()
2925 if ((en && !(lastEnabled & VIRTUAL_SENSOR_ALL_MASK)) in enable()
2927 (en && !(lastEnabled & VIRTUAL_SENSOR_9AXES_MASK)) in enable()
2929 (!en && !(mEnabled & VIRTUAL_SENSOR_ALL_MASK)) in enable()
2931 (!en && (mEnabled & VIRTUAL_SENSOR_MAG_6AXES_MASK))) { in enable()
2944 if (!en) in enable()
2946 if ((en && !(lastEnabled & VIRTUAL_SENSOR_9AXES_MASK)) in enable()
2948 (!en && !(mEnabled & VIRTUAL_SENSOR_9AXES_MASK))) { in enable()
2957 if (!en) in enable()
2959 if ((en && !(lastEnabled & VIRTUAL_SENSOR_ALL_MASK)) in enable()
2961 (en && !(lastEnabled & VIRTUAL_SENSOR_9AXES_MASK)) in enable()
2963 (!en && !(mEnabled & VIRTUAL_SENSOR_ALL_MASK)) in enable()
2965 (!en && (mEnabled & VIRTUAL_SENSOR_GYRO_6AXES_MASK))) { in enable()
4258 int MPLSensor::enableDmpOrientation(int en) in enableDmpOrientation() argument
4272 if (en == 1) { in enableDmpOrientation()
4275 en, mpu.display_orientation_on, getTimestamp()); in enableDmpOrientation()
4276 if (write_sysfs_int(mpu.display_orientation_on, en) < 0) { in enableDmpOrientation()
4311 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in enableDmpOrientation()
4338 en, mpu.dmp_event_int_on, getTimestamp()); in enableDmpOrientation()
4339 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in enableDmpOrientation()
4347 if (en || mEnabled || mFeatureActiveMask) { in enableDmpOrientation()
6064 int MPLSensor::enableDmpSignificantMotion(int en) in enableDmpSignificantMotion() argument
6080 if(en) { in enableDmpSignificantMotion()
6141 en, mpu.dmp_event_int_on, getTimestamp()); in enableDmpSignificantMotion()
6142 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in enableDmpSignificantMotion()
6148 if(en || enabled_sensors || mFeatureActiveMask) { in enableDmpSignificantMotion()