Skip to content

Arduino 3.0.0 alpha1 missing entries for gpio_intr_enable and gpio_intr_disable #8737

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

Closed
1 task done
tonhuisman opened this issue Oct 7, 2023 · 7 comments
Closed
1 task done
Labels
3.0 migration issue relates to migration from 2.X to 3.X version Type: Question Only question

Comments

@tonhuisman
Copy link

Board

ESP32 any

Device Description

Any ESP32 build using Arduino 3.0.0 aplha1 framework that uses gpio_intr_enable and/or gpio_intr_disable entries.

Hardware Configuration

d/c

Version

latest master (checkout manually)

IDE Name

PlatformIO

Operating System

Windows 11

Flash frequency

default

PSRAM enabled

yes

Upload speed

115200

Description

Trying to update the IRremoteESP8266 library to use Arduino 3.0/IDF 5.1, but this doesn't compile for missing the entries gpio_intr_enable and gpio_intr_disable.
These entries are still available in the Arduino 2.0.14 release, and I'd expect them to be in the 3.0 release too. Or a properly documented alternative (though that's less desirable).

It is suggested to use esp_intr_enable and esp_intr_disable as an alternative, but that has a different signature, so not really usable.

Sketch

#if defined(ESP32)
  gpio_intr_disable((gpio_num_t)params.recvpin);
#endif  // ESP32

Debug Message

src/IRrecv.cpp:434:3: error: 'gpio_intr_disable' was not declared in this scope; did you mean 'esp_intr_disable'?
  434 |   gpio_intr_disable((gpio_num_t)params.recvpin);
      |   ^~~~~~~~~~~~~~~~~
      |   esp_intr_disable

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@me-no-dev
Copy link
Member

This is ESP-IDF API and as such we do not have control over it. You are welcome to go complain in the ESP-IDF repo or use actual Arduino API (this is the Arduino repo). There is nothing we can/should do. We have however been providing the current Arduino version in a header, so you can filter by that in your lib and change the calls for IDF 5+

@tonhuisman
Copy link
Author

change the calls for IDF 5+

Well, the issue is that in ESP-IDF v5.1.x these calls are available, but when using this Arduino 3.0.0 alpha1 release, that AFAICS includes ESP-IDF v5.1.1, they aren't available... 🤔

@Jason2866
Copy link
Collaborator

Jason2866 commented Oct 7, 2023

@me-no-dev Do i understand correctly that the support for (which was there in Arduino 2.0.x) is dropped in Arduino 3.0.0? As @tonhuisman already said the API is in IDF 5.1.

@me-no-dev
Copy link
Member

If it's in IDF, then it's in Arduino too. We do not control this. The point here is that we do not provide support for ESP-IDF APIs, we provide our own APIs (Arduino) and accept issues about those. The IDF APIs are for ESP-IDF's repo.

@me-no-dev
Copy link
Member

BTW APIs are in 3.0.0-alpha1 https://github.com/espressif/esp32-arduino-libs/blob/idf-release/v5.1/esp32/include/driver/gpio/include/driver/gpio.h#L111-L125

@Jason2866
Copy link
Collaborator

Thx for clarifying!

@Jason2866 Jason2866 added Status: Solved and removed Status: Awaiting triage Issue is waiting for triage labels Oct 7, 2023
@tonhuisman
Copy link
Author

As Jason pointed out in the IRremoteESP8266 PR, using #include <driver/gpio.h> fixes the compilation error.
Thanks @Jason2866 ! 🦸

@VojtechBartoska VojtechBartoska added 3.0 migration issue relates to migration from 2.X to 3.X version Type: Question Only question and removed Status: Solved labels Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 migration issue relates to migration from 2.X to 3.X version Type: Question Only question
Projects
None yet
Development

No branches or pull requests

4 participants