Lines Matching refs:result

128     inv_error_t result;
133 result = inv_state_transition(INV_STATE_SERIAL_OPENED);
134 if (result) {
135 LOG_RESULT_LOCATION(result);
136 return result;
139 result = inv_serial_open(port, &g_mlsl_handle);
140 if (INV_SUCCESS != result) {
144 return result;
157 inv_error_t result = INV_SUCCESS;
162 result = inv_state_transition(INV_STATE_SERIAL_CLOSED);
163 if (INV_SUCCESS != result) {
164 MPL_LOGE("State Transition Failure in %s: %d\n", __func__, result);
166 result = inv_serial_close(g_mlsl_handle);
167 if (INV_SUCCESS != result) {
168 MPL_LOGE("Unable to close Serial Handle %s: %d\n", __func__, result);
170 return result;
198 inv_error_t result;
249 result = inv_set_gyro_calibration(gyroScale, gyroCal);
250 if (INV_SUCCESS != result) {
252 return result;
255 result = inv_set_accel_calibration(accelScale, accelCal);
256 if (INV_SUCCESS != result) {
258 return result;
262 result = inv_set_compass_calibration(magScale, magCal);
263 if (INV_SUCCESS != result) {
265 return result;
457 inv_error_t result;
466 result = inv_set_mpu_memory(KEY_CFG_18, 3, regs);
467 if (result) {
468 LOG_RESULT_LOCATION(result);
469 return result;
475 result = inv_set_mpu_memory(KEY_D_1_106, 2, regs);
476 if (result) {
477 LOG_RESULT_LOCATION(result);
478 return result;
481 result = inv_set_mpu_memory(KEY_D_1_96, 8, regs);
482 if (result) {
483 LOG_RESULT_LOCATION(result);
484 return result;
487 result =
489 if (result) {
490 LOG_RESULT_LOCATION(result);
491 return result;
495 return result;
540 inv_error_t result = INV_SUCCESS;
556 result = inv_read_and_process_fifo(ftry, &got);
557 if (result) {
558 LOG_RESULT_LOCATION(result);
559 return result;
577 result = inv_get_fifo_status();
578 return result;
628 inv_error_t result;
635 result = inv_get_dl_cfg_int(BIT_DMP_INT_EN);
636 if (result) {
637 LOG_RESULT_LOCATION(result);
638 return result;
644 result = inv_get_dl_cfg_int(0);
645 if (result) {
646 LOG_RESULT_LOCATION(result);
647 return result;
657 result = inv_set_mpu_memory(KEY_CFG_7, 1, regs);
658 if (result) {
659 LOG_RESULT_LOCATION(result);
660 return result;
662 return result;
675 inv_error_t result;
682 result = inv_get_dl_cfg_int(BIT_DMP_INT_EN);
683 if (result) {
684 LOG_RESULT_LOCATION(result);
685 return result;
691 result = inv_get_dl_cfg_int(0);
692 if (result) {
693 LOG_RESULT_LOCATION(result);
694 return result;
704 result = inv_set_mpu_memory(KEY_CFG_6, 1, regs);
705 if (result) {
706 LOG_RESULT_LOCATION(result);
707 return result;
709 return result;
778 inv_error_t result;
794 result = inv_set_mpu_memory(KEY_D_1_152, 4, &regs[0]);
795 if (result) {
796 LOG_RESULT_LOCATION(result);
797 return result;
825 result = inv_set_mpu_memory(KEY_FCFG_2, 3, regs);
826 if (result) {
827 LOG_RESULT_LOCATION(result);
828 return result;
849 result = inv_set_mpu_memory(KEY_FCFG_7, 3, regs);
850 if (result) {
851 LOG_RESULT_LOCATION(result);
852 return result;
856 result = inv_freescale_sensor_fusion_16bit(orient);
857 if (result) {
858 LOG_RESULT_LOCATION(result);
859 return result;
862 result = inv_freescale_sensor_fusion_8bit(orient);
863 if (result) {
864 LOG_RESULT_LOCATION(result);
865 return result;
877 result = inv_set_mpu_memory(KEY_D_0_108, 2, regs);
878 if (result) {
879 LOG_RESULT_LOCATION(result);
880 return result;
883 return result;
924 inv_error_t result;
997 result = inv_set_mpu_memory(KEY_FCFG_1, 3, regs);
998 if (result) {
999 LOG_RESULT_LOCATION(result);
1000 return result;
1002 result = inv_set_mpu_memory(KEY_FCFG_3, 3, &regs[3]);
1003 if (result) {
1004 LOG_RESULT_LOCATION(result);
1005 return result;
1011 result =
1014 if (result) {
1015 LOG_RESULT_LOCATION(result);
1016 return result;
1025 result = inv_set_mpu_memory(KEY_D_0_24, 4, inv_int32_to_big8(sf, regs));
1026 if (result) {
1027 LOG_RESULT_LOCATION(result);
1028 return result;
1121 inv_error_t result;
1139 result = inv_set_mpu_memory(KEY_D_0_163, 1, &reg);
1140 if (result) {
1141 LOG_RESULT_LOCATION(result);
1142 return result;
1144 return result;
1181 inv_error_t result = INV_SUCCESS;
1227 result = inv_set_mpu_memory(KEY_FCFG_5, 4, regs);
1228 if (result) {
1229 LOG_RESULT_LOCATION(result);
1230 return result;
1232 result = inv_set_dead_zone();
1233 if (result) {
1234 LOG_RESULT_LOCATION(result);
1235 return result;
1240 result = inv_set_gyro_data_source(INV_GYRO_FROM_QUATERNION);
1241 if (result) {
1242 LOG_RESULT_LOCATION(result);
1243 return result;
1246 result = inv_set_gyro_data_source(INV_GYRO_FROM_RAW);
1247 if (result) {
1248 LOG_RESULT_LOCATION(result);
1249 return result;
1261 result = inv_set_gyro_temp_slope(inv_obj.temp_slope);
1262 if (result) {
1263 LOG_RESULT_LOCATION(result);
1264 return result;
1267 result = inv_set_gyro_temp_slope(tmp);
1268 if (result) {
1269 LOG_RESULT_LOCATION(result);
1270 return result;
1290 return result;
1332 inv_error_t result = INV_SUCCESS;
1350 result = inv_set_mpu_memory(KEY_D_1_108, 4, regs);
1351 if (result) {
1352 LOG_RESULT_LOCATION(result);
1353 return result;
1355 result = inv_reset_motion();
1356 return result;
1401 inv_error_t result = INV_SUCCESS;
1417 result = inv_set_mpu_memory(KEY_D_1_106, 2, regs);
1418 if (result) {
1419 LOG_RESULT_LOCATION(result);
1420 return result;
1422 result = inv_reset_motion();
1423 return result;
1508 inv_error_t result;
1544 result = inv_set_mpu_memory(KEY_FCFG_AZ, 3, rr);
1545 return result;
1557 inv_error_t result;
1669 result = inv_set_mpu_memory(KEY_FCFG_FSCALE, kk, regs);
1670 if (result) {
1671 LOG_RESULT_LOCATION(result);
1672 return result;
1675 return result;
1694 inv_error_t result = INV_SUCCESS;
1738 result = inv_mpu_config_accel(mldl_cfg,
1741 if (result) {
1742 LOG_RESULT_LOCATION(result);
1743 return result;
1748 result = inv_mpu_config_accel(mldl_cfg,
1751 if (result) {
1752 LOG_RESULT_LOCATION(result);
1753 return result;
1759 result = inv_obj.mode_change_func(mldl_cfg->requested_sensors, sensors);
1760 if (result) {
1761 LOG_RESULT_LOCATION(result);
1762 return result;
1772 result = inv_dl_start(sensors);
1773 if (result) {
1774 LOG_RESULT_LOCATION(result);
1775 return result;
1777 result = inv_reset_motion();
1778 if (result) {
1779 LOG_RESULT_LOCATION(result);
1780 return result;
1782 result = inv_dl_stop(~sensors);
1783 if (result) {
1784 LOG_RESULT_LOCATION(result);
1785 return result;
1800 result = inv_mpu_config_accel(mldl_cfg,
1803 if (result) {
1804 LOG_RESULT_LOCATION(result);
1805 return result;
1809 return result;
1825 inv_error_t result;
1832 result = inv_serial_read(inv_get_serial_handle(), inv_get_mpu_slave_addr(),
1834 if (result) {
1835 LOG_RESULT_LOCATION(result);
1836 return result;
1845 result = inv_set_mpu_memory(KEY_D_ACT0, 4, inv_int32_to_big8(temp, big8));
1846 if (result) {
1847 LOG_RESULT_LOCATION(result);
1848 return result;
1863 result = inv_set_mpu_memory(KEY_D_ACSX, 4, inv_int32_to_big8(s2[0], big8));
1864 if (result) {
1865 LOG_RESULT_LOCATION(result);
1866 return result;
1868 result = inv_set_mpu_memory(KEY_D_ACSY, 4, inv_int32_to_big8(s2[1], big8));
1869 if (result) {
1870 LOG_RESULT_LOCATION(result);
1871 return result;
1873 result = inv_set_mpu_memory(KEY_D_ACSZ, 4, inv_int32_to_big8(s2[2], big8));
1874 if (result) {
1875 LOG_RESULT_LOCATION(result);
1876 return result;
1879 return result;