Lines Matching refs:en
1015 int MPLSensor::onDmp(int en) in onDmp() argument
1021 mDmpOn = en; in onDmp()
1038 } else if (status != en) { in onDmp()
1040 en, mpu.dmp_on, getTimestamp()); in onDmp()
1041 if (write_sysfs_int(mpu.dmp_on, en) < 0) { in onDmp()
1044 mDmpOn = en; in onDmp()
1046 if(!en) { in onDmp()
1052 en, mpu.dmp_int_on, getTimestamp()); in onDmp()
1053 if (write_sysfs_int(mpu.dmp_int_on, en) < 0) { in onDmp()
1058 if (!en) { in onDmp()
1060 en, mpu.dmp_event_int_on, getTimestamp()); in onDmp()
1061 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in onDmp()
1067 mDmpOn = en; in onDmp()
1069 if(!en) { in onDmp()
1079 int MPLSensor::setDmpFeature(int en) in setDmpFeature() argument
1084 if ((mFeatureActiveMask & DMP_FEATURE_MASK) || en) { in setDmpFeature()
1177 int MPLSensor::enablePedIndicator(int en) in enablePedIndicator() argument
1182 if (en) { in enablePedIndicator()
1217 LOGV_IF(ENG_VERBOSE, "HAL:Toggling step indicator to %d", en); in enablePedIndicator()
1219 en, mpu.step_indicator_on, getTimestamp()); in enablePedIndicator()
1220 if (write_sysfs_int(mpu.step_indicator_on, en) < 0) { in enablePedIndicator()
1250 int MPLSensor::enablePedStandalone(int en) in enablePedStandalone() argument
1254 if (!en) { in enablePedStandalone()
1303 int MPLSensor:: enablePedStandaloneData(int en) in enablePedStandaloneData() argument
1311 en, mpu.step_detector_on, getTimestamp()); in enablePedStandaloneData()
1312 if (write_sysfs_int(mpu.step_detector_on, en) < 0) { in enablePedStandaloneData()
1319 en, mpu.step_indicator_on, getTimestamp()); in enablePedStandaloneData()
1320 if (write_sysfs_int(mpu.step_indicator_on, en) < 0) { in enablePedStandaloneData()
1325 if (!en) { in enablePedStandaloneData()
1368 int MPLSensor::enablePedQuaternion(int en) in enablePedQuaternion() argument
1372 if (!en) { in enablePedQuaternion()
1389 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in enablePedQuaternion()
1421 int MPLSensor::enablePedQuaternionData(int en) in enablePedQuaternionData() argument
1429 en, mpu.ped_q_on, getTimestamp()); in enablePedQuaternionData()
1430 if (write_sysfs_int(mpu.ped_q_on, en) < 0) { in enablePedQuaternionData()
1435 if (!en) { in enablePedQuaternionData()
1527 int MPLSensor::enable6AxisQuaternion(int en) in enable6AxisQuaternion() argument
1531 if (!en) { in enable6AxisQuaternion()
1549 int MPLSensor::enable6AxisQuaternionData(int en) in enable6AxisQuaternionData() argument
1557 en, mpu.six_axis_q_on, getTimestamp()); in enable6AxisQuaternionData()
1558 if (write_sysfs_int(mpu.six_axis_q_on, en) < 0) { in enable6AxisQuaternionData()
1563 if (!en) { in enable6AxisQuaternionData()
1680 int MPLSensor::enableLPQuaternion(int en) in enableLPQuaternion() argument
1684 if (!en) { in enableLPQuaternion()
1702 int MPLSensor::enableQuaternionData(int en) in enableQuaternionData() argument
1710 en, mpu.three_axis_q_on, getTimestamp()); in enableQuaternionData()
1711 if (write_sysfs_int(mpu.three_axis_q_on, en) < 0) { in enableQuaternionData()
1716 if (!en) { in enableQuaternionData()
1741 int MPLSensor::enableDmpPedometer(int en, int interruptMode) in enableDmpPedometer() argument
1756 if (en == 1) { in enableDmpPedometer()
1759 en, mpu.pedometer_on, getTimestamp()); in enableDmpPedometer()
1760 if (write_sysfs_int(mpu.pedometer_on, en) < 0) { in enableDmpPedometer()
1770 en, mpu.pedometer_int_on, getTimestamp()); in enableDmpPedometer()
1771 if (write_sysfs_int(mpu.pedometer_int_on, en) < 0) { in enableDmpPedometer()
1800 en, mpu.pedometer_on, getTimestamp()); in enableDmpPedometer()
1801 if (write_sysfs_int(mpu.pedometer_on, en) < 0) { in enableDmpPedometer()
1811 en, mpu.pedometer_int_on, getTimestamp()); in enableDmpPedometer()
1812 if (write_sysfs_int(mpu.pedometer_int_on, en) < 0) { in enableDmpPedometer()
1820 if ((res = setDmpFeature(en)) < 0) in enableDmpPedometer()
1829 if(en || enabled_sensors || mFeatureActiveMask) { in enableDmpPedometer()
1835 int MPLSensor::masterEnable(int en) in masterEnable() argument
1841 en, mpu.master_enable, getTimestamp()); in masterEnable()
1842 res = write_sysfs_int(mpu.master_enable, en); in masterEnable()
1846 int MPLSensor::enableGyro(int en) in enableGyro() argument
1854 en, mpu.gyro_enable, getTimestamp()); in enableGyro()
1855 res = write_sysfs_int(mpu.gyro_enable, en); in enableGyro()
1857 en, mpu.gyro_fifo_enable, getTimestamp()); in enableGyro()
1858 res += write_sysfs_int(mpu.gyro_fifo_enable, en); in enableGyro()
1860 if (!en) { in enableGyro()
1868 int MPLSensor::enableLowPowerAccel(int en) in enableLowPowerAccel() argument
1875 res = write_sysfs_int(mpu.motion_lpa_on, en); in enableLowPowerAccel()
1877 en, mpu.motion_lpa_on, getTimestamp()); in enableLowPowerAccel()
1881 int MPLSensor::enableAccel(int en) in enableAccel() argument
1889 en, mpu.accel_enable, getTimestamp()); in enableAccel()
1890 res = write_sysfs_int(mpu.accel_enable, en); in enableAccel()
1892 en, mpu.accel_fifo_enable, getTimestamp()); in enableAccel()
1893 res += write_sysfs_int(mpu.accel_fifo_enable, en); in enableAccel()
1895 if (!en) { in enableAccel()
1903 int MPLSensor::enableCompass(int en, int rawSensorRequested) in enableCompass() argument
1910 res = mCompassSensor->enable(ID_RM, en); in enableCompass()
1912 res = mCompassSensor->enable(ID_M, en); in enableCompass()
1914 if (en == 0 || res != 0) { in enableCompass()
1923 int MPLSensor::enablePressure(int en) in enablePressure() argument
1930 res = mPressureSensor->enable(ID_PS, en); in enablePressure()
2074 int MPLSensor::enableSensors(unsigned long sensors, int en, uint32_t changed) argument
2114 if (!cal_stored && (!en && (changed & (1 << Gyro)))) {
2142 if (!cal_stored && (!en && (changed & (1 << MagneticField)))) {
2363 int MPLSensor::setBatch(int en, int toggleEnable) argument
2383 if (en && (mFeatureActiveMask & INV_DMP_PEDOMETER) &&
2393 if (en && (mFeatureActiveMask & INV_DMP_PEDOMETER) &&
2408 if (en && (featureMask & INV_DMP_PED_INDICATOR) &&
2418 if (en && (mEnabled & (1 << GameRotationVector)) &&
2434 writeBatchTimeout(en);
2436 if (en) {
2486 int MPLSensor::writeBatchTimeout(int en) argument
2491 if (en) {
2829 int MPLSensor::enable(int32_t handle, int en) argument
2840 if (!en)
2852 (en? "en" : "dis"));
2853 enableDmpPedometer(en, 0);
2854 mDmpStepCountEnabled = !!en;
2861 (en? "en" : "dis"));
2862 enableDmpPedometer(en, 1);
2863 mDmpPedometerEnabled = !!en;
2876 (en? "en" : "dis"));
2877 enableDmpSignificantMotion(en);
2878 mDmpSignificantMotionEnabled = !!en;
2885 (en? "en" : "dis"));
2886 enableDmpOrientation(en && isDmpDisplayOrientationOn());
2887 mDmpOrientationEnabled = !!en;
2945 int newState = en ? 1 : 0;
3002 if (!en)
3004 if ((en && !(lastEnabled & VIRTUAL_SENSOR_ALL_MASK))
3006 (en && !(lastEnabled & VIRTUAL_SENSOR_9AXES_MASK))
3008 (!en && !(mEnabled & VIRTUAL_SENSOR_ALL_MASK))
3010 (!en && (mEnabled & VIRTUAL_SENSOR_MAG_6AXES_MASK))) {
3023 if (!en)
3025 if ((en && !(lastEnabled & VIRTUAL_SENSOR_9AXES_MASK))
3027 (!en && !(mEnabled & VIRTUAL_SENSOR_9AXES_MASK))) {
3036 if (!en)
3038 if ((en && !(lastEnabled & VIRTUAL_SENSOR_ALL_MASK))
3040 (en && !(lastEnabled & VIRTUAL_SENSOR_9AXES_MASK))
3042 (!en && !(mEnabled & VIRTUAL_SENSOR_ALL_MASK))
3044 (!en && (mEnabled & VIRTUAL_SENSOR_GYRO_6AXES_MASK))) {
4408 int MPLSensor::enableDmpOrientation(int en) argument
4422 if (en == 1) {
4425 en, mpu.display_orientation_on, getTimestamp());
4426 if (write_sysfs_int(mpu.display_orientation_on, en) < 0) {
4447 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) {
4470 en, mpu.dmp_event_int_on, getTimestamp());
4471 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) {
4482 if (en || mEnabled || mFeatureActiveMask) {
6184 int MPLSensor::enableDmpSignificantMotion(int en) argument
6200 if(en) {
6220 if ((res = setDmpFeature(en)) < 0)
6229 if(en || enabled_sensors || mFeatureActiveMask) {