Function esp_idf_svc::sys::adc_continuous_read

source ยท
pub unsafe extern "C" fn adc_continuous_read(
    handle: *mut adc_continuous_ctx_t,
    buf: *mut u8,
    length_max: u32,
    out_length: *mut u32,
    timeout_ms: u32,
) -> i32
Expand description

@brief Read bytes from ADC under continuous mode.

@param[in] handle ADC continuous mode driver handle @param[out] buf Conversion result buffer to read from ADC. Suggest convert to adc_digi_output_data_t for ADC Conversion Results. See the subsection Driver Backgrounds in this header file to learn about this concept. @param[in] length_max Expected length of the Conversion Results read from the ADC, in bytes. @param[out] out_length Real length of the Conversion Results read from the ADC via this API, in bytes. @param[in] timeout_ms Time to wait for data via this API, in millisecond.

@return - ESP_ERR_INVALID_STATE Driver state is invalid. Usually it means the ADC sampling rate is faster than the task processing rate. - ESP_ERR_TIMEOUT Operation timed out - ESP_OK On success