Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP-IDF 5.1 ADC Oneshot missing channel setting (IDFGH-8218) #9711

Closed
3 tasks done
remyhx opened this issue Sep 3, 2022 · 1 comment
Closed
3 tasks done

ESP-IDF 5.1 ADC Oneshot missing channel setting (IDFGH-8218) #9711

remyhx opened this issue Sep 3, 2022 · 1 comment
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@remyhx
Copy link

remyhx commented Sep 3, 2022

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

ESP-IDF v5.1-dev-537-g91e8312f03

Operating System used.

macOS

How did you build your project?

VS Code IDE

If you are using Windows, please specify command line type.

No response

What is the expected behavior?

Like mentioned in the help files: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/adc_oneshot.html?highlight=oneshot, after creating the ADC instance the ADC IO should be specified. (adc_oneshot_chan_cfg_t). The Atten and Bitwidth options are accessible, but Channel is not. Checking the definition in the header file https://github.com/espressif/esp-idf/blob/master/components/esp_adc/include/esp_adc/adc_oneshot.h looks like a forgotten Channel:

 * @brief ADC channel configurations
 */
typedef struct {
    adc_atten_t atten;              ///< ADC attenuation
    adc_bitwidth_t bitwidth;        ///< ADC conversion result bits
} adc_oneshot_chan_cfg_t;

What is the actual behavior?

It doesn't compile

Steps to reproduce.

Changing the legacy adc driver to the new one by help instructions

Build or installation Logs.

No response

More Information.

No response

@remyhx remyhx added the Type: Bug bugs in IDF label Sep 3, 2022
@espressif-bot espressif-bot added the Status: Opened Issue is new label Sep 3, 2022
@github-actions github-actions bot changed the title ESP-IDF 5.1 ADC Oneshot missing channel setting ESP-IDF 5.1 ADC Oneshot missing channel setting (IDFGH-8218) Sep 3, 2022
@Icarus113
Copy link
Collaborator

@remyhx Hi, thanks for this report. The doc is a little bit outdated. As shown in example, you'll need to specify the channel, when configuring it, multiple channels can be configured before reading.

The programming guide will be updated later.

@espressif-bot espressif-bot added Status: Selected for Development Issue is selected for development Status: Reviewing Issue is being reviewed Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Opened Issue is new Status: Selected for Development Issue is selected for development Status: Reviewing Issue is being reviewed Resolution: NA Issue resolution is unavailable labels Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

3 participants