Function esp_idf_svc::hal::sys::adc_oneshot_new_unit
source · pub unsafe extern "C" fn adc_oneshot_new_unit(
init_config: *const adc_oneshot_unit_init_cfg_t,
ret_unit: *mut *mut adc_oneshot_unit_ctx_t,
) -> i32
Expand description
@brief Create a handle to a specific ADC unit
@note This API is thread-safe. For more details, see ADC programming guide
@param[in] init_config Driver initial configurations @param[out] ret_unit ADC unit handle
@return - ESP_OK: On success - ESP_ERR_INVALID_ARG: Invalid arguments - ESP_ERR_NO_MEM: No memory - ESP_ERR_NOT_FOUND: The ADC peripheral to be claimed is already in use - ESP_FAIL: Clock source isn’t initialised correctly