Merge branch 'bugfix/add_comments_for_adc' into 'master'
driver(adc): Add descriptions that starting ADC can trigger interrupt of GPIO36… See merge request idf/esp-idf!1910
This commit is contained in:
commit
64c52022b9
2 changed files with 23 additions and 0 deletions
|
@ -192,6 +192,10 @@ esp_err_t adc1_config_channel_atten(adc1_channel_t channel, adc_atten_t atten);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Take an ADC1 reading from a single channel.
|
* @brief Take an ADC1 reading from 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 Call adc1_config_width() before the first time this
|
* @note Call adc1_config_width() before the first time this
|
||||||
* function is called.
|
* function is called.
|
||||||
|
@ -210,6 +214,11 @@ int adc1_get_raw(adc1_channel_t channel);
|
||||||
|
|
||||||
/** @cond */ //Doxygen command to hide deprecated function from API Reference
|
/** @cond */ //Doxygen command to hide deprecated function from API Reference
|
||||||
/*
|
/*
|
||||||
|
* @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.
|
||||||
|
*
|
||||||
* @deprecated This function returns an ADC1 reading but is deprecated due to
|
* @deprecated This function returns an ADC1 reading but is deprecated due to
|
||||||
* a misleading name and has been changed to directly call the new function.
|
* a misleading name and has been changed to directly call the new function.
|
||||||
* Use the new function adc1_get_raw() instead
|
* Use the new function adc1_get_raw() instead
|
||||||
|
@ -288,6 +297,11 @@ void adc1_ulp_enable();
|
||||||
/**
|
/**
|
||||||
* @brief Read Hall Sensor
|
* @brief Read Hall Sensor
|
||||||
*
|
*
|
||||||
|
* @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 The Hall Sensor uses channels 0 and 3 of ADC1. Do not configure
|
* @note The Hall Sensor uses channels 0 and 3 of ADC1. Do not configure
|
||||||
* these channels for use as ADC channels.
|
* these channels for use as ADC channels.
|
||||||
*
|
*
|
||||||
|
@ -349,6 +363,11 @@ esp_err_t adc2_config_channel_atten(adc2_channel_t channel, adc_atten_t atten);
|
||||||
/**
|
/**
|
||||||
* @brief Take an ADC2 reading on a single channel
|
* @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()``
|
* @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
|
* 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``.
|
* function will always fail with ``ESP_ERR_TIMEOUT``.
|
||||||
|
|
|
@ -265,6 +265,10 @@ esp_err_t gpio_set_intr_type(gpio_num_t gpio_num, gpio_int_type_t intr_type);
|
||||||
/**
|
/**
|
||||||
* @brief Enable GPIO module interrupt signal
|
* @brief Enable GPIO module interrupt signal
|
||||||
*
|
*
|
||||||
|
* @note Please do not use the interrupt of GPIO36 and GPIO39 when using ADC.
|
||||||
|
* Please refer to the comments of `adc1_get_raw`.
|
||||||
|
* Please refer to section 3.11 of 'ECO_and_Workarounds_for_Bugs_in_ESP32' for the description of this issue.
|
||||||
|
*
|
||||||
* @param gpio_num GPIO number. If you want to enable an interrupt on e.g. GPIO16, gpio_num should be GPIO_NUM_16 (16);
|
* @param gpio_num GPIO number. If you want to enable an interrupt on e.g. GPIO16, gpio_num should be GPIO_NUM_16 (16);
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
|
Loading…
Reference in a new issue