Home
last modified time | relevance | path

Searched full:odr (Results 1 – 25 of 154) sorted by relevance

1234567

/Zephyr-latest/drivers/sensor/st/stts22h/
Dstts22h.c25 static inline int stts22h_set_odr_raw(const struct device *dev, stts22h_odr_temp_t odr) in stts22h_set_odr_raw() argument
30 return stts22h_temp_data_rate_set(ctx, odr); in stts22h_set_odr_raw()
82 int odr; in stts22h_odr_set() local
84 for (odr = 0; odr < ARRAY_SIZE(stts22h_map); odr++) { in stts22h_odr_set()
85 if (val->val1 <= stts22h_map[odr]) { in stts22h_odr_set()
90 switch (odr) { in stts22h_odr_set()
104 LOG_ERR("bad frequency: %d (odr = %d)", val->val1, odr); in stts22h_odr_set()
143 uint8_t chip_id, odr; in stts22h_init_chip() local
157 /* set odr from DT */ in stts22h_init_chip()
158 odr = cfg->odr; in stts22h_init_chip()
[all …]
/Zephyr-latest/dts/bindings/sensor/
Dmemsic,mmc56x3.yaml12 magn-odr:
17 maximum is 1000, though any ODR above 255 will be set to 1000.
18 Setting ODR to 0 will turn off continuous mode. Temperature
25 Affects ODR; see datasheet for details.
31 Affects ODR; see datasheet for details.
38 Affects ODR; see datasheet for details.
Dadi,adxl372-common.yaml7 odr:
11 Accelerometer sampling frequency (ODR). Default is power on reset value.
48 0 # ODR/210
49 1 # ODR/411
50 2 # ODR/812
51 3 # ODR/1616
Dst,lis2dw12-common.yaml5 When setting the odr property in a .dts or .dtsi file you may include
62 odr:
68 If 0 selected as the odr, the accelerometer initializes into
141 detection to be recognized as a tap event. Where 0 equals 4*1/ODR and
142 1LSB = 8*1/ODR.
152 double-tap event. Where 0 equals 16*1/ODR and 1LSB = 32*1/ODR.
161 there must not be any overthreshold event. Where 0 equals 2*1/ODR
162 and 1LSB = 4*1/ODR.
207 register and 1 LSB = 1 * 1/ODR. This value depends on the ODR.
210 100Hz ODR and 30ms ff-duration for recognize freefall detection
[all …]
Dst,ism330dhcx-common.yaml5 When setting the accel-odr and gyro-odr properties in a .dts or .dtsi file you may include
14 accel-odr = <ISM330DHCX_DT_ODR_104Hz>;
15 gyro-odr = <ISM330DHCX_DT_ODR_104Hz>;
46 accel-odr:
81 gyro-odr:
Dinvensense,icm42688.yaml8 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
20 accel-odr = <ICM42688_ACCEL_ODR_2000>;
23 gyro-odr = <ICM42688_GYRO_ODR_2000>;
47 accel-odr:
93 gyro-odr:
Dst,iis2dlpc-common.yaml5 When setting the odr property in a .dts or .dtsi file you may include
113 detection to be recognized as a tap event. Where 0 equals 4*1/ODR and
114 1LSB = 8*1/ODR.
124 double-tap event. Where 0 equals 16*1/ODR and 1LSB = 32*1/ODR.
133 there must not be any overthreshold event. Where 0 equals 2*1/ODR
134 and 1LSB = 4*1/ODR.
/Zephyr-latest/drivers/sensor/bosch/bmi270/
Dbmi270.c96 double odr = sensor_value_to_double((struct sensor_value *) val); in acc_odr_to_reg() local
99 if ((odr >= 0.78125) && (odr < 1.5625)) { in acc_odr_to_reg()
101 } else if ((odr >= 1.5625) && (odr < 3.125)) { in acc_odr_to_reg()
103 } else if ((odr >= 3.125) && (odr < 6.25)) { in acc_odr_to_reg()
105 } else if ((odr >= 6.25) && (odr < 12.5)) { in acc_odr_to_reg()
107 } else if ((odr >= 12.5) && (odr < 25.0)) { in acc_odr_to_reg()
109 } else if ((odr >= 25.0) && (odr < 50.0)) { in acc_odr_to_reg()
111 } else if ((odr >= 50.0) && (odr < 100.0)) { in acc_odr_to_reg()
113 } else if ((odr >= 100.0) && (odr < 200.0)) { in acc_odr_to_reg()
115 } else if ((odr >= 200.0) && (odr < 400.0)) { in acc_odr_to_reg()
[all …]
/Zephyr-latest/drivers/sensor/bosch/bmi323/
Dbmi323.c192 int64_t odr = sensor_value_to_milli(val); in bosch_bmi323_driver_api_set_acc_odr() local
200 acc_conf &= ~IMU_BOSCH_BMI323_REG_MASK(ACC_CONF, ODR); in bosch_bmi323_driver_api_set_acc_odr()
202 if (odr <= 782) { in bosch_bmi323_driver_api_set_acc_odr()
203 acc_conf |= IMU_BOSCH_BMI323_REG_VALUE(ACC_CONF, ODR, HZ0P78125); in bosch_bmi323_driver_api_set_acc_odr()
204 } else if (odr <= 1563) { in bosch_bmi323_driver_api_set_acc_odr()
205 acc_conf |= IMU_BOSCH_BMI323_REG_VALUE(ACC_CONF, ODR, HZ1P5625); in bosch_bmi323_driver_api_set_acc_odr()
206 } else if (odr <= 3125) { in bosch_bmi323_driver_api_set_acc_odr()
207 acc_conf |= IMU_BOSCH_BMI323_REG_VALUE(ACC_CONF, ODR, HZ3P125); in bosch_bmi323_driver_api_set_acc_odr()
208 } else if (odr <= 6250) { in bosch_bmi323_driver_api_set_acc_odr()
209 acc_conf |= IMU_BOSCH_BMI323_REG_VALUE(ACC_CONF, ODR, HZ6P25); in bosch_bmi323_driver_api_set_acc_odr()
[all …]
/Zephyr-latest/drivers/sensor/st/lsm9ds1/
Dlsm9ds1.c29 * Values of the different sampling frequencies of the accelerometer, indexed by the raw odr
35 * Value of the different sampling frequencies of the gyroscope, indexed by the raw odr value
125 static int lsm9ds1_accel_set_odr_raw(const struct device *dev, uint8_t odr) in lsm9ds1_accel_set_odr_raw() argument
139 ctrl_reg6_xl.odr_xl = odr; in lsm9ds1_accel_set_odr_raw()
146 data->accel_odr = odr; in lsm9ds1_accel_set_odr_raw()
151 static int lsm9ds1_gyro_set_odr_raw(const struct device *dev, uint8_t odr) in lsm9ds1_gyro_set_odr_raw() argument
165 ctrl_reg1.odr_g = odr; in lsm9ds1_gyro_set_odr_raw()
172 data->gyro_odr = odr; in lsm9ds1_gyro_set_odr_raw()
179 int odr; in lsm9ds1_gyro_odr_set() local
182 odr = lsm9ds1_gyro_freq_to_odr_val(freq); in lsm9ds1_gyro_odr_set()
[all …]
/Zephyr-latest/drivers/sensor/st/lis2ds12/
Dlis2ds12.c26 static int lis2ds12_set_odr(const struct device *dev, uint8_t odr) in lis2ds12_set_odr() argument
33 if (odr == 0U) { in lis2ds12_set_odr()
39 * odr >= 1600Hz are available in HF mode only in lis2ds12_set_odr()
40 * 12,5Hz <= odr <= 800Hz are available in LP and HR mode only in lis2ds12_set_odr()
41 * odr == 1Hz is available in LP mode only in lis2ds12_set_odr()
43 if ((odr >= LIS2DS12_DT_ODR_1600Hz && cfg->pm != LIS2DS12_DT_HIGH_FREQUENCY) || in lis2ds12_set_odr()
44 (odr < LIS2DS12_DT_ODR_1600Hz && cfg->pm == LIS2DS12_DT_HIGH_FREQUENCY) || in lis2ds12_set_odr()
45 (odr == LIS2DS12_DT_ODR_1Hz_LP && cfg->pm != LIS2DS12_DT_LOW_POWER)) { in lis2ds12_set_odr()
46 LOG_ERR("%s: bad odr and pm combination", dev->name); in lis2ds12_set_odr()
50 switch (odr) { in lis2ds12_set_odr()
[all …]
/Zephyr-latest/drivers/sensor/st/lps22hh/
Dlps22hh.c25 static inline int lps22hh_set_odr_raw(const struct device *dev, uint8_t odr) in lps22hh_set_odr_raw() argument
30 return lps22hh_data_rate_set(ctx, odr); in lps22hh_set_odr_raw()
130 int odr; in lps22hh_odr_set() local
132 for (odr = 0; odr < ARRAY_SIZE(lps22hh_map); odr++) { in lps22hh_odr_set()
133 if (freq == lps22hh_map[odr]) { in lps22hh_odr_set()
138 if (odr == ARRAY_SIZE(lps22hh_map)) { in lps22hh_odr_set()
143 if (lps22hh_set_odr_raw(dev, odr) < 0) { in lps22hh_odr_set()
239 /* set sensor default odr */ in lps22hh_init_chip()
240 LOG_DBG("%s: odr: %d", dev->name, cfg->odr); in lps22hh_init_chip()
241 ret = lps22hh_set_odr_raw(dev, cfg->odr); in lps22hh_init_chip()
[all …]
/Zephyr-latest/drivers/sensor/st/lis2dux12/
Dlis2dux12_api.c15 static int32_t st_lis2dux12_set_odr_raw(const struct device *dev, uint8_t odr) in st_lis2dux12_set_odr_raw() argument
20 lis2dux12_md_t mode = {.odr = odr, .fs = data->range}; in st_lis2dux12_set_odr_raw()
22 data->odr = odr; in st_lis2dux12_set_odr_raw()
32 lis2dux12_md_t val = { .odr = data->odr, .fs = range }; in st_lis2dux12_set_range()
220 /* set sensor default pm and odr */ in st_lis2dux12_init()
221 LOG_DBG("%s: pm: %d, odr: %d", dev->name, cfg->pm, cfg->odr); in st_lis2dux12_init()
222 ret = st_lis2dux12_set_odr_raw(dev, cfg->odr); in st_lis2dux12_init()
224 LOG_ERR("%s: odr init error (12.5 Hz)", dev->name); in st_lis2dux12_init()
Dlis2duxs12_api.c15 static int32_t st_lis2duxs12_set_odr_raw(const struct device *dev, uint8_t odr) in st_lis2duxs12_set_odr_raw() argument
20 lis2duxs12_md_t mode = {.odr = odr, .fs = data->range}; in st_lis2duxs12_set_odr_raw()
22 data->odr = odr; in st_lis2duxs12_set_odr_raw()
32 lis2duxs12_md_t val = { .odr = data->odr, .fs = range }; in st_lis2duxs12_set_range()
220 /* set sensor default pm and odr */ in st_lis2duxs12_init()
221 LOG_DBG("%s: pm: %d, odr: %d", dev->name, cfg->pm, cfg->odr); in st_lis2duxs12_init()
222 ret = st_lis2duxs12_set_odr_raw(dev, cfg->odr); in st_lis2duxs12_init()
224 LOG_ERR("%s: odr init error (12.5 Hz)", dev->name); in st_lis2duxs12_init()
/Zephyr-latest/drivers/sensor/st/i3g4250d/
Di3g4250d.c109 double odr = sensor_value_to_double(val); in gyr_odr_to_reg() local
112 if ((odr > 0.0) && (odr < 100.0)) { in gyr_odr_to_reg()
114 } else if ((odr >= 100.0) && (odr < 200.0)) { in gyr_odr_to_reg()
116 } else if ((odr >= 200.0) && (odr < 400.0)) { in gyr_odr_to_reg()
118 } else if ((odr >= 400.0) && (odr < 800.0)) { in gyr_odr_to_reg()
120 } else if (odr >= 800.0) { in gyr_odr_to_reg()
/Zephyr-latest/drivers/sensor/st/stts751/
Dstts751.c25 static inline int stts751_set_odr_raw(const struct device *dev, uint8_t odr) in stts751_set_odr_raw() argument
29 return stts751_temp_data_rate_set(data->ctx, odr); in stts751_set_odr_raw()
91 int odr; in stts751_odr_set() local
93 for (odr = 0; odr < ARRAY_SIZE(stts751_map); odr++) { in stts751_odr_set()
94 if (val->val1 == stts751_map[odr].rate && in stts751_odr_set()
95 val->val2 == stts751_map[odr].rate_dec) { in stts751_odr_set()
100 if (odr == ARRAY_SIZE(stts751_map)) { in stts751_odr_set()
105 if (stts751_set_odr_raw(dev, odr) < 0) { in stts751_odr_set()
/Zephyr-latest/drivers/sensor/st/lps2xdf/
Dilps22qs.c15 static inline int ilps22qs_mode_set_odr_raw(const struct device *dev, uint8_t odr) in ilps22qs_mode_set_odr_raw() argument
21 md.odr = odr; in ilps22qs_mode_set_odr_raw()
157 /* set sensor default odr */ in st_ilps22qs_init()
158 LOG_DBG("%s: odr: %d", dev->name, cfg->odr); in st_ilps22qs_init()
159 ret = ilps22qs_mode_set_odr_raw(dev, cfg->odr); in st_ilps22qs_init()
161 LOG_ERR("%s: Failed to set odr %d", dev->name, cfg->odr); in st_ilps22qs_init()
/Zephyr-latest/drivers/sensor/st/lsm6dso16is/
Dlsm6dso16is_shub.c85 uint8_t odr, cfg; in lsm6dso16is_lis2mdl_odr_set() local
87 for (odr = 0; odr < ARRAY_SIZE(lis2mdl_map); odr++) { in lsm6dso16is_lis2mdl_odr_set()
88 if (freq <= lis2mdl_map[odr]) { in lsm6dso16is_lis2mdl_odr_set()
93 if (odr == ARRAY_SIZE(lis2mdl_map)) { in lsm6dso16is_lis2mdl_odr_set()
98 cfg = (odr << 2); in lsm6dso16is_lis2mdl_odr_set()
168 /* configure ODR and BDU */ in lsm6dso16is_hts221_init()
181 uint8_t odr, cfg; in lsm6dso16is_hts221_odr_set() local
183 for (odr = 0; odr < ARRAY_SIZE(hts221_map); odr++) { in lsm6dso16is_hts221_odr_set()
184 if (freq <= hts221_map[odr]) { in lsm6dso16is_hts221_odr_set()
189 if (odr == ARRAY_SIZE(hts221_map)) { in lsm6dso16is_hts221_odr_set()
[all …]
Dlsm6dso16is.c41 static int lsm6dso16is_odr_to_freq_val(uint16_t odr) in lsm6dso16is_odr_to_freq_val() argument
44 if (odr < ARRAY_SIZE(lsm6dso16is_odr_map)) { in lsm6dso16is_odr_to_freq_val()
45 return lsm6dso16is_odr_map[odr & 0xF]; in lsm6dso16is_odr_to_freq_val()
113 static int lsm6dso16is_accel_set_odr_raw(const struct device *dev, uint8_t odr) in lsm6dso16is_accel_set_odr_raw() argument
119 if (lsm6dso16is_xl_data_rate_set(ctx, odr) < 0) { in lsm6dso16is_accel_set_odr_raw()
123 data->accel_freq = lsm6dso16is_odr_to_freq_val(odr); in lsm6dso16is_accel_set_odr_raw()
140 static int lsm6dso16is_gyro_set_odr_raw(const struct device *dev, uint8_t odr) in lsm6dso16is_gyro_set_odr_raw() argument
145 if (lsm6dso16is_gy_data_rate_set(ctx, odr) < 0) { in lsm6dso16is_gyro_set_odr_raw()
154 int odr; in lsm6dso16is_accel_odr_set() local
156 odr = lsm6dso16is_freq_to_odr_val(freq); in lsm6dso16is_accel_odr_set()
[all …]
/Zephyr-latest/drivers/sensor/st/lsm6dsv16x/
Dlsm6dsv16x_shub.c85 uint8_t odr, cfg; in lsm6dsv16x_lis2mdl_odr_set() local
87 for (odr = 0; odr < ARRAY_SIZE(lis2mdl_map); odr++) { in lsm6dsv16x_lis2mdl_odr_set()
88 if (freq <= lis2mdl_map[odr]) { in lsm6dsv16x_lis2mdl_odr_set()
93 if (odr == ARRAY_SIZE(lis2mdl_map)) { in lsm6dsv16x_lis2mdl_odr_set()
98 cfg = (odr << 2); in lsm6dsv16x_lis2mdl_odr_set()
168 /* configure ODR and BDU */ in lsm6dsv16x_hts221_init()
181 uint8_t odr, cfg; in lsm6dsv16x_hts221_odr_set() local
183 for (odr = 0; odr < ARRAY_SIZE(hts221_map); odr++) { in lsm6dsv16x_hts221_odr_set()
184 if (freq <= hts221_map[odr]) { in lsm6dsv16x_hts221_odr_set()
189 if (odr == ARRAY_SIZE(hts221_map)) { in lsm6dsv16x_hts221_odr_set()
[all …]
/Zephyr-latest/boards/shields/x_nucleo_iks4a1/
Dx_nucleo_iks4a1.overlay21 accel-odr = <0x1b>;
22 gyro-odr = <0x11>;
30 accel-odr = <0x02>;
31 gyro-odr = <0x02>;
/Zephyr-latest/drivers/sensor/st/lsm6dso/
Dlsm6dso.c39 static int lsm6dso_odr_to_freq_val(uint16_t odr) in lsm6dso_odr_to_freq_val() argument
42 if (odr < ARRAY_SIZE(lsm6dso_odr_map)) { in lsm6dso_odr_to_freq_val()
43 return lsm6dso_odr_map[odr]; in lsm6dso_odr_to_freq_val()
119 static int lsm6dso_accel_set_odr_raw(const struct device *dev, uint8_t odr) in lsm6dso_accel_set_odr_raw() argument
125 if (lsm6dso_xl_data_rate_set(ctx, odr) < 0) { in lsm6dso_accel_set_odr_raw()
129 data->accel_freq = lsm6dso_odr_to_freq_val(odr); in lsm6dso_accel_set_odr_raw()
146 static int lsm6dso_gyro_set_odr_raw(const struct device *dev, uint8_t odr) in lsm6dso_gyro_set_odr_raw() argument
151 if (lsm6dso_gy_data_rate_set(ctx, odr) < 0) { in lsm6dso_gyro_set_odr_raw()
160 int odr; in lsm6dso_accel_odr_set() local
162 odr = lsm6dso_freq_to_odr_val(freq); in lsm6dso_accel_odr_set()
[all …]
/Zephyr-latest/drivers/sensor/st/lis2du12/
Dlis2du12.c109 static int lis2du12_accel_set_odr_raw(const struct device *dev, uint8_t odr) in lis2du12_accel_set_odr_raw() argument
120 mode.odr = odr; in lis2du12_accel_set_odr_raw()
125 data->accel_freq = odr; in lis2du12_accel_set_odr_raw()
132 int odr; in lis2du12_accel_odr_set() local
134 odr = lis2du12_freq_to_odr_val(dev, freq); in lis2du12_accel_odr_set()
135 if (odr < 0) { in lis2du12_accel_odr_set()
136 return odr; in lis2du12_accel_odr_set()
139 if (lis2du12_accel_set_odr_raw(dev, odr) < 0) { in lis2du12_accel_odr_set()
322 uint8_t odr, fs; in lis2du12_init_chip() local
350 /* set odr from DT (the only way to go in high performance) */ in lis2du12_init_chip()
[all …]
/Zephyr-latest/include/zephyr/drivers/sensor/
Dmmc56x3.h28 * each measurement. Affects ODR; see datasheet for details.
35 * each measurement. Affects ODR; see datasheet for details.
42 * Affects ODR; see datasheet for details.
/Zephyr-latest/drivers/sensor/st/lis2de12/
Dlis2de12.c81 static int lis2de12_accel_set_odr_raw(const struct device *dev, uint8_t odr) in lis2de12_accel_set_odr_raw() argument
87 if (lis2de12_data_rate_set(ctx, odr) < 0) { in lis2de12_accel_set_odr_raw()
91 data->accel_freq = odr; in lis2de12_accel_set_odr_raw()
98 int odr; in lis2de12_accel_odr_set() local
100 odr = lis2de12_freq_to_odr_val(dev, freq); in lis2de12_accel_odr_set()
101 if (odr < 0) { in lis2de12_accel_odr_set()
102 return odr; in lis2de12_accel_odr_set()
105 if (lis2de12_accel_set_odr_raw(dev, odr) < 0) { in lis2de12_accel_odr_set()
321 uint8_t odr, fs; in lis2de12_init_chip() local
349 /* set odr from DT (the only way to go in high performance) */ in lis2de12_init_chip()
[all …]

1234567