driver(i2s): fix broken i2s adc mode

1. Move i2s reset code from i2s_stop to i2s_start.
2. add RTC API to set sw mode for ADC
3. add description for adc_power_always_on()
4. add lock for i2s dma and RTC ADC functions.
5. add ADC read task in example

reported from bbs:  https://esp32.com/viewtopic.php?f=13&t=3490&p=17522#p17522
reported from github: https://github.com/espressif/esp-idf/issues/1333
This commit is contained in:
Wangjialin
2017-12-08 20:07:19 +08:00
parent 475ffe78e8
commit 451f69cc2e
7 changed files with 242 additions and 32 deletions

View File

@@ -204,12 +204,13 @@ int adc1_get_voltage(adc1_channel_t channel) __attribute__((deprecated));
/** @endcond */
/**
* @brief Power on SAR ADC
* @brief Enable ADC power
*/
void adc_power_on();
/**
* @brief Power off SAR ADC
* This function will force power down for ADC
*/
void adc_power_off();