[][src]Function esp_idf_sys::adc2_get_raw

pub unsafe extern "C" fn adc2_get_raw(
    channel: adc2_channel_t,
    width_bit: adc_bits_width_t,
    raw_out: *mut c_int
) -> esp_err_t

@brief Take an ADC2 reading on a single channel

@note When the power switch of SARADC1, SARADC2, HALL sensor and AMP sensor is turned on, the input of GPIO36 and GPIO39 will be pulled down for about 80ns. When enabling power for any of these peripherals, ignore input from GPIO36 and GPIO39. Please refer to section 3.11 of 'ECO_and_Workarounds_for_Bugs_in_ESP32' for the description of this issue.

@note For a given channel, adc2_config_channel_atten() must be called before the first time this function is called. If Wi-Fi is started via esp_wifi_start(), this function will always fail with ESP_ERR_TIMEOUT.

@param channel ADC2 channel to read

@param width_bit Bit capture width for ADC2

@param raw_out the variable to hold the output data.

@return - ESP_OK if success - ESP_ERR_TIMEOUT the WIFI is started, using the ADC2