Searched refs:LUT_ADC_STEP_SIZE (Results 1 – 3 of 3) sorted by relevance
69 #define LUT_ADC_STEP_SIZE 64 macro72 #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()
71 #define LUT_ADC_STEP_SIZE 64 macro74 #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()
72 #define LUT_ADC_STEP_SIZE 64 macro75 #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()