Lines Matching refs:mpu

300     LOGV_IF(EXTRA_VERBOSE, "HAL:gyro temperature path: %s", mpu.temperature);  in MPLSensor()
301 gyro_temperature_fd = open(mpu.temperature, O_RDONLY); in MPLSensor()
306 "HAL:temperature_fd opened: %s", mpu.temperature); in MPLSensor()
313 "HAL:sysfs:cat %s (%lld)", mpu.gyro_fsr, getTimestamp()); in MPLSensor()
315 fd = open(mpu.gyro_fsr, O_RDONLY); in MPLSensor()
334 "HAL:sysfs:cat %s (%lld)", mpu.in_gyro_self_test_scale, getTimestamp()); in MPLSensor()
335 fd = open(mpu.in_gyro_self_test_scale, O_RDONLY); in MPLSensor()
354 LOGV_IF(EXTRA_VERBOSE, "HAL:factory gyro x offset path: %s", mpu.in_gyro_x_offset); in MPLSensor()
355 LOGV_IF(EXTRA_VERBOSE, "HAL:factory gyro y offset path: %s", mpu.in_gyro_y_offset); in MPLSensor()
356 LOGV_IF(EXTRA_VERBOSE, "HAL:factory gyro z offset path: %s", mpu.in_gyro_z_offset); in MPLSensor()
357 gyro_x_offset_fd = open(mpu.in_gyro_x_offset, O_RDWR); in MPLSensor()
358 gyro_y_offset_fd = open(mpu.in_gyro_y_offset, O_RDWR); in MPLSensor()
359 gyro_z_offset_fd = open(mpu.in_gyro_z_offset, O_RDWR); in MPLSensor()
373 LOGV_IF(EXTRA_VERBOSE, "HAL: gyro x dmp bias path: %s", mpu.in_gyro_x_dmp_bias); in MPLSensor()
374 LOGV_IF(EXTRA_VERBOSE, "HAL: gyro y dmp bias path: %s", mpu.in_gyro_y_dmp_bias); in MPLSensor()
375 LOGV_IF(EXTRA_VERBOSE, "HAL: gyro z dmp bias path: %s", mpu.in_gyro_z_dmp_bias); in MPLSensor()
376 gyro_x_dmp_bias_fd = open(mpu.in_gyro_x_dmp_bias, O_RDWR); in MPLSensor()
377 gyro_y_dmp_bias_fd = open(mpu.in_gyro_y_dmp_bias, O_RDWR); in MPLSensor()
378 gyro_z_dmp_bias_fd = open(mpu.in_gyro_z_dmp_bias, O_RDWR); in MPLSensor()
392 "HAL:sysfs:cat %s (%lld)", mpu.accel_fsr, getTimestamp()); in MPLSensor()
394 fd = open(mpu.accel_fsr, O_RDONLY); in MPLSensor()
413 "HAL:sysfs:cat %s (%lld)", mpu.in_accel_self_test_scale, getTimestamp()); in MPLSensor()
414 fd = open(mpu.in_accel_self_test_scale, O_RDONLY); in MPLSensor()
433 LOGV_IF(EXTRA_VERBOSE, "HAL:factory accel x offset path: %s", mpu.in_accel_x_offset); in MPLSensor()
434 LOGV_IF(EXTRA_VERBOSE, "HAL:factory accel y offset path: %s", mpu.in_accel_y_offset); in MPLSensor()
435 LOGV_IF(EXTRA_VERBOSE, "HAL:factory accel z offset path: %s", mpu.in_accel_z_offset); in MPLSensor()
436 accel_x_offset_fd = open(mpu.in_accel_x_offset, O_RDWR); in MPLSensor()
437 accel_y_offset_fd = open(mpu.in_accel_y_offset, O_RDWR); in MPLSensor()
438 accel_z_offset_fd = open(mpu.in_accel_z_offset, O_RDWR); in MPLSensor()
450 LOGV_IF(EXTRA_VERBOSE, "HAL:accel x dmp bias path: %s", mpu.in_accel_x_dmp_bias); in MPLSensor()
451 LOGV_IF(EXTRA_VERBOSE, "HAL:accel y dmp bias path: %s", mpu.in_accel_y_dmp_bias); in MPLSensor()
452 LOGV_IF(EXTRA_VERBOSE, "HAL:accel z dmp bias path: %s", mpu.in_accel_z_dmp_bias); in MPLSensor()
453 accel_x_dmp_bias_fd = open(mpu.in_accel_x_dmp_bias, O_RDWR); in MPLSensor()
454 accel_y_dmp_bias_fd = open(mpu.in_accel_y_dmp_bias, O_RDWR); in MPLSensor()
455 accel_z_dmp_bias_fd = open(mpu.in_accel_z_dmp_bias, O_RDWR); in MPLSensor()
465 dmp_sign_motion_fd = open(mpu.event_smd, O_RDONLY | O_NONBLOCK); in MPLSensor()
473 dmp_pedometer_fd = open(mpu.event_pedometer, O_RDONLY | O_NONBLOCK); in MPLSensor()
688 mpu.in_timestamp_en, getTimestamp()); in enable_iio_sysfs()
692 tempFp = fopen(mpu.in_timestamp_en, "w"); in enable_iio_sysfs()
702 IIO_BUFFER_LENGTH, mpu.buffer_length, getTimestamp()); in enable_iio_sysfs()
703 tempFp = fopen(mpu.buffer_length, "w"); in enable_iio_sysfs()
713 1, mpu.chip_enable, getTimestamp()); in enable_iio_sysfs()
714 tempFp = fopen(mpu.chip_enable, "w"); in enable_iio_sysfs()
906 "HAL:sysfs:cat %s (%lld)", mpu.firmware_loaded, getTimestamp()); in loadDMP()
907 fd = open(mpu.firmware_loaded, O_RDONLY); in loadDMP()
912 LOGV_IF(EXTRA_VERBOSE, "HAL:load dmp: %s", mpu.dmp_firmware); in loadDMP()
913 fptr = fopen(mpu.dmp_firmware, "w"); in loadDMP()
939 "HAL:sysfs:cat %s (%lld)", mpu.gyro_orient, getTimestamp()); in inv_get_sensors_orientation()
940 fptr = fopen(mpu.gyro_orient, "r"); in inv_get_sensors_orientation()
967 "HAL:sysfs:cat %s (%lld)", mpu.accel_orient, getTimestamp()); in inv_get_sensors_orientation()
968 fptr = fopen(mpu.accel_orient, "r"); in inv_get_sensors_orientation()
1044 0, mpu.master_enable, getTimestamp()); in ~MPLSensor()
1045 write_sysfs_int(mpu.master_enable, 0); in ~MPLSensor()
1076 HW_GYRO_RATE_HZ, mpu.gyro_rate, getTimestamp()); in setGyroInitialState()
1077 int fd = open(mpu.gyro_rate, O_RDWR); in setGyroInitialState()
1081 mpu.gyro_rate, strerror(res), res); in setGyroInitialState()
1087 mpu.gyro_rate, HW_GYRO_RATE_HZ); in setGyroInitialState()
1133 mpu.firmware_loaded, getTimestamp()); in onDmp()
1134 if(read_sysfs_int(mpu.firmware_loaded, &status) < 0){ in onDmp()
1139 mpu.dmp_on, getTimestamp()); in onDmp()
1140 if (read_sysfs_int(mpu.dmp_on, &status) < 0) { in onDmp()
1144 en, mpu.dmp_on, getTimestamp()); in onDmp()
1145 if (write_sysfs_int(mpu.dmp_on, en) < 0) { in onDmp()
1156 en, mpu.dmp_int_on, getTimestamp()); in onDmp()
1157 if (write_sysfs_int(mpu.dmp_int_on, en) < 0) { 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()
1193 0, mpu.pedometer_int_on, getTimestamp()); in enablePedIndicator()
1194 if (write_sysfs_int(mpu.pedometer_int_on, 0) < 0) { in enablePedIndicator()
1204 en, mpu.step_indicator_on, getTimestamp()); in enablePedIndicator()
1205 if (write_sysfs_int(mpu.step_indicator_on, en) < 0) { in enablePedIndicator()
1232 1, mpu.pedometer_int_on, getTimestamp()); in enablePedStandalone()
1233 if (write_sysfs_int(mpu.pedometer_int_on, 1) < 0) { in enablePedStandalone()
1240 1, mpu.dmp_event_int_on, getTimestamp()); in enablePedStandalone()
1241 if (write_sysfs_int(mpu.dmp_event_int_on, 1) < 0) { in enablePedStandalone()
1255 0, mpu.pedometer_int_on, getTimestamp()); in enablePedStandalone()
1256 if (write_sysfs_int(mpu.pedometer_int_on, 0) < 0) { in enablePedStandalone()
1262 0, mpu.dmp_event_int_on, getTimestamp()); in enablePedStandalone()
1263 if (write_sysfs_int(mpu.dmp_event_int_on, 0) < 0) { in enablePedStandalone()
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()
1350 1, mpu.pedometer_int_on, getTimestamp()); in enablePedQuaternion()
1351 if (write_sysfs_int(mpu.pedometer_int_on, 1) < 0) { in enablePedQuaternion()
1358 1, mpu.dmp_event_int_on, getTimestamp()); in enablePedQuaternion()
1359 if (write_sysfs_int(mpu.dmp_event_int_on, en) < 0) { in enablePedQuaternion()
1373 0, mpu.pedometer_int_on, getTimestamp()); in enablePedQuaternion()
1374 if (write_sysfs_int(mpu.pedometer_int_on, 0) < 0) { in enablePedQuaternion()
1380 0, mpu.dmp_event_int_on, getTimestamp()); in enablePedQuaternion()
1381 if (write_sysfs_int(mpu.dmp_event_int_on, 0) < 0) { in enablePedQuaternion()
1399 en, mpu.ped_q_on, getTimestamp()); in enablePedQuaternionData()
1400 if (write_sysfs_int(mpu.ped_q_on, en) < 0) { in enablePedQuaternionData()
1431 res = write_sysfs_int(mpu.gyro_fifo_enable, 1); in enablePedQuaternionData()
1432 res += write_sysfs_int(mpu.accel_fifo_enable, 1); in enablePedQuaternionData()
1520 en, mpu.six_axis_q_on, getTimestamp()); in enable6AxisQuaternionData()
1521 if (write_sysfs_int(mpu.six_axis_q_on, en) < 0) { in enable6AxisQuaternionData()
1545 1, mpu.gyro_fifo_enable, getTimestamp()); in enable6AxisQuaternionData()
1546 res = write_sysfs_int(mpu.gyro_fifo_enable, 1); in enable6AxisQuaternionData()
1548 1, mpu.accel_fifo_enable, getTimestamp()); in enable6AxisQuaternionData()
1549 res += write_sysfs_int(mpu.accel_fifo_enable, 1); in enable6AxisQuaternionData()
1559 res = write_sysfs_int(mpu.gyro_fifo_enable, 1); in enable6AxisQuaternionData()
1560 res += write_sysfs_int(mpu.accel_fifo_enable, 1); in enable6AxisQuaternionData()
1654 en, mpu.three_axis_q_on, getTimestamp()); in enableQuaternionData()
1655 if (write_sysfs_int(mpu.three_axis_q_on, en) < 0) { in enableQuaternionData()
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()
1713 200, mpu.accel_fifo_rate, getTimestamp()); in enableDmpPedometer()
1714 if (write_sysfs_int(mpu.accel_fifo_rate, 200) < 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()
1825 en, mpu.master_enable, getTimestamp()); in masterEnable()
1826 res = write_sysfs_int(mpu.master_enable, en); in masterEnable()
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()
1859 res = write_sysfs_int(mpu.motion_lpa_on, en); in enableLowPowerAccel()
1861 en, mpu.motion_lpa_on, getTimestamp()); in enableLowPowerAccel()
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()
1925 res = write_sysfs_int(mpu.batchmode_timeout, timeout); in enableBatch()
1927 res = write_sysfs_int(mpu.six_axis_q_on, 0); in enableBatch()
1928 res = write_sysfs_int(mpu.ped_q_on, 0); in enableBatch()
1929 res = write_sysfs_int(mpu.step_detector_on, 0); in enableBatch()
1930 res = write_sysfs_int(mpu.step_indicator_on, 0); in enableBatch()
2188 0, mpu.dmp_event_int_on, getTimestamp()); in enableSensors()
2189 if (write_sysfs_int(mpu.dmp_event_int_on, 0) < 0) { in enableSensors()
2408 timeoutInMs, mpu.batchmode_timeout, getTimestamp()); in setBatch()
2409 if (write_sysfs_int(mpu.batchmode_timeout, timeoutInMs) < 0) { in setBatch()
2427 200, mpu.gyro_fifo_rate, getTimestamp()); in setBatch()
2428 if (write_sysfs_int(mpu.gyro_fifo_rate, 200) < 0) { in setBatch()
3260 1000000000.f / tempWanted, mpu.gyro_fifo_rate, getTimestamp()); in update_delay()
3261 tempFd = open(mpu.gyro_fifo_rate, O_RDWR); in update_delay()
3327 1000000000.f / gyroRate, mpu.gyro_rate, in update_delay()
3329 tempFd = open(mpu.gyro_rate, O_RDWR); in update_delay()
3339 wanted_3rd_party_sensor / 1000000L, mpu.accel_rate, in update_delay()
3341 tempFd = open(mpu.accel_rate, O_RDWR); in update_delay()
3348 1000000000.f / accelRate, mpu.accel_rate, in update_delay()
3350 tempFd = open(mpu.accel_rate, O_RDWR); in update_delay()
3411 1000000000.f / wanted, mpu.gyro_rate, getTimestamp()); in update_delay()
3412 tempFd = open(mpu.gyro_rate, O_RDWR); in update_delay()
3442 1000000000.f / wanted, mpu.accel_rate, in update_delay()
3444 tempFd = open(mpu.accel_rate, O_RDWR); in update_delay()
4223 0, mpu.accel_fifo_enable, getTimestamp()); in turnOffAccelFifo()
4224 res += write_sysfs_int(mpu.accel_fifo_enable, 0); in turnOffAccelFifo()
4233 0, mpu.gyro_fifo_enable, getTimestamp()); in turnOffGyroFifo()
4234 res += write_sysfs_int(mpu.gyro_fifo_enable, 0); in turnOffGyroFifo()
4254 en, mpu.display_orientation_on, getTimestamp()); in enableDmpOrientation()
4255 if (write_sysfs_int(mpu.display_orientation_on, en) < 0) { in enableDmpOrientation()
4268 200, mpu.accel_fifo_rate, getTimestamp()); in enableDmpOrientation()
4269 if (write_sysfs_int(mpu.accel_fifo_rate, 200) < 0) { in enableDmpOrientation()
4289 1, mpu.dmp_event_int_on, getTimestamp()); 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()
4342 dmp_orient_fd = open(mpu.event_display_orientation, O_RDONLY| O_NONBLOCK); in openDmpOrientFd()
4376 fp = fopen(mpu.event_display_orientation, "r"); in readDmpOrientEvents()
4441 int(1000000000.f / *wanted), mpu.three_axis_q_rate, in getDmpRate()
4443 write_sysfs_int(mpu.three_axis_q_rate, 1000000000.f / *wanted); in getDmpRate()
4448 int(1000000000.f / *wanted), mpu.six_axis_q_rate, in getDmpRate()
4450 write_sysfs_int(mpu.six_axis_q_rate, 1000000000.f / *wanted); in getDmpRate()
4455 int(1000000000.f / *wanted), mpu.ped_q_rate, in getDmpRate()
4457 write_sysfs_int(mpu.ped_q_rate, 1000000000.f / *wanted); in getDmpRate()
5015 char **dptr = reinterpret_cast<char **>(&mpu); in inv_init_sysfs_attributes()
5028 sprintf(mpu.key, "%s%s", sysfs_path, "/key"); in inv_init_sysfs_attributes()
5029 sprintf(mpu.chip_enable, "%s%s", sysfs_path, "/buffer/enable"); in inv_init_sysfs_attributes()
5030 sprintf(mpu.buffer_length, "%s%s", sysfs_path, "/buffer/length"); in inv_init_sysfs_attributes()
5031 sprintf(mpu.master_enable, "%s%s", sysfs_path, "/master_enable"); in inv_init_sysfs_attributes()
5032 sprintf(mpu.power_state, "%s%s", sysfs_path, "/power_state"); in inv_init_sysfs_attributes()
5034 sprintf(mpu.in_timestamp_en, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5036 sprintf(mpu.in_timestamp_index, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5038 sprintf(mpu.in_timestamp_type, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5041 sprintf(mpu.dmp_firmware, "%s%s", sysfs_path, "/dmp_firmware"); in inv_init_sysfs_attributes()
5042 sprintf(mpu.firmware_loaded, "%s%s", sysfs_path, "/firmware_loaded"); in inv_init_sysfs_attributes()
5043 sprintf(mpu.dmp_on, "%s%s", sysfs_path, "/dmp_on"); in inv_init_sysfs_attributes()
5044 sprintf(mpu.dmp_int_on, "%s%s", sysfs_path, "/dmp_int_on"); in inv_init_sysfs_attributes()
5045 sprintf(mpu.dmp_event_int_on, "%s%s", sysfs_path, "/dmp_event_int_on"); in inv_init_sysfs_attributes()
5046 sprintf(mpu.tap_on, "%s%s", sysfs_path, "/tap_on"); in inv_init_sysfs_attributes()
5048 sprintf(mpu.self_test, "%s%s", sysfs_path, "/self_test"); in inv_init_sysfs_attributes()
5050 sprintf(mpu.temperature, "%s%s", sysfs_path, "/temperature"); in inv_init_sysfs_attributes()
5051 sprintf(mpu.gyro_enable, "%s%s", sysfs_path, "/gyro_enable"); in inv_init_sysfs_attributes()
5052 sprintf(mpu.gyro_fifo_rate, "%s%s", sysfs_path, "/sampling_frequency"); in inv_init_sysfs_attributes()
5053 sprintf(mpu.gyro_orient, "%s%s", sysfs_path, "/gyro_matrix"); in inv_init_sysfs_attributes()
5054 sprintf(mpu.gyro_fifo_enable, "%s%s", sysfs_path, "/gyro_fifo_enable"); in inv_init_sysfs_attributes()
5055 sprintf(mpu.gyro_fsr, "%s%s", sysfs_path, "/in_anglvel_scale"); in inv_init_sysfs_attributes()
5056 sprintf(mpu.gyro_fifo_enable, "%s%s", sysfs_path, "/gyro_fifo_enable"); in inv_init_sysfs_attributes()
5057 sprintf(mpu.gyro_rate, "%s%s", sysfs_path, "/gyro_rate"); in inv_init_sysfs_attributes()
5059 sprintf(mpu.accel_enable, "%s%s", sysfs_path, "/accel_enable"); in inv_init_sysfs_attributes()
5060 sprintf(mpu.accel_fifo_rate, "%s%s", sysfs_path, "/sampling_frequency"); in inv_init_sysfs_attributes()
5061 sprintf(mpu.accel_orient, "%s%s", sysfs_path, "/accel_matrix"); in inv_init_sysfs_attributes()
5062 sprintf(mpu.accel_fifo_enable, "%s%s", sysfs_path, "/accel_fifo_enable"); in inv_init_sysfs_attributes()
5063 sprintf(mpu.accel_rate, "%s%s", sysfs_path, "/accel_rate"); in inv_init_sysfs_attributes()
5066 sprintf(mpu.accel_fsr, "%s%s", sysfs_path, "/in_accel_scale"); in inv_init_sysfs_attributes()
5069 sprintf(mpu.in_accel_x_dmp_bias, "%s%s", sysfs_path, "/in_accel_x_dmp_bias"); in inv_init_sysfs_attributes()
5070 sprintf(mpu.in_accel_y_dmp_bias, "%s%s", sysfs_path, "/in_accel_y_dmp_bias"); in inv_init_sysfs_attributes()
5071 sprintf(mpu.in_accel_z_dmp_bias, "%s%s", sysfs_path, "/in_accel_z_dmp_bias"); in inv_init_sysfs_attributes()
5074 sprintf(mpu.in_accel_x_offset, "%s%s", sysfs_path, "/in_accel_x_offset"); in inv_init_sysfs_attributes()
5075 sprintf(mpu.in_accel_y_offset, "%s%s", sysfs_path, "/in_accel_y_offset"); in inv_init_sysfs_attributes()
5076 sprintf(mpu.in_accel_z_offset, "%s%s", sysfs_path, "/in_accel_z_offset"); in inv_init_sysfs_attributes()
5077 sprintf(mpu.in_accel_self_test_scale, "%s%s", sysfs_path, "/in_accel_self_test_scale"); in inv_init_sysfs_attributes()
5081 sprintf(mpu.in_gyro_x_dmp_bias, "%s%s", sysfs_path, "/in_anglvel_x_dmp_bias"); in inv_init_sysfs_attributes()
5082 sprintf(mpu.in_gyro_y_dmp_bias, "%s%s", sysfs_path, "/in_anglvel_y_dmp_bias"); in inv_init_sysfs_attributes()
5083 sprintf(mpu.in_gyro_z_dmp_bias, "%s%s", sysfs_path, "/in_anglvel_z_dmp_bias"); in inv_init_sysfs_attributes()
5086 sprintf(mpu.in_gyro_x_offset, "%s%s", sysfs_path, "/in_anglvel_x_offset"); in inv_init_sysfs_attributes()
5087 sprintf(mpu.in_gyro_y_offset, "%s%s", sysfs_path, "/in_anglvel_y_offset"); in inv_init_sysfs_attributes()
5088 sprintf(mpu.in_gyro_z_offset, "%s%s", sysfs_path, "/in_anglvel_z_offset"); in inv_init_sysfs_attributes()
5089 sprintf(mpu.in_gyro_self_test_scale, "%s%s", sysfs_path, "/in_anglvel_self_test_scale"); in inv_init_sysfs_attributes()
5091 sprintf(mpu.three_axis_q_on, "%s%s", sysfs_path, "/three_axes_q_on"); //formerly quaternion_on in inv_init_sysfs_attributes()
5092 sprintf(mpu.three_axis_q_rate, "%s%s", sysfs_path, "/three_axes_q_rate"); in inv_init_sysfs_attributes()
5094 sprintf(mpu.ped_q_on, "%s%s", sysfs_path, "/ped_q_on"); in inv_init_sysfs_attributes()
5095 sprintf(mpu.ped_q_rate, "%s%s", sysfs_path, "/ped_q_rate"); in inv_init_sysfs_attributes()
5097 sprintf(mpu.six_axis_q_on, "%s%s", sysfs_path, "/six_axes_q_on"); in inv_init_sysfs_attributes()
5098 sprintf(mpu.six_axis_q_rate, "%s%s", sysfs_path, "/six_axes_q_rate"); in inv_init_sysfs_attributes()
5100 sprintf(mpu.six_axis_q_value, "%s%s", sysfs_path, "/six_axes_q_value"); in inv_init_sysfs_attributes()
5102 sprintf(mpu.step_detector_on, "%s%s", sysfs_path, "/step_detector_on"); in inv_init_sysfs_attributes()
5103 sprintf(mpu.step_indicator_on, "%s%s", sysfs_path, "/step_indicator_on"); in inv_init_sysfs_attributes()
5105 sprintf(mpu.display_orientation_on, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5107 sprintf(mpu.event_display_orientation, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5110 sprintf(mpu.event_smd, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5112 sprintf(mpu.smd_enable, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5114 sprintf(mpu.smd_delay_threshold, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5116 sprintf(mpu.smd_delay_threshold2, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5118 sprintf(mpu.smd_threshold, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5120 sprintf(mpu.batchmode_timeout, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5122 sprintf(mpu.batchmode_wake_fifo_full_on, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5124 sprintf(mpu.flush_batch, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5126 sprintf(mpu.pedometer_on, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5128 sprintf(mpu.pedometer_int_on, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5130 sprintf(mpu.event_pedometer, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5132 sprintf(mpu.pedometer_steps, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5134 sprintf(mpu.motion_lpa_on, "%s%s", sysfs_path, in inv_init_sysfs_attributes()
5237 mpu.in_gyro_x_offset, getTimestamp()); in setFactoryGyroBias()
5246 mpu.in_gyro_y_offset, getTimestamp()); in setFactoryGyroBias()
5255 mpu.in_gyro_z_offset, getTimestamp()); in setFactoryGyroBias()
5319 bias[0], mpu.in_gyro_x_dmp_bias, getTimestamp()); in setGyroBias()
5325 bias[1], mpu.in_gyro_y_dmp_bias, getTimestamp()); in setGyroBias()
5331 bias[2], mpu.in_gyro_z_dmp_bias, getTimestamp()); in setGyroBias()
5373 tempBias, mpu.in_accel_x_offset, getTimestamp()); in setFactoryAccelBias()
5380 tempBias, mpu.in_accel_y_offset, getTimestamp()); in setFactoryAccelBias()
5387 tempBias, mpu.in_accel_z_offset, getTimestamp()); in setFactoryAccelBias()
5434 mpu.in_accel_x_dmp_bias, getTimestamp()); in setAccelBias()
5442 mpu.in_accel_y_dmp_bias, getTimestamp()); in setAccelBias()
5450 mpu.in_accel_z_dmp_bias, getTimestamp()); in setAccelBias()
5682 int(1000000000.f / wanted), mpu.ped_q_rate, in batch()
5684 write_sysfs_int(mpu.ped_q_rate, 1000000000.f / wanted); in batch()
5715 int(1000000000.f / wanted), mpu.six_axis_q_rate, in batch()
5717 write_sysfs_int(mpu.six_axis_q_rate, 1000000000.f / wanted); in batch()
5742 timeoutInMs, mpu.batchmode_timeout, getTimestamp()); in batch()
5743 if (write_sysfs_int(mpu.batchmode_timeout, timeoutInMs) < 0) { in batch()
5759 200, mpu.gyro_fifo_rate, getTimestamp()); in batch()
5760 if (write_sysfs_int(mpu.gyro_fifo_rate, 200) < 0) { in batch()
5815 mpu.flush_batch, getTimestamp()); in flush()
5817 read_sysfs_int(mpu.flush_batch, &res); in flush()
5916 fp = fopen(mpu.pedometer_steps, "r"); in readDmpPedometerEvents()
5984 fp = fopen(mpu.event_smd, "r"); in readDmpSignificantMotionEvents()
6053 1, mpu.smd_enable, getTimestamp()); in enableDmpSignificantMotion()
6054 if (write_sysfs_int(mpu.smd_enable, 1) < 0) { in enableDmpSignificantMotion()
6066 200, mpu.accel_fifo_rate, getTimestamp()); in enableDmpSignificantMotion()
6067 if (write_sysfs_int(mpu.accel_fifo_rate, 200) < 0) { in enableDmpSignificantMotion()
6089 0, mpu.smd_enable, getTimestamp()); in enableDmpSignificantMotion()
6090 if (write_sysfs_int(mpu.smd_enable, 0) < 0) { 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()
6137 LOGV_IF(EXTRA_VERBOSE, "HAL:six axis q value: %s", mpu.six_axis_q_value); in setInitial6QuatValue()
6138 FILE* fptr = fopen(mpu.six_axis_q_value, "w"); in setInitial6QuatValue()
6168 delayThreshold1, mpu.smd_delay_threshold, getTimestamp()); in writeSignificantMotionParams()
6169 res = write_sysfs_int(mpu.smd_delay_threshold, delayThreshold1); in writeSignificantMotionParams()
6172 delayThreshold2, mpu.smd_delay_threshold2, getTimestamp()); in writeSignificantMotionParams()
6173 res = write_sysfs_int(mpu.smd_delay_threshold2, delayThreshold2); in writeSignificantMotionParams()
6177 motionThreshold, mpu.smd_threshold, getTimestamp()); in writeSignificantMotionParams()
6178 res = write_sysfs_int(mpu.smd_threshold, motionThreshold); in writeSignificantMotionParams()
6259 1000000000.f / gyroRate, mpu.gyro_rate, in setBatchDataRates()
6261 tempFd = open(mpu.gyro_rate, O_RDWR); in setBatchDataRates()
6268 1000000000.f / accelRate, mpu.accel_rate, in setBatchDataRates()
6270 tempFd = open(mpu.accel_rate, O_RDWR); in setBatchDataRates()
6345 1000000000.f / wanted, mpu.gyro_fifo_rate, in resetDataRates()
6347 tempFd = open(mpu.gyro_fifo_rate, O_RDWR); in resetDataRates()
6352 1000000000.f / gyroRate, mpu.gyro_rate, in resetDataRates()
6354 tempFd = open(mpu.gyro_rate, O_RDWR); in resetDataRates()
6361 1000000000.f / accelRate, mpu.accel_rate, in resetDataRates()
6363 tempFd = open(mpu.accel_rate, O_RDWR); in resetDataRates()