Home
last modified time | relevance | path

Searched refs:LUT_ADC_STEP_SIZE (Results 1 – 3 of 3) sorted by relevance

/hal_espressif-latest/components/esp_adc/deprecated/esp32/
Desp_adc_cal_legacy.c69 #define LUT_ADC_STEP_SIZE 64 macro
72 #define LUT_HIGH_THRESH (LUT_LOW_THRESH + LUT_ADC_STEP_SIZE)
236 uint32_t i = (adc - LUT_LOW_THRESH) / LUT_ADC_STEP_SIZE; in calculate_voltage_lut()
241 int y2dist = ((i + 1) * LUT_ADC_STEP_SIZE) + LUT_LOW_THRESH - adc; //(y2 - y) in calculate_voltage_lut()
242 int y1dist = adc - ((i * LUT_ADC_STEP_SIZE) + LUT_LOW_THRESH); //(y - y1) in calculate_voltage_lut()
253 voltage += ((LUT_VREF_HIGH - LUT_VREF_LOW) * LUT_ADC_STEP_SIZE) / 2; //Integer division rounding in calculate_voltage_lut()
254 … voltage /= ((LUT_VREF_HIGH - LUT_VREF_LOW) * LUT_ADC_STEP_SIZE); //Divide by ((x2-x1)*(y2-y1)) in calculate_voltage_lut()
341 …return interpolate_two_points(linear_voltage, lut_voltage, LUT_ADC_STEP_SIZE, (adc_reading - LUT_L… in esp_adc_cal_raw_to_voltage()
/hal_espressif-latest/zephyr/esp32/src/esp_adc_cal/
Desp_adc_cal.c71 #define LUT_ADC_STEP_SIZE 64 macro
74 #define LUT_HIGH_THRESH (LUT_LOW_THRESH + LUT_ADC_STEP_SIZE)
242 uint32_t i = (adc - LUT_LOW_THRESH) / LUT_ADC_STEP_SIZE; in calculate_voltage_lut()
247 int y2dist = ((i + 1) * LUT_ADC_STEP_SIZE) + LUT_LOW_THRESH - adc; //(y2 - y) in calculate_voltage_lut()
248 int y1dist = adc - ((i * LUT_ADC_STEP_SIZE) + LUT_LOW_THRESH); //(y - y1) in calculate_voltage_lut()
259 voltage += ((LUT_VREF_HIGH - LUT_VREF_LOW) * LUT_ADC_STEP_SIZE) / 2; //Integer division rounding in calculate_voltage_lut()
260 … voltage /= ((LUT_VREF_HIGH - LUT_VREF_LOW) * LUT_ADC_STEP_SIZE); //Divide by ((x2-x1)*(y2-y1)) in calculate_voltage_lut()
347 …return interpolate_two_points(linear_voltage, lut_voltage, LUT_ADC_STEP_SIZE, (adc_reading - LUT_L… in esp_adc_cal_raw_to_voltage()
/hal_espressif-latest/components/esp_adc/esp32/
Dadc_cali_line_fitting.c72 #define LUT_ADC_STEP_SIZE 64 macro
75 #define LUT_HIGH_THRESH (LUT_LOW_THRESH + LUT_ADC_STEP_SIZE)
262 …*voltage = interpolate_two_points(linear_voltage, lut_voltage, LUT_ADC_STEP_SIZE, (raw - LUT_LOW_T… in cali_raw_to_voltage()
415 uint32_t i = (adc - LUT_LOW_THRESH) / LUT_ADC_STEP_SIZE; in calculate_voltage_lut()
420 int y2dist = ((i + 1) * LUT_ADC_STEP_SIZE) + LUT_LOW_THRESH - adc; //(y2 - y) in calculate_voltage_lut()
421 int y1dist = adc - ((i * LUT_ADC_STEP_SIZE) + LUT_LOW_THRESH); //(y - y1) in calculate_voltage_lut()
432 voltage += ((LUT_VREF_HIGH - LUT_VREF_LOW) * LUT_ADC_STEP_SIZE) / 2; //Integer division rounding in calculate_voltage_lut()
433 … voltage /= ((LUT_VREF_HIGH - LUT_VREF_LOW) * LUT_ADC_STEP_SIZE); //Divide by ((x2-x1)*(y2-y1)) in calculate_voltage_lut()