Home
last modified time | relevance | path

Searched refs:cal (Results 1 – 25 of 48) sorted by relevance

12

/Zephyr-latest/drivers/sensor/bosch/bmp180/
Dbmp180.c59 struct bmp180_cal_data cal; member
281 struct bmp180_cal_data *cal = &data->cal; in bmp180_compensate_temp() local
283 partial_data1 = (data->raw_temp - cal->ac6) * cal->ac5 / 0x8000; in bmp180_compensate_temp()
284 partial_data2 = cal->mc * 0x800 / (partial_data1 + cal->md); in bmp180_compensate_temp()
319 struct bmp180_cal_data *cal = &data->cal; in bmp180_compensate_press() local
322 partial_X1 = cal->b2 * partial_B6 * (float)(1.0f * partial_B6 / 0x800000); in bmp180_compensate_press()
323 partial_X2 = (cal->ac2 * partial_B6) / 0x800; in bmp180_compensate_press()
325 partial_B3 = (((cal->ac1 * 4 + partial_X3) << data->osr_pressure) + 2) / 4; in bmp180_compensate_press()
327 partial_X1 = (cal->ac3 * partial_B6) / 0x2000; in bmp180_compensate_press()
328 partial_X2 = cal->b1 * partial_B6 * (float)(1.0f * partial_B6 / 0x8000000); in bmp180_compensate_press()
[all …]
/Zephyr-latest/tests/subsys/fs/fat_fs_api/src/
Dmain.c18 struct tm *cal; in get_fattime() local
21 cal = localtime(&unix_time); in get_fattime()
24 return (DWORD)(cal->tm_year - 80) << 25 | (DWORD)(cal->tm_mon + 1) << 21 | in get_fattime()
25 (DWORD)cal->tm_mday << 16 | (DWORD)cal->tm_hour << 11 | (DWORD)cal->tm_min << 5 | in get_fattime()
26 (DWORD)cal->tm_sec >> 1; in get_fattime()
/Zephyr-latest/drivers/input/
Dinput_analog_axis_settings.c23 struct analog_axis_calibration cal; in analog_axis_calibration_log() local
27 analog_axis_calibration_get(dev, i, &cal); in analog_axis_calibration_log()
30 dev->name, i, cal.in_min, cal.in_max, cal.in_deadzone); in analog_axis_calibration_log()
38 struct analog_axis_calibration cal[MAX_AXES]; in analog_axis_calibration_load() local
60 len = read_cb(cb_arg, cal, sizeof(cal)); in analog_axis_calibration_load()
73 analog_axis_calibration_set(dev, i, &cal[i]); in analog_axis_calibration_load()
86 struct analog_axis_calibration cal[MAX_AXES]; in analog_axis_calibration_save() local
100 analog_axis_calibration_get(dev, i, &cal[i]); in analog_axis_calibration_save()
103 ret = settings_save_one(path, &cal[0], in analog_axis_calibration_save()
Dinput_analog_axis.c72 struct analog_axis_calibration *cal = &cfg->calibration[channel]; in analog_axis_calibration_get() local
79 memcpy(out_cal, cal, sizeof(struct analog_axis_calibration)); in analog_axis_calibration_get()
100 struct analog_axis_calibration *cal = &cfg->calibration[channel]; in analog_axis_calibration_set() local
107 memcpy(cal, new_cal, sizeof(struct analog_axis_calibration)); in analog_axis_calibration_set()
119 struct analog_axis_calibration *cal = &cfg->calibration[channel]; in analog_axis_out_deadzone() local
121 int16_t in_range = cal->in_max - cal->in_min; in analog_axis_out_deadzone()
123 int16_t in_mid = DIV_ROUND_CLOSEST(cal->in_min + cal->in_max, 2); in analog_axis_out_deadzone()
124 int16_t in_min = cal->in_min; in analog_axis_out_deadzone()
126 if (abs(raw_val - in_mid) < cal->in_deadzone) { in analog_axis_out_deadzone()
130 in_range -= cal->in_deadzone * 2; in analog_axis_out_deadzone()
[all …]
/Zephyr-latest/drivers/sensor/bosch/bmp388/
Dbmp388.c286 struct bmp388_cal_data *cal = &data->cal; in bmp388_compensate_temp() local
288 partial_data1 = ((int64_t)data->sample.raw_temp - (256 * cal->t1)); in bmp388_compensate_temp()
289 partial_data2 = cal->t2 * partial_data1; in bmp388_compensate_temp()
291 partial_data4 = (int64_t)partial_data3 * cal->t3; in bmp388_compensate_temp()
331 struct bmp388_cal_data *cal = &data->cal; in bmp388_compensate_press() local
339 partial_data4 = (cal->p8 * partial_data3) / 32; in bmp388_compensate_press()
340 partial_data5 = (cal->p7 * partial_data1) * 16; in bmp388_compensate_press()
341 partial_data6 = (cal->p6 * t_lin) * 4194304; in bmp388_compensate_press()
342 offset = (cal->p5 * 140737488355328) + partial_data4 + partial_data5 + in bmp388_compensate_press()
344 partial_data2 = (cal->p4 * partial_data3) / 32; in bmp388_compensate_press()
[all …]
/Zephyr-latest/soc/atmel/sam0/common/
Dsoc_saml2x.c47 uint32_t cal; in osc32k_init() local
50 cal = *((uint32_t *)NVMCTRL_OTP5); in osc32k_init()
51 cal >>= 6; in osc32k_init()
52 cal &= (1 << 7) - 1; in osc32k_init()
55 | OSC32KCTRL_OSC32K_CALIB(cal) in osc32k_init()
109 uint32_t cal; in dfll48m_init() local
144 cal = *((uint32_t *)NVMCTRL_OTP5); in dfll48m_init()
145 cal >>= 26; in dfll48m_init()
146 cal &= (1 << 6) - 1; in dfll48m_init()
158 | OSCCTRL_DFLLVAL_COARSE(cal) in dfll48m_init()
Dsoc_samd2x.c80 uint32_t cal; in osc32k_init() local
83 cal = (*((uint32_t *)FUSES_OSC32K_CAL_ADDR) in osc32k_init()
86 SYSCTRL->OSC32K.reg = SYSCTRL_OSC32K_CALIB(cal) in osc32k_init()
/Zephyr-latest/boards/nxp/lpcxpresso55s16/
Dlpcxpresso55s16.dts34 tx-d-cal = <5>;
35 tx-cal-45-dp-ohms = <10>;
36 tx-cal-45-dm-ohms = <10>;
/Zephyr-latest/include/zephyr/input/
Dinput_analog_axis.h78 struct analog_axis_calibration *cal);
93 struct analog_axis_calibration *cal);
/Zephyr-latest/dts/arm/st/f0/
Dstm32f030.dtsi15 compatible = "st,stm32c0-temp-cal";
18 ts-cal-vrefanalog = <3300>;
Dstm32f031.dtsi45 compatible = "st,stm32-temp-cal";
50 ts-cal-vrefanalog = <3300>;
/Zephyr-latest/drivers/adc/
Dadc_esp32.c390 uint32_t cal, cal_mv; in adc_esp32_read() local
458 cal = cal_mv = esp_adc_cal_raw_to_voltage(reading, &data->chars[channel_id]); in adc_esp32_read()
462 if (cal > ADC_CLIP_MVOLT_12DB) { in adc_esp32_read()
463 cal = ADC_CLIP_MVOLT_12DB; in adc_esp32_read()
469 atten_to_gain(data->attenuation[channel_id], &cal); in adc_esp32_read()
471 cal = (cal << data->resolution[channel_id]) / data->meas_ref_internal; in adc_esp32_read()
476 cal = reading; in adc_esp32_read()
481 data->buffer[0] = cal; in adc_esp32_read()
606 esp_adc_cal_value_t cal = esp_adc_cal_characterize(conf->unit, in adc_esp32_channel_setup() local
611 if (cal >= ESP_ADC_CAL_VAL_NOT_SUPPORTED) { in adc_esp32_channel_setup()
[all …]
/Zephyr-latest/boards/nxp/frdm_mcxn947/
Dfrdm_mcxn947_mcxn947_cpu0.dtsi190 tx-d-cal = <4>;
191 tx-cal-45-dp-ohms = <7>;
192 tx-cal-45-dm-ohms = <7>;
/Zephyr-latest/drivers/sensor/ti/ina23x/
Dina237.h58 uint16_t cal; member
Dina230.h55 uint16_t cal; member
Dina230.c177 ret = ina23x_reg_write(&config->bus, INA230_REG_CALIB, config->cal); in ina230_calibrate()
263 .cal = (uint16_t)(((INA230_CAL_SCALING * 10000000ULL) / \
/Zephyr-latest/boards/nxp/lpcxpresso55s69/
Dlpcxpresso55s69_lpc55s69_cpu0.dts160 tx-d-cal = <5>;
161 tx-cal-45-dp-ohms = <10>;
162 tx-cal-45-dm-ohms = <10>;
/Zephyr-latest/boards/nxp/mimxrt1170_evk/
Dmimxrt1170_evk_mimxrt1176_cm7.dts158 tx-d-cal = <7>;
159 tx-cal-45-dp-ohms = <6>;
160 tx-cal-45-dm-ohms = <6>;
/Zephyr-latest/drivers/sensor/ti/ina219/
Dina219.c96 uint16_t cal; in ina219_set_calib() local
98 cal = INA219_SCALING_FACTOR / ((cfg->r_shunt) * (cfg->current_lsb)); in ina219_set_calib()
100 return ina219_reg_write(dev, INA219_REG_CALIB, cal); in ina219_set_calib()
/Zephyr-latest/drivers/sensor/ti/ina226/
Dina226.c53 uint16_t cal; member
247 ret = ina226_reg_write(&config->bus, INA226_REG_CALIB, config->cal); in ina226_calibrate()
318 .cal = INA226_CAL_SCALING * 10000000ULL / \
/Zephyr-latest/dts/arm/st/f7/
Dstm32f722.dtsi52 vrefint-cal-addr = <0x1FF07A2A>;
/Zephyr-latest/dts/arm/st/l0/
Dstm32l0.dtsi341 compatible = "st,stm32-temp-cal";
346 ts-cal-vrefanalog = <3000>;
353 vrefint-cal-addr = <0x1FF80078>;
354 vrefint-cal-mv = <3000>;
/Zephyr-latest/boards/nxp/mimxrt1060_evk/
Dmimxrt1060_evk.dtsi193 tx-d-cal = <12>;
194 tx-cal-45-dp-ohms = <6>;
195 tx-cal-45-dm-ohms = <6>;
/Zephyr-latest/dts/arm/st/c0/
Dstm32c0.dtsi357 compatible = "st,stm32c0-temp-cal";
360 ts-cal-vrefanalog = <3000>;
368 vrefint-cal-addr = <0x1FFF756A>;
369 vrefint-cal-mv = <3000>;
/Zephyr-latest/dts/arm/st/l1/
Dstm32l1.dtsi474 compatible = "st,stm32-temp-cal";
479 ts-cal-vrefanalog = <3000>;
486 vrefint-cal-addr = <0x1FF800F8>;
487 vrefint-cal-mv = <3000>;

12