/Zephyr-Core-2.7.6/drivers/sensor/bmi270/ |
D | bmi270.c | 75 double odr = sensor_value_to_double((struct sensor_value *) val); in acc_odr_to_reg() local 78 if ((odr >= 0.78125f) && (odr < 1.5625f)) { in acc_odr_to_reg() 80 } else if ((odr >= 1.5625f) && (odr < 3.125f)) { in acc_odr_to_reg() 82 } else if ((odr >= 3.125f) && (odr < 6.25f)) { in acc_odr_to_reg() 84 } else if ((odr >= 6.25f) && (odr < 12.5f)) { in acc_odr_to_reg() 86 } else if ((odr >= 12.5f) && (odr < 25.0f)) { in acc_odr_to_reg() 88 } else if ((odr >= 25.0f) && (odr < 50.0f)) { in acc_odr_to_reg() 90 } else if ((odr >= 50.0f) && (odr < 100.0f)) { in acc_odr_to_reg() 92 } else if ((odr >= 100.0f) && (odr < 200.0f)) { in acc_odr_to_reg() 94 } else if ((odr >= 200.0f) && (odr < 400.0f)) { in acc_odr_to_reg() [all …]
|
/Zephyr-Core-2.7.6/drivers/sensor/adxl372/ |
D | Kconfig | 46 output data rate (ODR). 51 prompt "Accelerometer sampling frequency (ODR)" 82 at the user selected ODR. 84 is more than half the ODR alias or fold into the measurement bandwidth 121 bool "ODR/210" 124 bool "ODR/411" 127 bool "ODR/812" 130 bool "ODR/1616" 159 for 6400 Hz ODR, and it is 6.6 ms per code for 3200 Hz ODR and below. 169 required to detect inactivity. It is 26 ms per code for 3200 Hz ODR [all …]
|
D | adxl372.c | 331 * @param odr - Output data rate. 339 static int adxl372_set_odr(const struct device *dev, enum adxl372_odr odr) in adxl372_set_odr() argument 343 ADXL372_TIMING_ODR_MODE(odr)); in adxl372_set_odr() 614 enum adxl372_odr odr; in adxl372_attr_set_odr() local 618 odr = ADXL372_ODR_400HZ; in adxl372_attr_set_odr() 621 odr = ADXL372_ODR_800HZ; in adxl372_attr_set_odr() 624 odr = ADXL372_ODR_1600HZ; in adxl372_attr_set_odr() 627 odr = ADXL372_ODR_3200HZ; in adxl372_attr_set_odr() 630 odr = ADXL372_ODR_6400HZ; in adxl372_attr_set_odr() 636 return adxl372_set_odr(dev, odr); in adxl372_attr_set_odr() [all …]
|
/Zephyr-Core-2.7.6/drivers/sensor/stts751/ |
D | stts751.c | 25 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-Core-2.7.6/drivers/sensor/lps22hh/ |
D | lps22hh.c | 25 static inline int lps22hh_set_odr_raw(const struct device *dev, uint8_t odr) in lps22hh_set_odr_raw() argument 29 return lps22hh_data_rate_set(data->ctx, odr); in lps22hh_set_odr_raw() 101 int odr; in lps22hh_odr_set() local 103 for (odr = 0; odr < ARRAY_SIZE(lps22hh_map); odr++) { in lps22hh_odr_set() 104 if (freq == lps22hh_map[odr]) { in lps22hh_odr_set() 109 if (odr == ARRAY_SIZE(lps22hh_map)) { in lps22hh_odr_set() 114 if (lps22hh_set_odr_raw(dev, odr) < 0) { in lps22hh_odr_set()
|
/Zephyr-Core-2.7.6/drivers/sensor/ism330dhcx/ |
D | ism330dhcx_shub.c | 103 uint8_t odr, cfg; in ism330dhcx_lis2mdl_odr_set() local 105 for (odr = 0; odr < ARRAY_SIZE(lis2mdl_map); odr++) { in ism330dhcx_lis2mdl_odr_set() 106 if (freq == lis2mdl_map[odr]) { in ism330dhcx_lis2mdl_odr_set() 111 if (odr == ARRAY_SIZE(lis2mdl_map)) { in ism330dhcx_lis2mdl_odr_set() 116 cfg = (odr << 2); in ism330dhcx_lis2mdl_odr_set() 185 /* configure ODR and BDU */ in ism330dhcx_hts221_init() 198 uint8_t odr, cfg; in ism330dhcx_hts221_odr_set() local 200 for (odr = 0; odr < ARRAY_SIZE(hts221_map); odr++) { in ism330dhcx_hts221_odr_set() 201 if (freq == hts221_map[odr]) { in ism330dhcx_hts221_odr_set() 206 if (odr == ARRAY_SIZE(hts221_map)) { in ism330dhcx_hts221_odr_set() [all …]
|
D | ism330dhcx.c | 42 static int ism330dhcx_odr_to_freq_val(uint16_t odr) in ism330dhcx_odr_to_freq_val() argument 45 if (odr < ARRAY_SIZE(ism330dhcx_odr_map)) { in ism330dhcx_odr_to_freq_val() 46 return ism330dhcx_odr_map[odr]; in ism330dhcx_odr_to_freq_val() 112 static int ism330dhcx_accel_set_odr_raw(const struct device *dev, uint8_t odr) in ism330dhcx_accel_set_odr_raw() argument 116 if (ism330dhcx_xl_data_rate_set(data->ctx, odr) < 0) { in ism330dhcx_accel_set_odr_raw() 120 data->accel_freq = ism330dhcx_odr_to_freq_val(odr); in ism330dhcx_accel_set_odr_raw() 136 static int ism330dhcx_gyro_set_odr_raw(const struct device *dev, uint8_t odr) in ism330dhcx_gyro_set_odr_raw() argument 140 if (ism330dhcx_gy_data_rate_set(data->ctx, odr) < 0) { in ism330dhcx_gyro_set_odr_raw() 149 int odr; in ism330dhcx_accel_odr_set() local 151 odr = ism330dhcx_freq_to_odr_val(freq); in ism330dhcx_accel_odr_set() [all …]
|
/Zephyr-Core-2.7.6/dts/bindings/sensor/ |
D | st,iis2dlpc-common.yaml | 93 detection to be recognized as a tap event. Where 0 equals 4*1/ODR and 94 1LSB = 8*1/ODR. 105 double-tap event. Where 0 equals 16*1/ODR and 1LSB = 32*1/ODR. 115 there must not be any overthreshold event. Where 0 equals 2*1/ODR 116 and 1LSB = 4*1/ODR.
|
D | st,lis2dw12-common.yaml | 117 detection to be recognized as a tap event. Where 0 equals 4*1/ODR and 118 1LSB = 8*1/ODR. 129 double-tap event. Where 0 equals 16*1/ODR and 1LSB = 32*1/ODR. 139 there must not be any overthreshold event. Where 0 equals 2*1/ODR 140 and 1LSB = 4*1/ODR.
|
D | nxp,fxos8700.yaml | 107 threshold. The resolution depends upon the sample rate (ODR) and the 109 ODR=800 Hz and pls_hpf_en=0, the resolution is 0.625 ms/LSB. 119 resolution depends upon the sample rate (ODR) and the high-pass filter 120 configuration (HP_FILTER_CUTOFF[pls_hpf_en]). For ODR=800 Hz and 135 PULSE_WIND register. The resolution depends upon the sample rate (ODR) 137 For ODR=800 Hz and pls_hpf_en=0, the resolution is 1.25 ms/LSB.
|
/Zephyr-Core-2.7.6/drivers/sensor/iis2iclx/ |
D | iis2iclx_shub.c | 101 uint8_t odr, cfg; in iis2iclx_lis2mdl_odr_set() local 103 for (odr = 0; odr < ARRAY_SIZE(lis2mdl_map); odr++) { in iis2iclx_lis2mdl_odr_set() 104 if (freq == lis2mdl_map[odr]) { in iis2iclx_lis2mdl_odr_set() 109 if (odr == ARRAY_SIZE(lis2mdl_map)) { in iis2iclx_lis2mdl_odr_set() 114 cfg = (odr << 2); in iis2iclx_lis2mdl_odr_set() 186 /* configure ODR and BDU */ in iis2iclx_hts221_init() 199 uint8_t odr, cfg; in iis2iclx_hts221_odr_set() local 201 for (odr = 0; odr < ARRAY_SIZE(hts221_map); odr++) { in iis2iclx_hts221_odr_set() 202 if (freq == hts221_map[odr]) { in iis2iclx_hts221_odr_set() 207 if (odr == ARRAY_SIZE(hts221_map)) { in iis2iclx_hts221_odr_set() [all …]
|
D | iis2iclx.c | 42 static int iis2iclx_odr_to_freq_val(uint16_t odr) in iis2iclx_odr_to_freq_val() argument 45 if (odr < ARRAY_SIZE(iis2iclx_odr_map)) { in iis2iclx_odr_to_freq_val() 46 return iis2iclx_odr_map[odr]; in iis2iclx_odr_to_freq_val() 97 static int iis2iclx_accel_set_odr_raw(const struct device *dev, uint8_t odr) in iis2iclx_accel_set_odr_raw() argument 102 if (iis2iclx_xl_data_rate_set((stmdev_ctx_t *)&cfg->ctx, odr) < 0) { in iis2iclx_accel_set_odr_raw() 106 data->accel_freq = iis2iclx_odr_to_freq_val(odr); in iis2iclx_accel_set_odr_raw() 113 int odr; in iis2iclx_accel_odr_set() local 115 odr = iis2iclx_freq_to_odr_val(freq); in iis2iclx_accel_odr_set() 116 if (odr < 0) { in iis2iclx_accel_odr_set() 117 return odr; in iis2iclx_accel_odr_set() [all …]
|
/Zephyr-Core-2.7.6/drivers/sensor/lsm6dso/ |
D | lsm6dso_shub.c | 101 uint8_t odr, cfg; in lsm6dso_lis2mdl_odr_set() local 103 for (odr = 0; odr < ARRAY_SIZE(lis2mdl_map); odr++) { in lsm6dso_lis2mdl_odr_set() 104 if (freq == lis2mdl_map[odr]) { in lsm6dso_lis2mdl_odr_set() 109 if (odr == ARRAY_SIZE(lis2mdl_map)) { in lsm6dso_lis2mdl_odr_set() 114 cfg = (odr << 2); in lsm6dso_lis2mdl_odr_set() 183 /* configure ODR and BDU */ in lsm6dso_hts221_init() 196 uint8_t odr, cfg; in lsm6dso_hts221_odr_set() local 198 for (odr = 0; odr < ARRAY_SIZE(hts221_map); odr++) { in lsm6dso_hts221_odr_set() 199 if (freq == hts221_map[odr]) { in lsm6dso_hts221_odr_set() 204 if (odr == ARRAY_SIZE(hts221_map)) { in lsm6dso_hts221_odr_set() [all …]
|
D | lsm6dso.c | 44 static int lsm6dso_odr_to_freq_val(uint16_t odr) in lsm6dso_odr_to_freq_val() argument 47 if (odr < ARRAY_SIZE(lsm6dso_odr_map)) { in lsm6dso_odr_to_freq_val() 48 return lsm6dso_odr_map[odr]; in lsm6dso_odr_to_freq_val() 121 static int lsm6dso_accel_set_odr_raw(const struct device *dev, uint8_t odr) in lsm6dso_accel_set_odr_raw() argument 127 if (lsm6dso_xl_data_rate_set(ctx, odr) < 0) { in lsm6dso_accel_set_odr_raw() 131 data->accel_freq = lsm6dso_odr_to_freq_val(odr); in lsm6dso_accel_set_odr_raw() 148 static int lsm6dso_gyro_set_odr_raw(const struct device *dev, uint8_t odr) in lsm6dso_gyro_set_odr_raw() argument 153 if (lsm6dso_gy_data_rate_set(ctx, odr) < 0) { in lsm6dso_gyro_set_odr_raw() 163 int odr; in lsm6dso_accel_odr_set() local 165 odr = lsm6dso_freq_to_odr_val(freq); in lsm6dso_accel_odr_set() [all …]
|
/Zephyr-Core-2.7.6/samples/sensor/lis2dh/src/ |
D | main.c | 73 struct sensor_value odr = { in main() local 79 &odr); in main() 81 printf("Failed to set odr: %d\n", rc); in main() 84 printf("Sampling at %u Hz\n", odr.val1); in main()
|
/Zephyr-Core-2.7.6/drivers/sensor/lis2dh/ |
D | lis2dh.c | 126 /* An ODR of 0 Hz is not allowed */ in lis2dh_freq_to_odr_val() 142 int odr; in lis2dh_acc_odr_set() local 147 odr = lis2dh_freq_to_odr_val(freq); in lis2dh_acc_odr_set() 148 if (odr < 0) { in lis2dh_acc_odr_set() 149 return odr; in lis2dh_acc_odr_set() 157 /* some odr values cannot be set in certain power modes */ in lis2dh_acc_odr_set() 158 if ((value & LIS2DH_LP_EN_BIT_MASK) == 0U && odr == LIS2DH_ODR_8) { in lis2dh_acc_odr_set() 162 /* adjust odr index for LP enabled mode, see table above */ in lis2dh_acc_odr_set() 164 (odr == LIS2DH_ODR_9 + 1)) { in lis2dh_acc_odr_set() 165 odr--; in lis2dh_acc_odr_set() [all …]
|
/Zephyr-Core-2.7.6/drivers/sensor/lis2ds12/ |
D | lis2ds12.c | 63 int odr; in lis2ds12_accel_odr_set() local 65 odr = lis2ds12_freq_to_odr_val(freq); in lis2ds12_accel_odr_set() 66 if (odr < 0) { in lis2ds12_accel_odr_set() 67 return odr; in lis2ds12_accel_odr_set() 73 odr << LIS2DS12_SHIFT_CTRL1_ODR) < 0) { in lis2ds12_accel_odr_set() 306 /* set sensor default odr */ in lis2ds12_init() 311 LOG_DBG("failed setting odr"); in lis2ds12_init()
|
/Zephyr-Core-2.7.6/drivers/sensor/lsm6dsl/ |
D | lsm6dsl.c | 44 static int lsm6dsl_odr_to_freq_val(uint16_t odr) in lsm6dsl_odr_to_freq_val() argument 47 if (odr < ARRAY_SIZE(lsm6dsl_odr_map)) { in lsm6dsl_odr_to_freq_val() 48 return lsm6dsl_odr_map[odr]; in lsm6dsl_odr_to_freq_val() 123 static int lsm6dsl_accel_set_odr_raw(const struct device *dev, uint8_t odr) in lsm6dsl_accel_set_odr_raw() argument 130 odr << LSM6DSL_SHIFT_CTRL1_XL_ODR_XL) < 0) { in lsm6dsl_accel_set_odr_raw() 134 data->accel_freq = lsm6dsl_odr_to_freq_val(odr); in lsm6dsl_accel_set_odr_raw() 162 static int lsm6dsl_gyro_set_odr_raw(const struct device *dev, uint8_t odr) in lsm6dsl_gyro_set_odr_raw() argument 169 odr << LSM6DSL_SHIFT_CTRL2_G_ODR_G) < 0) { in lsm6dsl_gyro_set_odr_raw() 179 int odr; in lsm6dsl_accel_odr_set() local 181 odr = lsm6dsl_freq_to_odr_val(freq); in lsm6dsl_accel_odr_set() [all …]
|
/Zephyr-Core-2.7.6/drivers/sensor/iis2mdc/ |
D | iis2mdc.c | 30 iis2mdc_odr_t odr; in iis2mdc_set_odr() local 34 odr = IIS2MDC_ODR_10Hz; in iis2mdc_set_odr() 37 odr = IIS2MDC_ODR_20Hz; in iis2mdc_set_odr() 40 odr = IIS2MDC_ODR_50Hz; in iis2mdc_set_odr() 43 odr = IIS2MDC_ODR_100Hz; in iis2mdc_set_odr() 49 if (iis2mdc_data_rate_set(iis2mdc->ctx, odr)) { in iis2mdc_set_odr() 290 LOG_DBG("set odr failed\n"); in iis2mdc_init()
|
/Zephyr-Core-2.7.6/drivers/sensor/bmi160/ |
D | bmi160.c | 258 /* An ODR of 0 Hz is not allowed */ in bmi160_freq_to_odr_val() 280 int odr = bmi160_freq_to_odr_val(freq_int, freq_milli); in bmi160_acc_odr_set() local 282 if (odr < 0) { in bmi160_acc_odr_set() 283 return odr; in bmi160_acc_odr_set() 286 /* some odr values cannot be set in certain power modes */ in bmi160_acc_odr_set() 288 odr < BMI160_ODR_25_2) || in bmi160_acc_odr_set() 290 odr < BMI160_ODR_25_32) || odr > BMI160_ODR_1600) { in bmi160_acc_odr_set() 297 (uint8_t) odr); in bmi160_acc_odr_set() 528 int odr = bmi160_freq_to_odr_val(freq_int, freq_milli); in bmi160_gyr_odr_set() local 530 if (odr < 0) { in bmi160_gyr_odr_set() [all …]
|
/Zephyr-Core-2.7.6/drivers/sensor/iis2dh/ |
D | Kconfig | 70 int "Accelerometer sampling frequency (ODR)" 76 0: ODR selected at runtime
|
/Zephyr-Core-2.7.6/drivers/sensor/bmc150_magn/ |
D | bmc150_magn.c | 43 uint8_t odr; member 190 data->odr = bmc150_magn_samp_freq_table[i].freq; in bmc150_magn_read_odr() 384 if (data->odr <= 0) { in bmc150_magn_attr_set_rep() 390 if (data->odr > max_odr) { in bmc150_magn_attr_set_rep() 410 if (data->odr <= 0) { in bmc150_magn_attr_set_rep() 416 if (data->odr > max_odr) { in bmc150_magn_attr_set_rep() 513 if (bmc150_magn_set_odr(dev, preset.odr) < 0) { in bmc150_magn_init_chip() 514 LOG_ERR("failed to set ODR to %d", in bmc150_magn_init_chip() 515 preset.odr); in bmc150_magn_init_chip() 551 data->odr = 0; in bmc150_magn_init_chip()
|
/Zephyr-Core-2.7.6/drivers/sensor/bmm150/ |
D | bmm150.c | 31 uint8_t odr; member 179 data->odr = bmm150_samp_freq_table[i].freq; in bmm150_read_odr() 391 if (data->odr <= 0) { in bmm150_attr_set_rep() 397 if (data->odr > max_odr) { in bmm150_attr_set_rep() 418 if (data->odr <= 0) { in bmm150_attr_set_rep() 424 if (data->odr > max_odr) { in bmm150_attr_set_rep() 525 if (bmm150_set_odr(dev, preset.odr) < 0) { in bmm150_init_chip() 526 LOG_ERR("failed to set ODR to %d", in bmm150_init_chip() 527 preset.odr); in bmm150_init_chip() 562 data->odr = 0; in bmm150_init_chip()
|
/Zephyr-Core-2.7.6/drivers/sensor/lis2dw12/ |
D | lis2dw12.c | 60 * @odr: Output data rate 62 static int lis2dw12_set_odr(const struct device *dev, uint16_t odr) in lis2dw12_set_odr() argument 69 if (odr == 0U) { in lis2dw12_set_odr() 73 val = LIS2DW12_ODR_TO_REG(odr); in lis2dw12_set_odr() 75 LOG_ERR("ODR too high"); in lis2dw12_set_odr() 278 /* set default odr to 12.5Hz acc */ in lis2dw12_init() 281 LOG_ERR("odr init error (12.5 Hz)"); in lis2dw12_init()
|
/Zephyr-Core-2.7.6/drivers/sensor/bmp388/ |
D | bmp388.c | 214 /* An ODR of 0 Hz is not allowed */ in bmp388_freq_to_odr_val() 236 int odr = bmp388_freq_to_odr_val(freq_int, freq_milli); in bmp388_attr_set_odr() local 238 if (odr < 0) { in bmp388_attr_set_odr() 239 return odr; in bmp388_attr_set_odr() 245 (uint8_t)odr); in bmp388_attr_set_odr() 247 data->odr = odr; in bmp388_attr_set_odr() 649 /* Set ODR */ in bmp388_init() 653 bmp388->odr) < 0) { in bmp388_init() 654 LOG_ERR("Failed to set ODR."); in bmp388_init() 713 .odr = DT_ENUM_IDX(DT_DRV_INST(inst), odr), \
|