Lines Matching refs:en
1119 int MPLSensor::onDmp(int en) in onDmp() argument
1125 mDmpOn = en; in onDmp()
1142 } else if (status != en) { in onDmp()
1144 en, mpu.dmp_on, getTimestamp()); in onDmp()
1145 if (write_sysfs_int(mpu.dmp_on, en) < 0) { in onDmp()
1148 mDmpOn = en; in onDmp()
1150 if(!en) { in onDmp()
1156 en, mpu.dmp_int_on, getTimestamp()); in onDmp()
1157 if (write_sysfs_int(mpu.dmp_int_on, en) < 0) { in onDmp()
1162 if (!en) { in onDmp()
1164 en, mpu.dmp_event_int_on, getTimestamp()); in onDmp()
1165 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in onDmp()
1171 mDmpOn = en; in onDmp()
1173 if(!en) { in onDmp()
1184 int MPLSensor::enablePedIndicator(int en) in enablePedIndicator() argument
1189 if (en) { in enablePedIndicator()
1202 LOGV_IF(ENG_VERBOSE, "HAL:Toggling step indicator to %d", en); in enablePedIndicator()
1204 en, mpu.step_indicator_on, getTimestamp()); in enablePedIndicator()
1205 if (write_sysfs_int(mpu.step_indicator_on, en) < 0) { in enablePedIndicator()
1220 int MPLSensor::enablePedStandalone(int en) in enablePedStandalone() argument
1224 if (!en) { in enablePedStandalone()
1273 int MPLSensor:: enablePedStandaloneData(int en) in enablePedStandaloneData() argument
1281 en, mpu.step_detector_on, getTimestamp()); in enablePedStandaloneData()
1282 if (write_sysfs_int(mpu.step_detector_on, en) < 0) { in enablePedStandaloneData()
1289 en, mpu.step_indicator_on, getTimestamp()); in enablePedStandaloneData()
1290 if (write_sysfs_int(mpu.step_indicator_on, en) < 0) { in enablePedStandaloneData()
1295 if (!en) { in enablePedStandaloneData()
1338 int MPLSensor::enablePedQuaternion(int en) in enablePedQuaternion() argument
1342 if (!en) { in enablePedQuaternion()
1359 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in enablePedQuaternion()
1391 int MPLSensor::enablePedQuaternionData(int en) in enablePedQuaternionData() argument
1399 en, mpu.ped_q_on, getTimestamp()); in enablePedQuaternionData()
1400 if (write_sysfs_int(mpu.ped_q_on, en) < 0) { in enablePedQuaternionData()
1413 if (!en) { in enablePedQuaternionData()
1490 int MPLSensor::enable6AxisQuaternion(int en) in enable6AxisQuaternion() argument
1494 if (!en) { in enable6AxisQuaternion()
1512 int MPLSensor::enable6AxisQuaternionData(int en) in enable6AxisQuaternionData() argument
1520 en, mpu.six_axis_q_on, getTimestamp()); in enable6AxisQuaternionData()
1521 if (write_sysfs_int(mpu.six_axis_q_on, en) < 0) { in enable6AxisQuaternionData()
1526 if (!en) { in enable6AxisQuaternionData()
1624 int MPLSensor::enableLPQuaternion(int en) in enableLPQuaternion() argument
1628 if (!en) { in enableLPQuaternion()
1646 int MPLSensor::enableQuaternionData(int en) in enableQuaternionData() argument
1654 en, mpu.three_axis_q_on, getTimestamp()); in enableQuaternionData()
1655 if (write_sysfs_int(mpu.three_axis_q_on, en) < 0) { in enableQuaternionData()
1660 if (!en) { in enableQuaternionData()
1670 int MPLSensor::enableDmpPedometer(int en, int interruptMode) in enableDmpPedometer() argument
1685 if (en == 1) { in enableDmpPedometer()
1688 en, mpu.pedometer_on, getTimestamp()); in enableDmpPedometer()
1689 if (write_sysfs_int(mpu.pedometer_on, en) < 0) { in enableDmpPedometer()
1698 en, mpu.pedometer_int_on, getTimestamp()); in enableDmpPedometer()
1699 if (write_sysfs_int(mpu.pedometer_int_on, en) < 0) { in enableDmpPedometer()
1737 en, mpu.dmp_event_int_on, getTimestamp()); in enableDmpPedometer()
1738 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in enableDmpPedometer()
1765 en, mpu.pedometer_on, getTimestamp()); in enableDmpPedometer()
1766 if (write_sysfs_int(mpu.pedometer_on, en) < 0) { in enableDmpPedometer()
1794 en, mpu.pedometer_int_on, getTimestamp()); in enableDmpPedometer()
1795 if (write_sysfs_int(mpu.pedometer_int_on, en) < 0) { in enableDmpPedometer()
1805 en, mpu.dmp_event_int_on, getTimestamp()); in enableDmpPedometer()
1806 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in enableDmpPedometer()
1813 if(en || enabled_sensors || mFeatureActiveMask) { in enableDmpPedometer()
1819 int MPLSensor::masterEnable(int en) in masterEnable() argument
1825 en, mpu.master_enable, getTimestamp()); in masterEnable()
1826 res = write_sysfs_int(mpu.master_enable, en); in masterEnable()
1830 int MPLSensor::enableGyro(int en) in enableGyro() argument
1838 en, mpu.gyro_enable, getTimestamp()); in enableGyro()
1839 res = write_sysfs_int(mpu.gyro_enable, en); in enableGyro()
1841 en, mpu.gyro_fifo_enable, getTimestamp()); in enableGyro()
1842 res += write_sysfs_int(mpu.gyro_fifo_enable, en); in enableGyro()
1844 if (!en) { in enableGyro()
1852 int MPLSensor::enableLowPowerAccel(int en) in enableLowPowerAccel() argument
1859 res = write_sysfs_int(mpu.motion_lpa_on, en); in enableLowPowerAccel()
1861 en, mpu.motion_lpa_on, getTimestamp()); in enableLowPowerAccel()
1865 int MPLSensor::enableAccel(int en) in enableAccel() argument
1873 en, mpu.accel_enable, getTimestamp()); in enableAccel()
1874 res = write_sysfs_int(mpu.accel_enable, en); in enableAccel()
1876 en, mpu.accel_fifo_enable, getTimestamp()); in enableAccel()
1877 res += write_sysfs_int(mpu.accel_fifo_enable, en); in enableAccel()
1879 if (!en) { in enableAccel()
1887 int MPLSensor::enableCompass(int en, int rawSensorRequested) in enableCompass() argument
1894 res = mCompassSensor->enable(ID_RM, en); in enableCompass()
1896 res = mCompassSensor->enable(ID_M, en); in enableCompass()
1898 if (en == 0 || res != 0) { in enableCompass()
1906 int MPLSensor::enablePressure(int en) in enablePressure() argument
1913 res = mPressureSensor->enable(ID_PS, en); in enablePressure()
2045 int MPLSensor::enableSensors(unsigned long sensors, int en, uint32_t changed) in enableSensors() argument
2082 if (!cal_stored && (!en && (changed & (1 << Gyro)))) { in enableSensors()
2110 if (!cal_stored && (!en && (changed & (1 << MagneticField)))) { in enableSensors()
2321 int MPLSensor::setBatch(int en, int toggleEnable) in setBatch() argument
2335 if (en) { in setBatch()
2359 if (en && (mFeatureActiveMask & INV_DMP_PEDOMETER) && in setBatch()
2369 if (en && (mFeatureActiveMask & INV_DMP_PEDOMETER) && in setBatch()
2382 if (en && (featureMask & INV_DMP_PED_INDICATOR) && in setBatch()
2392 if (en && (mEnabled & (1 << GameRotationVector)) && in setBatch()
2413 if (en) { in setBatch()
2750 int MPLSensor::enable(int32_t handle, int en) in enable() argument
2765 (en? "en" : "dis")); in enable()
2766 enableDmpPedometer(en, 0); in enable()
2767 mDmpStepCountEnabled = !!en; in enable()
2774 (en? "en" : "dis")); in enable()
2775 enableDmpPedometer(en, 1); in enable()
2776 mDmpPedometerEnabled = !!en; in enable()
2789 (en? "en" : "dis")); in enable()
2790 enableDmpSignificantMotion(en); in enable()
2791 mDmpSignificantMotionEnabled = !!en; in enable()
2798 (en? "en" : "dis")); in enable()
2799 enableDmpOrientation(en && isDmpDisplayOrientationOn()); in enable()
2800 mDmpOrientationEnabled = !!en; in enable()
2859 int newState = en ? 1 : 0; in enable()
2914 if (!en) in enable()
2916 if ((en && !(lastEnabled & VIRTUAL_SENSOR_ALL_MASK)) in enable()
2918 (en && !(lastEnabled & VIRTUAL_SENSOR_9AXES_MASK)) in enable()
2920 (!en && !(mEnabled & VIRTUAL_SENSOR_ALL_MASK)) in enable()
2922 (!en && (mEnabled & VIRTUAL_SENSOR_MAG_6AXES_MASK))) { in enable()
2935 if (!en) in enable()
2937 if ((en && !(lastEnabled & VIRTUAL_SENSOR_9AXES_MASK)) in enable()
2939 (!en && !(mEnabled & VIRTUAL_SENSOR_9AXES_MASK))) { in enable()
2948 if (!en) in enable()
2950 if ((en && !(lastEnabled & VIRTUAL_SENSOR_ALL_MASK)) in enable()
2952 (en && !(lastEnabled & VIRTUAL_SENSOR_9AXES_MASK)) in enable()
2954 (!en && !(mEnabled & VIRTUAL_SENSOR_ALL_MASK)) in enable()
2956 (!en && (mEnabled & VIRTUAL_SENSOR_GYRO_6AXES_MASK))) { in enable()
4238 int MPLSensor::enableDmpOrientation(int en) in enableDmpOrientation() argument
4251 if (en == 1) { in enableDmpOrientation()
4254 en, mpu.display_orientation_on, getTimestamp()); in enableDmpOrientation()
4255 if (write_sysfs_int(mpu.display_orientation_on, en) < 0) { in enableDmpOrientation()
4290 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in enableDmpOrientation()
4317 en, mpu.dmp_event_int_on, getTimestamp()); in enableDmpOrientation()
4318 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in enableDmpOrientation()
4326 if (en || mEnabled || mFeatureActiveMask) { in enableDmpOrientation()
6034 int MPLSensor::enableDmpSignificantMotion(int en) in enableDmpSignificantMotion() argument
6050 if(en) { in enableDmpSignificantMotion()
6111 en, mpu.dmp_event_int_on, getTimestamp()); in enableDmpSignificantMotion()
6112 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in enableDmpSignificantMotion()
6118 if(en || enabled_sensors || mFeatureActiveMask) { in enableDmpSignificantMotion()