Home
last modified time | relevance | path

Searched +full:gyro +full:- +full:range (Results 1 – 25 of 42) sorted by relevance

12

/Zephyr-latest/dts/bindings/sensor/
Dst,lsm6dso-common.yaml2 # SPDX-License-Identifier: Apache-2.0
5 When setting the accel-pm, accel-range, accel-odr, gyro-pm, gyro-range,
6 gyro-odr properties in a .dts or .dtsi file you may include lsm6dso.h
10 #include <zephyr/dt-bindings/sensor/lsm6dso.h>
15 accel-pm = <LSM6DSO_DT_XL_ULP_MODE>;
16 accel-range = <LSM6DSO_DT_FS_8G>;
17 accel-odr = <LSM6DSO_DT_ODR_1Hz6>;
18 gyro-pm = <LSM6DSO_DT_GY_NORMAL_MODE>;
19 gyro-range = <LSM6DSO_DT_FS_2000DPS>;
20 gyro-odr = <LSM6DSO_DT_ODR_6667Hz>;
[all …]
Dinvensense,icm42688.yaml4 # SPDX-License-Identifier: Apache-2.0
7 ICM-42688 motion tracking device
8 When setting the accel-pm, accel-range, accel-odr, gyro-pm, gyro-range,
9 gyro-odr properties in a .dts or .dtsi file you may include icm42688.h
13 #include <zephyr/dt-bindings/sensor/icm42688.h>
18 accel-pwr-mode = <ICM42688_ACCEL_LN>;
19 accel-fs = <ICM42688_ACCEL_FS_16G>;
20 accel-odr = <ICM42688_ACCEL_ODR_2000>;
21 gyro-pwr-mode= <ICM42688_GYRO_LN>;
22 gyro-fs = <ICM42688_GYRO_FS_2000>;
[all …]
Dst,lsm6dso16is-common.yaml2 # SPDX-License-Identifier: Apache-2.0
5 When setting the accel-range, accel-odr, gyro-range, gyro-odr properties in
10 #include <zephyr/dt-bindings/sensor/lsm6dso16is.h>
15 accel-range = <LSM6DSO16IS_DT_FS_8G>;
16 accel-odr = <LSM6DSO16IS_DT_ODR_104Hz_LP>;
17 gyro-range = <LSM6DSO16IS_DT_FS_2000DPS>;
18 gyro-odr = <LSM6DSO16IS_DT_ODR_104Hz_LP>;
21 include: sensor-device.yaml
24 irq-gpios:
25 type: phandle-array
[all …]
Dinvensense,mpu9250.yaml2 # SPDX-License-Identifier: Apache-2.0
5 InvenSense MPU-9250 Nine-Axis (Gyro + Accelerometer + Compass). See more
6 info at https://www.invensense.com/products/motion-tracking/9-axis/mpu-9250/
10 include: [sensor-device.yaml, i2c-device.yaml]
13 irq-gpios:
14 type: phandle-array
16 The INT signal default configuration is active-high. The
21 gyro-sr-div:
26 when gyro-dlpf is in range 5-184.
27 rate = sample_rate / (1 + gyro-sr-div)
[all …]
Dst,ism330dhcx-common.yaml2 # SPDX-License-Identifier: Apache-2.0
5 When setting the accel-odr and gyro-odr properties in a .dts or .dtsi file you may include
9 #include <zephyr/dt-bindings/sensor/ism330dhcx.h>
14 accel-odr = <ISM330DHCX_DT_ODR_104Hz>;
15 gyro-odr = <ISM330DHCX_DT_ODR_104Hz>;
18 include: sensor-device.yaml
21 drdy-gpios:
22 type: phandle-array
30 int-pin:
43 configuration at power-up.
[all …]
Dst,lsm9ds1.yaml2 # SPDX-License-Identifier: Apache-2.0
5 STMicroelectronics LSM9DS1 9-axis IMU (Inertial Measurement Unit) sensor
10 When setting the accel-range, gyro-range, imu-odr properties in
15 #include <zephyr/dt-bindings/sensor/lsm9ds1.h>
20 accel-range = <LSM9DS1_DT_FS_4G>;
21 imu-odr = <LSM9DS1_IMU_14Hz9>;
22 gyro-range = <LSM9DS1_DT_FS_2000DPS>;
27 include: [sensor-device.yaml, i2c-device.yaml]
30 accel-range:
34 Range of the accelerometer. Unit : g. Default is power-up configuration.
[all …]
Dst,lsm6dsv16x-common.yaml2 # SPDX-License-Identifier: Apache-2.0
5 When setting the accel-range, accel-odr, gyro-range, gyro-odr properties in
10 #include <zephyr/dt-bindings/sensor/lsm6dsv16x.h>
15 accel-range = <LSM6DSV16X_DT_FS_8G>;
16 accel-odr = <LSM6DSV16X_DT_ODR_AT_60Hz>;
17 gyro-range = <LSM6DSV16X_DT_FS_4000DPS>;
18 gyro-odr = <LSM6DSV16X_DT_ODR_AT_60Hz>;
21 include: sensor-device.yaml
24 int1-gpios:
25 type: phandle-array
[all …]
/Zephyr-latest/drivers/sensor/bosch/bmi08x/
Dbmi08x.h5 * SPDX-License-Identifier: Apache-2.0
77 /* Accel range setting register */
132 /* BMI085 Accel Range */
138 /**\name BMI088 Accel Range */
196 /* Mask definitions for odr, bandwidth and range */
201 /* Position definitions for odr, bandwidth and range */
239 /* Gyro registers */
241 /* Gyro Chip Id register */
244 /* Gyro X LSB data register */
247 /* Gyro X MSB data register */
[all …]
Dbmi08x_gyro.c5 * SPDX-License-Identifier: Apache-2.0
26 const struct bmi08x_gyro_config *bmi08x = dev->config; in bmi08x_gyro_transceive_i2c()
29 return i2c_write_read_dt(&bmi08x->bus.i2c, &reg, 1, data, length); in bmi08x_gyro_transceive_i2c()
32 return -EINVAL; in bmi08x_gyro_transceive_i2c()
38 return i2c_write_dt(&bmi08x->bus.i2c, buf, 1 + length); in bmi08x_gyro_transceive_i2c()
43 return i2c_is_ready_dt(&bus->i2c) ? 0 : -ENODEV; in bmi08x_bus_check_i2c()
58 const struct bmi08x_gyro_config *bmi08x = dev->config; in bmi08x_gyro_transceive_spi()
68 return spi_transceive_dt(&bmi08x->bus.spi, &tx, &rx); in bmi08x_gyro_transceive_spi()
71 return spi_write_dt(&bmi08x->bus.spi, &tx); in bmi08x_gyro_transceive_spi()
76 return spi_is_ready_dt(&bus->spi) ? 0 : -ENODEV; in bmi08x_bus_check_spi()
[all …]
Dbmi08x_accel.c5 * SPDX-License-Identifier: Apache-2.0
27 const struct bmi08x_accel_config *bmi08x = dev->config; in bmi08x_accel_transceive_i2c()
30 return i2c_write_read_dt(&bmi08x->bus.i2c, &reg, 1, data, length); in bmi08x_accel_transceive_i2c()
33 return -EINVAL; in bmi08x_accel_transceive_i2c()
39 return i2c_write_dt(&bmi08x->bus.i2c, buf, 1 + length); in bmi08x_accel_transceive_i2c()
88 length -= len1; in bmi08x_write_config_file_i2c()
96 return i2c_is_ready_dt(&bus->i2c) ? 0 : -ENODEV; in bmi08x_bus_check_i2c()
114 const struct bmi08x_accel_config *bmi08x = dev->config; in bmi08x_accel_transceive_spi()
124 return spi_transceive_dt(&bmi08x->bus.spi, &tx, &rx); in bmi08x_accel_transceive_spi()
127 return spi_write_dt(&bmi08x->bus.spi, &tx); in bmi08x_accel_transceive_spi()
[all …]
/Zephyr-latest/samples/sensor/bmg160/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
29 printf("Cannot read bmg160 gyro channels.\n"); in print_gyro_data()
33 printf("Gyro (rad/s): X=%f, Y=%f, Z=%f\n", in print_gyro_data()
58 printf("Gyro sample update error.\n"); in test_polling_mode()
68 remaining_test_time -= SLEEPTIME; in test_polling_mode()
75 if (trigger->type != SENSOR_TRIG_DATA_READY && in trigger_handler()
76 trigger->type != SENSOR_TRIG_DELTA) { in trigger_handler()
77 printf("Gyro: trigger handler: unknown trigger type.\n"); in trigger_handler()
82 printf("Gyro sample update error.\n"); in trigger_handler()
97 printf("Gyro: Testing anymotion trigger.\n"); in test_trigger_mode()
[all …]
/Zephyr-latest/include/zephyr/dt-bindings/sensor/
Dlsm6dso.h4 * SPDX-License-Identifier: Apache-2.0
9 /* Accel power-modes */
14 /* Gyro power-modes */
18 /* Accel range */
24 /* Gyro range */
31 /* Accel and Gyro Data rates */
Dlsm6dso16is.h4 * SPDX-License-Identifier: Apache-2.0
9 /* Accel range */
15 /* Gyro range */
22 /* Accel and Gyro Data rates */
Dlsm6dsv16x.h4 * SPDX-License-Identifier: Apache-2.0
9 /* Accel range */
15 /* Gyro range */
23 /* Accel and Gyro Data rates */
/Zephyr-latest/tests/drivers/build_all/sensor/
Di3c.dtsi4 * SPDX-License-Identifier: Apache-2.0
16 assigned-address = <0x1>;
17 drdy-gpios = <&test_gpio 0 0>;
23 assigned-address = <0x2>;
24 drdy-gpios = <&test_gpio 0 0>;
30 assigned-address = <0x3>;
31 drdy-gpios = <&test_gpio 0 0>;
37 assigned-address = <0x4>;
43 assigned-address = <0x5>;
44 int1-gpios = <&test_gpio 0 0>;
[all …]
Di2c.dtsi4 * SPDX-License-Identifier: Apache-2.0
9 #include <zephyr/dt-bindings/sensor/lsm6dsv16x.h>
10 #include <zephyr/dt-bindings/sensor/lsm6dso.h>
11 #include <zephyr/dt-bindings/sensor/lsm6dso16is.h>
12 #include <zephyr/dt-bindings/sensor/lps22hh.h>
13 #include <zephyr/dt-bindings/sensor/lps2xdf.h>
14 #include <zephyr/dt-bindings/sensor/lis2ds12.h>
15 #include <zephyr/dt-bindings/sensor/lis2dw12.h>
16 #include <zephyr/dt-bindings/sensor/ism330dhcx.h>
17 #include <zephyr/dt-bindings/sensor/iis2dlpc.h>
[all …]
/Zephyr-latest/drivers/sensor/st/lsm9ds1/
Dlsm9ds1.c4 * SPDX-License-Identifier: Apache-2.0
42 const struct lsm9ds1_config *cfg = dev->config; in lsm9ds1_reboot()
43 stmdev_ctx_t *ctx = (stmdev_ctx_t *)&cfg->ctx; in lsm9ds1_reboot()
64 static int lsm9ds1_accel_range_to_fs_val(int32_t range) in lsm9ds1_accel_range_to_fs_val() argument
66 switch (range) { in lsm9ds1_accel_range_to_fs_val()
76 return -EINVAL; in lsm9ds1_accel_range_to_fs_val()
80 static int lsm9ds1_gyro_range_to_fs_val(int32_t range) in lsm9ds1_gyro_range_to_fs_val() argument
82 switch (range) { in lsm9ds1_gyro_range_to_fs_val()
90 return -EINVAL; in lsm9ds1_gyro_range_to_fs_val()
109 return -EINVAL; in lsm9ds1_accel_freq_to_odr_val()
[all …]
/Zephyr-latest/drivers/sensor/st/ism330dhcx/
Dism330dhcx.c1 /* ST Microelectronics ISM330DHCX 6-axis IMU sensor driver
5 * SPDX-License-Identifier: Apache-2.0
39 return -EINVAL; in ism330dhcx_freq_to_odr_val()
50 return ism330dhcx_odr_map[ARRAY_SIZE(ism330dhcx_odr_map) - 1]; in ism330dhcx_odr_to_freq_val()
56 static int ism330dhcx_accel_range_to_fs_val(int32_t range) in ism330dhcx_accel_range_to_fs_val() argument
61 if (range == ism330dhcx_accel_fs_map[i]) { in ism330dhcx_accel_range_to_fs_val()
66 return -EINVAL; in ism330dhcx_accel_range_to_fs_val()
94 static int ism330dhcx_gyro_range_to_fs_val(int32_t range) in ism330dhcx_gyro_range_to_fs_val() argument
99 if (range == ism330dhcx_gyro_fs_map[i]) { in ism330dhcx_gyro_range_to_fs_val()
104 return -EINVAL; in ism330dhcx_gyro_range_to_fs_val()
[all …]
/Zephyr-latest/drivers/sensor/st/lsm6dso/
Dlsm6dso.c1 /* ST Microelectronics LSM6DSO 6-axis IMU sensor driver
5 * SPDX-License-Identifier: Apache-2.0
36 return -EINVAL; in lsm6dso_freq_to_odr_val()
47 return lsm6dso_odr_map[ARRAY_SIZE(lsm6dso_odr_map) - 1]; in lsm6dso_odr_to_freq_val()
52 static int lsm6dso_accel_range_to_fs_val(int32_t range, bool double_range) in lsm6dso_accel_range_to_fs_val() argument
57 if (range == (lsm6dso_accel_fs_map[i] << double_range)) { in lsm6dso_accel_range_to_fs_val()
62 return -EINVAL; in lsm6dso_accel_range_to_fs_val()
67 /* Range of ±2G has a LSB of GAIN_UNIT_XL, thus divide by 2 */ in lsm6dso_accel_fs_val_to_gain()
76 static int lsm6dso_gyro_range_to_fs_val(int32_t range) in lsm6dso_gyro_range_to_fs_val() argument
81 if (range == lsm6dso_gyro_fs_map[i]) { in lsm6dso_gyro_range_to_fs_val()
[all …]
/Zephyr-latest/drivers/sensor/st/lsm6dso16is/
Dlsm6dso16is.c1 /* ST Microelectronics LSM6DSO16IS 6-axis IMU sensor driver
5 * SPDX-License-Identifier: Apache-2.0
38 return -EINVAL; in lsm6dso16is_freq_to_odr_val()
49 return lsm6dso16is_odr_map[ARRAY_SIZE(lsm6dso16is_odr_map) - 1]; in lsm6dso16is_odr_to_freq_val()
54 static int lsm6dso16is_accel_range_to_fs_val(int32_t range) in lsm6dso16is_accel_range_to_fs_val() argument
59 if (range == lsm6dso16is_accel_fs_map[i]) { in lsm6dso16is_accel_range_to_fs_val()
64 return -EINVAL; in lsm6dso16is_accel_range_to_fs_val()
70 static int lsm6dso16is_gyro_range_to_fs_val(int32_t range) in lsm6dso16is_gyro_range_to_fs_val() argument
75 if (range == lsm6dso16is_gyro_fs_map[i]) { in lsm6dso16is_gyro_range_to_fs_val()
80 return -EINVAL; in lsm6dso16is_gyro_range_to_fs_val()
[all …]
/Zephyr-latest/drivers/sensor/tdk/mpu6050/
Dmpu6050.c4 * SPDX-License-Identifier: Apache-2.0
26 val->val1 = conv_val / 1000000; in mpu6050_convert_accel()
27 val->val2 = conv_val % 1000000; in mpu6050_convert_accel()
38 val->val1 = conv_val / 1000000; in mpu6050_convert_gyro()
39 val->val2 = conv_val % 1000000; in mpu6050_convert_gyro()
59 val->val1 = tmp_val / 1000000; in mpu6050_convert_temp()
60 val->val2 = tmp_val % 1000000; in mpu6050_convert_temp()
67 struct mpu6050_data *drv_data = dev->data; in mpu6050_channel_get()
71 mpu6050_convert_accel(val, drv_data->accel_x, in mpu6050_channel_get()
72 drv_data->accel_sensitivity_shift); in mpu6050_channel_get()
[all …]
/Zephyr-latest/tests/drivers/sensor/icm42688/src/
Dmain.c3 * SPDX-License-Identifier: Apache-2.0
45 icm42688_emul_set_reg(fixture->target, REG_INT_STATUS, &status, 1); in ZTEST_F()
46 zassert_equal(-EBUSY, sensor_sample_fetch(fixture->dev)); in ZTEST_F()
59 icm42688_emul_set_reg(fixture->target, REG_INT_STATUS, buffer, 1); in test_fetch_temp_mc()
65 temperature_reg = ((temperature_mc - 25000) * 13248) / 100000; in test_fetch_temp_mc()
68 icm42688_emul_set_reg(fixture->target, REG_TEMP_DATA1, buffer, 2); in test_fetch_temp_mc()
71 zassert_ok(sensor_sample_fetch(fixture->dev)); in test_fetch_temp_mc()
72 zassert_ok(sensor_channel_get(fixture->dev, SENSOR_CHAN_DIE_TEMP, &value)); in test_fetch_temp_mc()
74 /* Assert data is within 5 milli-C of the tested temperature */ in test_fetch_temp_mc()
85 /* Test -3.175C */ in ZTEST_F()
[all …]
/Zephyr-latest/drivers/sensor/tdk/mpu9250/
Dmpu9250.c4 * SPDX-License-Identifier: Apache-2.0
64 val->val1 = conv_val / 1000000; in mpu9250_convert_accel()
65 val->val2 = conv_val % 1000000; in mpu9250_convert_accel()
76 val->val1 = conv_val / 1000000; in mpu9250_convert_gyro()
77 val->val2 = conv_val % 1000000; in mpu9250_convert_gyro()
85 val->val1 = (raw_val / MPU0259_TEMP_SENSITIVITY) + MPU9250_TEMP_OFFSET; in mpu9250_convert_temp()
86 val->val2 = (((int64_t)(raw_val % MPU0259_TEMP_SENSITIVITY) * 1000000) in mpu9250_convert_temp()
89 if (val->val2 < 0) { in mpu9250_convert_temp()
90 val->val1--; in mpu9250_convert_temp()
91 val->val2 += 1000000; in mpu9250_convert_temp()
[all …]
/Zephyr-latest/drivers/sensor/bosch/bmi160/
Dbmi160.c5 * SPDX-License-Identifier: Apache-2.0
8 * http://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BMI160-DS000-07.pdf
34 const struct bmi160_cfg *cfg = dev->config; in bmi160_transceive()
56 return spi_transceive_dt(&cfg->bus.spi, &tx, &rx); in bmi160_transceive()
59 return spi_write_dt(&cfg->bus.spi, &tx); in bmi160_transceive()
64 const struct bmi160_cfg *cfg = dev->config; in bmi160_bus_ready_spi()
66 return spi_is_ready_dt(&cfg->bus.spi); in bmi160_bus_ready_spi()
94 const struct bmi160_cfg *cfg = dev->config; in bmi160_bus_ready_i2c()
96 return device_is_ready(cfg->bus.i2c.bus); in bmi160_bus_ready_i2c()
102 const struct bmi160_cfg *cfg = dev->config; in bmi160_read_i2c()
[all …]
/Zephyr-latest/drivers/sensor/st/lsm6dsv16x/
Dlsm6dsv16x.c1 /* ST Microelectronics LSM6DSV16X 6-axis IMU sensor driver
5 * SPDX-License-Identifier: Apache-2.0
29 * should be selected through accel-odr property in DT
50 const struct lsm6dsv16x_config *cfg = dev->config; in lsm6dsv16x_freq_to_odr_val()
51 stmdev_ctx_t *ctx = (stmdev_ctx_t *)&cfg->ctx; in lsm6dsv16x_freq_to_odr_val()
57 return -EINVAL; in lsm6dsv16x_freq_to_odr_val()
64 LOG_DBG("mode: %d - odr: %d", mode, i); in lsm6dsv16x_freq_to_odr_val()
69 return -EINVAL; in lsm6dsv16x_freq_to_odr_val()
74 static int lsm6dsv16x_accel_range_to_fs_val(int32_t range) in lsm6dsv16x_accel_range_to_fs_val() argument
79 if (range == lsm6dsv16x_accel_fs_map[i]) { in lsm6dsv16x_accel_range_to_fs_val()
[all …]

12