Function esp_idf_hal::sys::adc_oneshot_get_calibrated_result
source ยท pub unsafe extern "C" fn adc_oneshot_get_calibrated_result(
handle: *mut adc_oneshot_unit_ctx_t,
cali_handle: *mut adc_cali_scheme_t,
chan: u32,
cali_result: *mut i32,
) -> i32
Expand description
@brief Convenience function to get ADC calibrated result
This is an all-in-one function which does:
- oneshot read ADC raw result
- calibrate the raw result and convert it into calibrated result (in mV)
@param[in] handle ADC oneshot handle, you should call adc_oneshot_new_unit() to get this handle @param[in] cali_handle ADC calibration handle, you should call adc_cali_create_scheme_x() in adc_cali_scheme.h to create a handle @param[in] chan ADC channel @param[out] cali_result Calibrated ADC result (in mV)
@return - ESP_OK Other return errors from adc_oneshot_read() and adc_cali_raw_to_voltage()