Home
last modified time | relevance | path

Searched refs:compass (Results 1 – 25 of 45) sorted by relevance

12

/hardware/invensense/60xx/mlsdk/mllite/
Dmldl_cfg_mpu.c62 struct ext_slave_platform_data *compass = &mldl_cfg->pdata->compass; in mpu_print_cfg() local
102 if (mldl_cfg->compass) { in mpu_print_cfg()
103 MPL_LOGD("slave_compass->suspend = %p\n", mldl_cfg->compass->suspend); in mpu_print_cfg()
104 MPL_LOGD("slave_compass->resume = %p\n", mldl_cfg->compass->resume); in mpu_print_cfg()
105 MPL_LOGD("slave_compass->read = %p\n", mldl_cfg->compass->read); in mpu_print_cfg()
106 MPL_LOGD("slave_compass->type = %02x\n", mldl_cfg->compass->type); in mpu_print_cfg()
108 mldl_cfg->compass->read_reg); in mpu_print_cfg()
110 mldl_cfg->compass->read_len); in mpu_print_cfg()
111 MPL_LOGD("slave_compass->endian = %02x\n", mldl_cfg->compass->endian); in mpu_print_cfg()
112 MPL_LOGD("slave_compass->range.mantissa= %02x\n", (int)mldl_cfg->compass->range.mantissa); in mpu_print_cfg()
[all …]
Dmldl_cfg.h126 struct ext_slave_descr *compass; member
190 mldl_cfg->compass, &mldl_cfg->pdata->compass, in inv_mpu_read_compass()
241 mldl_cfg->compass, in inv_mpu_config_compass()
242 &mldl_cfg->pdata->compass); in inv_mpu_config_compass()
294 data, mldl_cfg->compass, in inv_mpu_get_compass_config()
295 &mldl_cfg->pdata->compass); in inv_mpu_get_compass_config()
Dcompass.c221 if (NULL != mldl_cfg->compass && in inv_compass_present()
222 NULL != mldl_cfg->compass->resume && in inv_compass_present()
238 return mldl_cfg->pdata->compass.address; in inv_get_compass_slave_addr()
251 if (NULL != mldl_cfg->compass) { in inv_get_compass_id()
252 return mldl_cfg->compass->id; in inv_get_compass_id()
272 if (mldl_cfg->compass->read_len > sizeof(inv_obj.compass_raw_data)) { in inv_get_compass_data()
277 if (mldl_cfg->pdata->compass.bus == EXT_SLAVE_BUS_PRIMARY || in inv_get_compass_data()
296 if (EXT_SLAVE_BIG_ENDIAN == mldl_cfg->compass->endian) in inv_get_compass_data()
323 mldl_cfg->pdata->compass.address, in inv_get_compass_data()
388 signed char *orC = mldlCfg->pdata->compass.orientation; in inv_set_compass_bias()
/hardware/invensense/6515/libsensors_iio/
DCompassSensor.IIO.primary.cpp147 const char* compass = dev_full_name; in enable_iio_sysfs() local
165 find_type_by_name(compass, "iio:device")); in enable_iio_sysfs()
171 compass, iio_device_node, strerror(res), res); in enable_iio_sysfs()
174 "HAL:iio %s, compass_fd opened : %d", compass, compass_fd); in enable_iio_sysfs()
404 const char *compass = dev_full_name; in fillList() local
406 if (compass) { in fillList()
407 if(!strcmp(compass, "INV_COMPASS")) { in fillList()
415 if(!strcmp(compass, "compass") in fillList()
416 || !strcmp(compass, "INV_AK8975") in fillList()
417 || !strcmp(compass, "AKM8975") in fillList()
[all …]
DCompassSensor.IIO.9150.cpp294 const char *compass = sensor_name; in fillList() local
296 if (compass) { in fillList()
297 if(!strcmp(compass, "INV_COMPASS")) { in fillList()
304 if(!strcmp(compass, "compass") in fillList()
305 || !strcmp(compass, "INV_AK8975") in fillList()
306 || !strcmp(compass, "AK8975") in fillList()
307 || !strcmp(compass, "ak8975")) { in fillList()
314 if(!strcmp(compass, "compass") in fillList()
315 || !strcmp(compass, "INV_AK8963") in fillList()
316 || !strcmp(compass, "AK8963") in fillList()
[all …]
DCompassSensor.AKM.cpp154 const char *compass = COMPASS_NAME; in fillList() local
156 if (compass) { in fillList()
157 if (!strcmp(compass, "AKM8963")) { in fillList()
164 if (!strcmp(compass, "AKM8975")) { in fillList()
174 "this implementation only supports AKM compasses", compass); in fillList()
Dsensors_mpl.cpp116 compass, enumerator
163 mPollFds[compass].fd = mCompassSensor->getFd(); in sensors_poll_context_t()
164 mPollFds[compass].events = POLLIN; in sensors_poll_context_t()
165 mPollFds[compass].revents = 0; in sensors_poll_context_t()
245 } else if (i == compass) { in pollEvents()
/hardware/invensense/60xx/libsensors_iio/software/core/mllite/
Ddata_builder.c112 sensors.compass.accuracy = inv_data_builder.save.compass_accuracy; in inv_db_load_func()
114 if (sensors.compass.accuracy == 3) { in inv_db_load_func()
166 return sensors.compass.sensitivity; in inv_get_compass_sensitivity()
301 *ts = sensors.compass.timestamp; in inv_raw_sensor_timestamp()
303 if (sensors.compass.timestamp_prev != sensors.compass.timestamp) in inv_raw_sensor_timestamp()
366 sensors.compass.sample_rate_us = sample_rate_us; in inv_set_compass_sample_rate()
367 sensors.compass.sample_rate_ms = sample_rate_us / 1000; in inv_set_compass_sample_rate()
368 if (sensors.compass.bandwidth == 0) { in inv_set_compass_sample_rate()
369 sensors.compass.bandwidth = (int)(1000000L / sample_rate_us); in inv_set_compass_sample_rate()
385 *sample_rate_ms = sensors.compass.sample_rate_ms; in inv_get_compass_sample_rate_ms()
[all …]
Dhal_outputs.c335 long compass[3]; in inv_generate_hal_outputs() local
344 hal_out.compass_status = sensor_cal->compass.status; in inv_generate_hal_outputs()
355 if ((sensor_cal->compass.status & INV_SENSOR_ON) && (sr > sensor_cal->compass.sample_rate_ms)) { in inv_generate_hal_outputs()
356 sr = sensor_cal->compass.sample_rate_ms; in inv_generate_hal_outputs()
367 if ((sensor_cal->accel.status & sensor_cal->compass.status & INV_SENSOR_ON) == 0) { in inv_generate_hal_outputs()
371 …if ((sensor_cal->gyro.status & sensor_cal->accel.status & sensor_cal->compass.status & INV_SENSOR_… in inv_generate_hal_outputs()
386 hal_out.nine_axis_status = (sensor_cal->compass.status & INV_NEW_DATA) ? 1 : 0; in inv_generate_hal_outputs()
387 hal_out.nav_timestamp = sensor_cal->compass.timestamp; in inv_generate_hal_outputs()
402 inv_get_compass_set(compass, &accuracy, &(hal_out.mag_timestamp) ); in inv_generate_hal_outputs()
406 if ((sensor_cal->compass.status & (INV_NEW_DATA | INV_CONTIGUOUS)) == in inv_generate_hal_outputs()
[all …]
Dml_math_func.c39 float inv_compass_angle(const long *compass, const long *grav, const float *quat) in inv_compass_angle() argument
46 cgcross[1] = (float)compass[1] * grav[2] - (float)compass[2] * grav[1]; in inv_compass_angle()
47 cgcross[2] = (float)compass[2] * grav[0] - (float)compass[0] * grav[2]; in inv_compass_angle()
48 cgcross[3] = (float)compass[0] * grav[1] - (float)compass[1] * grav[0]; in inv_compass_angle()
697 void inv_get_cross_product_vec(float *cgcross, float compass[3], float grav[3]) { in inv_get_cross_product_vec()
699 cgcross[0] = (float)compass[1] * grav[2] - (float)compass[2] * grav[1]; in inv_get_cross_product_vec()
700 cgcross[1] = (float)compass[2] * grav[0] - (float)compass[0] * grav[2]; in inv_get_cross_product_vec()
701 cgcross[2] = (float)compass[0] * grav[1] - (float)compass[1] * grav[0]; in inv_get_cross_product_vec()
Dml_math_func.h100 float inv_compass_angle(const long *compass, const long *grav,
115 void inv_get_cross_product_vec(float *cgcross, float compass[3], float grav[3]);
/hardware/invensense/65xx/libsensors_iio/software/core/mllite/
Ddata_builder.c90 memcpy(raw, sensors.compass.raw, sizeof(sensors.compass.raw)); in inv_get_raw_compass()
100 sensors.compass.accuracy = inv_data_builder.save.compass_accuracy; in inv_db_load_func()
105 if (sensors.compass.accuracy == 3) { in inv_db_load_func()
197 return sensors.compass.sensitivity; in inv_get_compass_sensitivity()
308 sensors.compass.sample_rate_us = sample_rate_us; in inv_set_compass_sample_rate()
309 sensors.compass.sample_rate_ms = sample_rate_us / 1000; in inv_set_compass_sample_rate()
310 if (sensors.compass.bandwidth == 0) { in inv_set_compass_sample_rate()
311 sensors.compass.bandwidth = (int)(1000000L / sample_rate_us); in inv_set_compass_sample_rate()
327 *sample_rate_ms = sensors.compass.sample_rate_ms; in inv_get_compass_sample_rate_ms()
367 sensors.compass.bandwidth = bandwidth_hz; in inv_set_compass_bandwidth()
[all …]
Dhal_outputs.c299 long compass[3], quat_geomagnetic[4]; in inv_get_sensor_type_geomagnetic_rotation_vector() local
301 inv_get_compass_set(compass, accuracy, timestamp); in inv_get_sensor_type_geomagnetic_rotation_vector()
520 long compass[3], quat_geomagnetic[4]; in inv_get_sensor_type_orientation_geomagnetic() local
521 inv_get_compass_set(compass, accuracy, timestamp); in inv_get_sensor_type_orientation_geomagnetic()
536 long compass[3]; in inv_generate_hal_outputs() local
545 hal_out.compass_status = sensor_cal->compass.status; in inv_generate_hal_outputs()
559 if ((sensor_cal->compass.status & INV_SENSOR_ON) && (sr > sensor_cal->compass.sample_rate_ms)) { in inv_generate_hal_outputs()
560 sr = sensor_cal->compass.sample_rate_ms; in inv_generate_hal_outputs()
571 if ((sensor_cal->accel.status & sensor_cal->compass.status & INV_SENSOR_ON) == 0) { in inv_generate_hal_outputs()
575 …if ((sensor_cal->gyro.status & sensor_cal->accel.status & sensor_cal->compass.status & INV_SENSOR_… in inv_generate_hal_outputs()
[all …]
Dml_math_func.c39 float inv_compass_angle(const long *compass, const long *grav, const float *quat) in inv_compass_angle() argument
46 cgcross[1] = (float)compass[1] * grav[2] - (float)compass[2] * grav[1]; in inv_compass_angle()
47 cgcross[2] = (float)compass[2] * grav[0] - (float)compass[0] * grav[2]; in inv_compass_angle()
48 cgcross[3] = (float)compass[0] * grav[1] - (float)compass[1] * grav[0]; in inv_compass_angle()
698 void inv_get_cross_product_vec(float *cgcross, float compass[3], float grav[3]) { in inv_get_cross_product_vec()
700 cgcross[0] = (float)compass[1] * grav[2] - (float)compass[2] * grav[1]; in inv_get_cross_product_vec()
701 cgcross[1] = (float)compass[2] * grav[0] - (float)compass[0] * grav[2]; in inv_get_cross_product_vec()
702 cgcross[2] = (float)compass[0] * grav[1] - (float)compass[1] * grav[0]; in inv_get_cross_product_vec()
/hardware/invensense/6515/libsensors_iio/software/core/mllite/
Ddata_builder.c91 memcpy(raw, sensors.compass.raw, sizeof(sensors.compass.raw)); in inv_get_raw_compass()
101 sensors.compass.accuracy = inv_data_builder.save.compass_accuracy; in inv_db_load_func()
106 if (sensors.compass.accuracy == 3) { in inv_db_load_func()
198 return sensors.compass.sensitivity; in inv_get_compass_sensitivity()
355 *ts = sensors.compass.timestamp; in inv_raw_sensor_timestamp()
357 if (sensors.compass.timestamp_prev != sensors.compass.timestamp) in inv_raw_sensor_timestamp()
388 if ((sensors.compass.status & INV_SENSOR_ON) == 0) { in inv_get_9_axis_timestamp()
394 td[1] = sample_rate_us - sensors.compass.sample_rate_us; in inv_get_9_axis_timestamp()
443 if ((sensors.compass.status & INV_SENSOR_ON) == 0) { in inv_get_6_axis_compass_accel_timestamp()
452 td[1] = sample_rate_us - sensors.compass.sample_rate_us; in inv_get_6_axis_compass_accel_timestamp()
[all …]
Dhal_outputs.c341 long compass[3]; in inv_get_sensor_type_geomagnetic_rotation_vector() local
345 inv_get_compass_set(compass, accuracy, &timestamp1); in inv_get_sensor_type_geomagnetic_rotation_vector()
562 long compass[3]; in inv_get_sensor_type_orientation_geomagnetic() local
564 inv_get_compass_set(compass, accuracy, &timestamp1); in inv_get_sensor_type_orientation_geomagnetic()
580 long compass[3]; in inv_generate_hal_outputs() local
589 hal_out.compass_status = sensor_cal->compass.status; in inv_generate_hal_outputs()
603 if ((sensor_cal->compass.status & INV_SENSOR_ON) && (sr > sensor_cal->compass.sample_rate_ms)) { in inv_generate_hal_outputs()
604 sr = sensor_cal->compass.sample_rate_ms; in inv_generate_hal_outputs()
619 if (sensor_cal->compass.timestamp_prev == sensor_cal->compass.timestamp) { in inv_generate_hal_outputs()
629 if ((sensor_cal->accel.status & sensor_cal->compass.status & INV_SENSOR_ON) == 0) { in inv_generate_hal_outputs()
[all …]
Dml_math_func.c39 float inv_compass_angle(const long *compass, const long *grav, const float *quat) in inv_compass_angle() argument
46 cgcross[1] = (float)compass[1] * grav[2] - (float)compass[2] * grav[1]; in inv_compass_angle()
47 cgcross[2] = (float)compass[2] * grav[0] - (float)compass[0] * grav[2]; in inv_compass_angle()
48 cgcross[3] = (float)compass[0] * grav[1] - (float)compass[1] * grav[0]; in inv_compass_angle()
698 void inv_get_cross_product_vec(float *cgcross, float compass[3], float grav[3]) { in inv_get_cross_product_vec()
700 cgcross[0] = (float)compass[1] * grav[2] - (float)compass[2] * grav[1]; in inv_get_cross_product_vec()
701 cgcross[1] = (float)compass[2] * grav[0] - (float)compass[0] * grav[2]; in inv_get_cross_product_vec()
702 cgcross[2] = (float)compass[0] * grav[1] - (float)compass[1] * grav[0]; in inv_get_cross_product_vec()
/hardware/invensense/65xx/libsensors_iio/
DCompassSensor.IIO.primary.cpp147 const char* compass = dev_full_name; in enable_iio_sysfs() local
165 find_type_by_name(compass, "iio:device")); in enable_iio_sysfs()
171 compass, iio_device_node, strerror(res), res); in enable_iio_sysfs()
174 "HAL:iio %s, compass_fd opened : %d", compass, compass_fd); in enable_iio_sysfs()
404 const char *compass = dev_full_name; in fillList() local
406 if (compass) { in fillList()
407 if(!strcmp(compass, "INV_COMPASS")) { in fillList()
415 if(!strcmp(compass, "compass") in fillList()
416 || !strcmp(compass, "INV_AK8975") in fillList()
417 || !strncmp(compass, "ak89xx", 2)) { in fillList()
[all …]
DCompassSensor.IIO.9150.cpp292 const char *compass = sensor_name; in fillList() local
294 if (compass) { in fillList()
295 if(!strcmp(compass, "INV_COMPASS")) { in fillList()
302 if(!strcmp(compass, "compass") in fillList()
303 || !strcmp(compass, "INV_AK8975") in fillList()
304 || !strncmp(compass, "AK89xx",2) in fillList()
305 || !strncmp(compass, "ak89xx",2)) { in fillList()
312 if(!strcmp(compass, "compass") in fillList()
313 || !strncmp(compass, "mlx90399",3) in fillList()
314 || !strncmp(compass, "MLX90399",3)) { in fillList()
[all …]
DCompassSensor.AKM.cpp154 const char *compass = COMPASS_NAME; in fillList() local
156 if (compass) { in fillList()
157 if (!strcmp(compass, "AKM8963")) { in fillList()
164 if (!strcmp(compass, "AKM8975")) { in fillList()
174 "this implementation only supports AKM compasses", compass); in fillList()
Dsensors_mpl.cpp100 compass, enumerator
144 mPollFds[compass].fd = mCompassSensor->getFd(); in sensors_poll_context_t()
145 mPollFds[compass].events = POLLIN; in sensors_poll_context_t()
146 mPollFds[compass].revents = 0; in sensors_poll_context_t()
222 } else if (i == compass) { in pollEvents()
/hardware/invensense/60xx/libsensors_iio/
DCompassSensor.IIO.9150.cpp284 const char *compass = COMPASS_NAME; in fillList() local
286 if (compass) { in fillList()
287 if(!strcmp(compass, "INV_COMPASS")) { in fillList()
297 if(!strcmp(compass, "compass") in fillList()
298 || !strcmp(compass, "INV_AK8975") ) { in fillList()
305 if(!strcmp(compass, "INV_YAS530")) { in fillList()
312 if(!strcmp(compass, "INV_AMI306")) { in fillList()
323 compass); in fillList()
Dsensors_mpl.cpp94 compass, enumerator
130 mPollFds[compass].fd = mCompassSensor->getFd(); in sensors_poll_context_t()
131 mPollFds[compass].events = POLLIN; in sensors_poll_context_t()
132 mPollFds[compass].revents = 0; in sensors_poll_context_t()
174 else if (i == compass) { in pollEvents()
/hardware/invensense/6515/libsensors_iio/software/simple_apps/playback/linux/
Ddatalogger_outputs.c143 struct inv_single_sensor_t *pc = &dl_out.sc.compass; in inv_get_sensor_type_compass_raw_short()
163 long compass[3]; in inv_get_sensor_type_compass_float() local
168 inv_get_compass_set(compass, accuracy, timestamp); in inv_get_sensor_type_compass_float()
170 values[0] = (float)compass[0]*COMPASS_CONVERSION; in inv_get_sensor_type_compass_float()
171 values[1] = (float)compass[1]*COMPASS_CONVERSION; in inv_get_sensor_type_compass_float()
172 values[2] = (float)compass[2]*COMPASS_CONVERSION; in inv_get_sensor_type_compass_float()
/hardware/invensense/6515/libsensors_iio/software/simple_apps/stress_iio/
DREADME14 this includes the compass in the enable sequence when you have 9150 or other
15 secondary bus compass. It won't work for compasses on the primary bus.
24 other sensor output (including quaternion, gyro, accel, and compass.) in the

12