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

DAC header isn't self contained (IDFGH-404) #2560

Closed
devsaurus opened this issue Oct 14, 2018 · 5 comments
Closed

DAC header isn't self contained (IDFGH-404) #2560

devsaurus opened this issue Oct 14, 2018 · 5 comments

Comments

@devsaurus
Copy link
Contributor

Environment

  • Development Kit: [none]
  • Core (if using chip or module): [ESP32-Wrover]
  • IDF version (git rev-parse --short HEAD to get the commit id.): 7313e39
  • Development Env: [Make]
  • Operating System: [openSuse]
  • Power Supply: [USB]

Problem Description

The driver/dac.h header uses definitions for gpio but doesn't include driver/gpio.h.

Expected Behavior

The code below compiles without errors.

Actual Behavior

sdk/esp32-esp-idf/components/driver/include/driver/dac.h:43:53: error: unknown type name 'gpio_num_t'
 esp_err_t dac_pad_get_io_num(dac_channel_t channel, gpio_num_t *gpio_num);

Steps to repropduce

Compile the code below.

Code to reproduce this issue

#include "driver/dac.h"

void myfunction(int chn) {
  dac_output_enable( chn );
}

Other items if possible

As a workaround I have to include driver/gpio.h before the dac header file even though my source file doesn't use GPIO API.

@Alvin1Zhang Alvin1Zhang changed the title DAC header isn't self contained [TW#26740] DAC header isn't self contained Oct 14, 2018
@koobest
Copy link
Contributor

koobest commented Oct 15, 2018

hi, @devsaurus, thank you, we will update the dac.h.

@xiongyumail
Copy link
Contributor

Is there any progress?

@projectgus projectgus changed the title [TW#26740] DAC header isn't self contained DAC header isn't self contained (IDFGH-404) Mar 12, 2019
@pilnikov
Copy link

pilnikov commented Jun 25, 2019

Autors, please add new line
#include "gpio.h"
and correct line 42

    • ESP_ERR_INVALID_ARG if channal not valid
      on
    • ESP_ERR_INVALID_ARG if channel not valid

@Nufflee
Copy link

Nufflee commented Feb 15, 2020

Any progress on this? Seems like a very simple change.

Edit: oh, in fact looks like it was fixed on master but the fix is not appearing in v3.30300.190916 (using PlatformIO).

This issue should probably be closed here anyways.

@Alvin1Zhang
Copy link
Collaborator

Thanks for reporting, sorry for slow turnaround, fix is available 8357318, feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants