Function esp_idf_hal::sys::adc_vref_to_gpio
source · pub unsafe extern "C" fn adc_vref_to_gpio(
adc_unit: u32,
gpio: i32,
) -> i32
Expand description
@brief Output ADC1 or ADC2’s reference voltage to adc2_channe_t
’s IO.
This function routes the internal reference voltage of ADCn to one of ADC2’s channels. This reference voltage can then be manually measured for calibration purposes.
@note ESP32 only supports output of ADC2’s internal reference voltage. @param[in] adc_unit ADC unit index @param[in] gpio GPIO number (Only ADC2’s channels IO are supported)
@return - ESP_OK: v_ref successfully routed to selected GPIO - ESP_ERR_INVALID_ARG: Unsupported GPIO