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

Feature Request: Support for esp32 Arduino 3.0.0 #2039

Open
Jason2866 opened this issue Oct 6, 2023 · 34 comments · May be fixed by #2040 or #2144
Open

Feature Request: Support for esp32 Arduino 3.0.0 #2039

Jason2866 opened this issue Oct 6, 2023 · 34 comments · May be fixed by #2040 or #2144

Comments

@Jason2866
Copy link

Jason2866 commented Oct 6, 2023

Espressif Arduino 3.0.0 alpha for ESP32, ESP32-S2, ESP32-S3, ES32C3 and ESP32-C6 is released.
IRremoteESP8266 does not work with. Compile errors

@NiKiZe
Copy link
Collaborator

NiKiZe commented Oct 6, 2023

Can you be more specific? What exactly don't work?

@Jason2866
Copy link
Author

Jason2866 commented Oct 7, 2023

Trying to compile IRrecvDumpV3 with Espressif Arduino 3.0.0 alpha is generating this compile errors
The Timer API has changed. Arduino 3.0.0 is based on IDF 5.1. We (Tasmota crew) tried to adopt to the new API
It does compile, but it seems there are now timing issues. The recognition result are terrible.

/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp: In function 'void gpio_intr()':
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:218:10: warning: '++' expression of 'volatile'-qualified type is deprecated [-Wvolatile]
  218 |   params.rawlen++;
      |   ~~~~~~~^~~~~~
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:246:3: error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'?
  246 |   timerAlarmEnable(timer);
      |   ^~~~~~~~~~~~~~~~
      |   timerAlarm
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp: In member function 'void IRrecv::enableIRIn(bool)':
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:362:21: error: too many arguments to function 'hw_timer_t* timerBegin(uint32_t)'
  362 |   timer = timerBegin(_timer_num, 80, true);
      |           ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/hans/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:84,
                 from /Users/hans/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:36,
                 from /Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.h:10,
                 from /Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:6:
/Users/hans/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-timer.h:35:14: note: declared here
   35 | hw_timer_t * timerBegin(uint32_t frequency);
      |              ^~~~~~~~~~
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:371:3: error: 'timerAlarmWrite' was not declared in this scope; did you mean 'timerWrite'?
  371 |   timerAlarmWrite(timer, MS_TO_USEC(params.timeout), ONCE);
      |   ^~~~~~~~~~~~~~~
      |   timerWrite
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:375:23: error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t*, void (*)())'
  375 |   timerAttachInterrupt(timer, &read_timeout, false);
      |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/hans/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-timer.h:50:6: note: declared here
   50 | void timerAttachInterrupt(hw_timer_t * timer, void (*userFunc)(void));
      |      ^~~~~~~~~~~~~~~~~~~~
Compiling .pio/build/esp32dev/lib0e3/src/IRutils.cpp.o
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp: In member function 'void IRrecv::disableIRIn()':
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:401:3: error: 'timerAlarmDisable' was not declared in this scope
  401 |   timerAlarmDisable(timer);
      |   ^~~~~~~~~~~~~~~~~
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp: In member function 'void IRrecv::pause()':
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:416:3: error: 'gpio_intr_disable' was not declared in this scope; did you mean 'esp_intr_disable'?
  416 |   gpio_intr_disable((gpio_num_t)params.recvpin);
      |   ^~~~~~~~~~~~~~~~~
      |   esp_intr_disable
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp: In member function 'void IRrecv::resume()':
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:429:3: error: 'timerAlarmDisable' was not declared in this scope
  429 |   timerAlarmDisable(timer);
      |   ^~~~~~~~~~~~~~~~~
Archiving .pio/build/esp32dev/libcbb/libESPmDNS.a
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:430:3: error: 'gpio_intr_enable' was not declared in this scope; did you mean 'esp_intr_enable'?
  430 |   gpio_intr_enable((gpio_num_t)params.recvpin);
      |   ^~~~~~~~~~~~~~~~
      |   esp_intr_enable
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp: In member function 'void IRrecv::crudeNoiseFilter(decode_results*, uint16_t)':
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:506:37: warning: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
  506 |         results->rawbuf[offset - 1] += addition;
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
Indexing .pio/build/esp32dev/libcbb/libESPmDNS.a
*** [.pio/build/esp32dev/lib0e3/src/IRrecv.cpp.o] Error 1

@Jason2866
Copy link
Author

I made a Platform to use Arduino 3.0.0 alpha1 with Platformio. Just use this for esp32 devices

platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.10/platform-espressif32.zip

@tonhuisman
Copy link
Contributor

The compilation issues above are already solved in the Tasmota development branch and I'm working on patching these in #2040

Not yet testing with hardware, just 'making it work' first 😅

@tonhuisman
Copy link
Contributor

The gpio_intr_enable and gpio_intr_disable issues are with the 2023.10.10 platform release, and don't occur when using 2023.10.03.

@Jason2866
Copy link
Author

Jason2866 commented Oct 7, 2023

@tonhuisman Platform 2023.10.10 uses the code base of Arduino 3.0.0 alpha1 release.
Every other(platform) builds before are not relevant. The are WiP builds and do not align with anything official.
Platform 2023.10.03 is NOT Arduino 3.0.0! it is Arduino core 2.0.14

@Jason2866
Copy link
Author

Jason2866 commented Oct 7, 2023

@tonhuisman Now the fun starts, it does compile now with your open PR. Try to receive something.
EDIT: Does not work. Crashes. In earlier build it did not crash. So more work

@tonhuisman
Copy link
Contributor

tonhuisman commented Oct 7, 2023

Now the fun starts

Not sure if that's to blame on my work, as I just copied the mods made at Tasmota 😄
It crashes at calling timerAlarm, so I'd expect that to crash on Tasmota as well when using Arduinoe 3.0, but as Tasmota is still using Arduino 2,0.14 it'll probably work as before...

@Jason2866
Copy link
Author

Jason2866 commented Oct 7, 2023

It crashes with Tasmota too. Earlier WiP builds (before alpha1) did not crash.
Don't know if the introduced a bug or more changes where done which needs adopting.
But the non crashing are not useable either since most of the time decoding fails.
Ground work / investigation needs to be done.

@s-hadinger
Copy link
Contributor

I have fixed the crash and the timer issues here arendst/Tasmota#19904

@tonhuisman
Copy link
Contributor

I have fixed the crash and the timer issues here arendst/Tasmota#19904

Thanks!
I'll apply those changes in my PR soon.

@tonhuisman tonhuisman linked a pull request Nov 2, 2023 that will close this issue
@tonhuisman
Copy link
Contributor

I've applied the latest fixes by @s-hadinger and also added an extra NULL-check so it won't crash and burn when disableIRIn() is called multiple times.

@avinashboy
Copy link

avinashboy commented May 30, 2024

I'm also getting the same error on the ESP32 38-pin Development Board. Is there any update regarding this issue? What should I do? Could you please guide me on this problem?

In function 'void gpio_intr()':
error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'?
  246 |   timerAlarmEnable(timer);
      |   ^~~~~~~~~~~~~~~~
      |   timerAlarm

In member function 'void IRrecv::enableIRIn(bool)':
error: too many arguments to function 'hw_timer_t* timerBegin(uint32_t)'
  362 |   timer = timerBegin(_timer_num, 80, true);
      |           ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
note: declared here
   35 | hw_timer_t *timerBegin(uint32_t frequency);
      |             ^~~~~~~~~~

error: 'timerAlarmWrite' was not declared in this scope; did you mean 'timerWrite'?
  371 |   timerAlarmWrite(timer, MS_TO_USEC(params.timeout), ONCE);
      |   ^~~~~~~~~~~~~~~
      |   timerWrite

error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t*, void (*)())'
  375 |   timerAttachInterrupt(timer, &read_timeout, false);
      |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: declared here
   50 | void timerAttachInterrupt(hw_timer_t *timer, void (*userFunc)(void));
      |      ^~~~~~~~~~~~~~~~~~~~

In member function 'void IRrecv::disableIRIn()':
error: 'timerAlarmDisable' was not declared in this scope
  401 |   timerAlarmDisable(timer);
      |   ^~~~~~~~~~~~~~~~~

In member function 'void IRrecv::pause()':
error: 'gpio_intr_disable' was not declared in this scope; did you mean 'esp_intr_disable'?
  416 |   gpio_intr_disable((gpio_num_t)params.recvpin);
      |   ^~~~~~~~~~~~~~~~~
      |   esp_intr_disable

In member function 'void IRrecv::resume()':
error: 'timerAlarmDisable' was not declared in this scope
  429 |   timerAlarmDisable(timer);
      |   ^~~~~~~~~~~~~~~~~

error: 'gpio_intr_enable' was not declared in this scope; did you mean 'esp_intr_enable'?
  430 |   gpio_intr_enable((gpio_num_t)params.recvpin);
      |   ^~~~~~~~~~~~~~~~
      |   esp_intr_enable

Using library IRremoteESP8266 at version 2.8.6
exit status 1

Compilation error: exit status 1

@s-hadinger
Copy link
Contributor

We have made all the fixes in Tasmota but I lost track of which ones were backported here

@tonhuisman
Copy link
Contributor

@avinashboy Are you compiling #2040 with IDF 5.1? As only that branch (PR) is adjusted and (somewhat) tested with IDF 5.1, the main 2.8.6 release doesn't have that (yet).

@Zhentao-Lin
Copy link

I am a teacher, 4 days ago, arduino-esp32 was officially updated to version 3.0.0 Release, then I found that IRremoteESP8266 compiler error, currently I can only let students use arduino-esp32 version 2.0.17. Will you update the library in the future to make it compatible with 3.0.0?Wish you a happy life.

@avinashboy
Copy link

@avinashboy Are you compiling #2040 with IDF 5.1? As only that branch (PR) is adjusted and (somewhat) tested with IDF 5.1, the main 2.8.6 release doesn't have that (yet).

Yes, I do

@Zhentao-Lin
Copy link

Thank you very much. Looking forward to your update.

@avinashboy
Copy link

avinashboy commented May 31, 2024

I am a teacher, 4 days ago, arduino-esp32 was officially updated to version 3.0.0 Release, then I found that IRremoteESP8266 compiler error, currently I can only let students use arduino-esp32 version 2.0.17. Will you update the library in the future to make it compatible with 3.0.0?Wish you a happy life.

Thank you so much. It works if we downgrade the ESP32 board manager to 2.0.17.

@phphengenharia
Copy link

Hi Guys! First at all, congratulations by IRremoteESP8266!

By the way, I tried esp32-arduino-libs-3.0.2@idf-release_v5.1 and I would like you let know the compile problems:

Using library IRremoteESP8266 version 2.8.6 by David Conran, Mark Szabo, Sebastien Warin, Roi Dayan, Massimiliano Pinto, Christian Nilsson in folder "C:\Users\phmota\Documents\Arduino\libraries\IRremoteESP8266"
"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\tools\esp-x32\2302/bin/xtensa-esp32-elf-g++" -MMD -c "@c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/flags/cpp_flags" -w -Os -DF_CPU=240000000L -DARDUINO=108010 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD="ESP32_DEV"" "-DARDUINO_VARIANT="esp32"" -DARDUINO_PARTITION_default "-DARDUINO_HOST_OS="windows"" "-DARDUINO_FQBN="esp32:esp32:esp32:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,PSRAM=disabled,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default,ZigbeeMode=default"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_CDC_ON_BOOT=0 "@c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/flags/defines" "-ID:\Google Drive\PROGRAMAÇÃO\Arduino\3 - WiFi\ESP32 - DS18B20 PIR Fancoletes" -iprefix "c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/include/" "@c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/flags/includes" "-Ic:\Users\phmota\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/qio_qspi/include" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\cores\esp32" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\variants\esp32" -I"C:\Users\phmota\Documents\Arduino\libraries\OneWire" -I"C:\Users\phmota\Documents\Arduino\libraries\DallasTemperature" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\WiFi\src" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\Network\src" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\HTTPClient\src" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\NetworkClientSecure\src" -I"C:\Users\phmota\Documents\Arduino\libraries\NTPClient" -I"C:\Users\phmota\Documents\Arduino\libraries\OneWire\utility" -I"C:\Users\phmota\Documents\Arduino\libraries\DallasTemperature\utility" -I"C:\Users\phmota\Documents\Arduino\libraries\NTPClient\utility" -I"C:\Users\phmota\Documents\Arduino\libraries\IRremoteESP8266\src" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\EEPROM\src" -I"C:\Users\phmota\Documents\Arduino\libraries\WebServer\src" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\FS\src" "@C:\Users\phmota\AppData\Local\Temp\VMBuilds\Fancoletes ESP32\esp32_esp32\Release/build_opt.h" "@C:\Users\phmota\AppData\Local\Temp\VMBuilds\Fancoletes ESP32\esp32_esp32\Release/file_opts" "C:\Users\phmota\Documents\Arduino\libraries\IRremoteESP8266\src\IRac.cpp" -o "C:\Users\phmota\AppData\Local\Temp\VMBuilds\Fancoletes ESP32\esp32_esp32\Release\IRremoteESP8266\IRac.cpp.o"
"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\tools\esp-x32\2302/bin/xtensa-esp32-elf-g++" -MMD -c "@c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/flags/cpp_flags" -w -Os -DF_CPU=240000000L -DARDUINO=108010 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD="ESP32_DEV"" "-DARDUINO_VARIANT="esp32"" -DARDUINO_PARTITION_default "-DARDUINO_HOST_OS="windows"" "-DARDUINO_FQBN="esp32:esp32:esp32:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,PSRAM=disabled,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default,ZigbeeMode=default"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_CDC_ON_BOOT=0 "@c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/flags/defines" "-ID:\Google Drive\PROGRAMAÇÃO\Arduino\3 - WiFi\ESP32 - DS18B20 PIR Fancoletes" -iprefix "c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/include/" "@c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/flags/includes" "-Ic:\Users\phmota\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/qio_qspi/include" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\cores\esp32" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\variants\esp32" -I"C:\Users\phmota\Documents\Arduino\libraries\OneWire" -I"C:\Users\phmota\Documents\Arduino\libraries\DallasTemperature" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\WiFi\src" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\Network\src" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\HTTPClient\src" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\NetworkClientSecure\src" -I"C:\Users\phmota\Documents\Arduino\libraries\NTPClient" -I"C:\Users\phmota\Documents\Arduino\libraries\OneWire\utility" -I"C:\Users\phmota\Documents\Arduino\libraries\DallasTemperature\utility" -I"C:\Users\phmota\Documents\Arduino\libraries\NTPClient\utility" -I"C:\Users\phmota\Documents\Arduino\libraries\IRremoteESP8266\src" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\EEPROM\src" -I"C:\Users\phmota\Documents\Arduino\libraries\WebServer\src" -I"c:\Users\phmota\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\FS\src" "@C:\Users\phmota\AppData\Local\Temp\VMBuilds\Fancoletes ESP32\esp32_esp32\Release/build_opt.h" "@C:\Users\phmota\AppData\Local\Temp\VMBuilds\Fancoletes ESP32\esp32_esp32\Release/file_opts" "C:\Users\phmota\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp" -o "C:\Users\phmota\AppData\Local\Temp\VMBuilds\Fancoletes ESP32\esp32_esp32\Release\IRremoteESP8266\IRrecv.cpp.o"

irrecv.cpp: In function void gpio_intr()

irrecv.cpp: 246:3: error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'?
246 | timerAlarmEnable(timer)
| ^~~~~~~~~~~~~~~~
| timerAlarm
irrecv.cpp: In member function void IRrecv::enableIRIn(bool)

irrecv.cpp: 362:21: error: too many arguments to function 'hw_timer_t* timerBegin(uint32_t)
362 | timer = timerBegin(_timer_num, 80, true)
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

esp32-hal.h:84: In file included from
arduino.h:36: from
IRrecv.h:10: from
irrecv.cpp:6: from
esp32-hal-timer.h:35: note declared here
35 | hw_timer_t *timerBegin(uint32_t frequency)
| ^~~~~~~~~~

irrecv.cpp: 371:3: error: 'timerAlarmWrite' was not declared in this scope; did you mean 'timerWrite'?
371 | timerAlarmWrite(timer, MS_TO_USEC(params.timeout), ONCE)
| ^~~~~~~~~~~~~~~
| timerWrite

irrecv.cpp: 375:23: error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t*, void (*)())
375 | timerAttachInterrupt(timer, &read_timeout, false)
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
esp32-hal-timer.h:50: note declared here
50 | void timerAttachInterrupt(hw_timer_t *timer, void (*userFunc)(void))
| ^~~~~~~~~~~~~~~~~~~~
irrecv.cpp: In member function void IRrecv::disableIRIn()

irrecv.cpp: 401:3: error: 'timerAlarmDisable' was not declared in this scope
401 | timerAlarmDisable(timer)
| ^~~~~~~~~~~~~~~~~
irrecv.cpp: In member function void IRrecv::pause()

irrecv.cpp: 416:3: error: 'gpio_intr_disable' was not declared in this scope; did you mean 'esp_intr_disable'?
416 | gpio_intr_disable((gpio_num_t)params.recvpin)
| ^~~~~~~~~~~~~~~~~
| esp_intr_disable
irrecv.cpp: In member function void IRrecv::resume()

irrecv.cpp: 429:3: error: 'timerAlarmDisable' was not declared in this scope
429 | timerAlarmDisable(timer)
| ^~~~~~~~~~~~~~~~~

irrecv.cpp: 430:3: error: 'gpio_intr_enable' was not declared in this scope; did you mean 'esp_intr_enable'?
430 | gpio_intr_enable((gpio_num_t)params.recvpin)
| ^~~~~~~~~~~~~~~~
| esp_intr_enable

@Jason2866
Copy link
Author

@phphengenharia use the PR #2040 which adds the needed changes.

@phphengenharia
Copy link

It compiled fine. Thanks.

@Vorms
Copy link

Vorms commented Aug 5, 2024

I need also the update for Espressif ver 3.x

@tonhuisman
Copy link
Contributor

I need also the update for Espressif ver 3.x

Repeated answer:
use the PR #2040 which adds the needed changes.

@Abdull
Copy link

Abdull commented Aug 7, 2024

Steps to use PR #2040 in Arduino IDE 2.3.2 under Linux (no IDE restart required):

##########
# prerequisites:
# * have Github "gh" cli tool installed, e.g. for Debian 12 with "sudo apt install gh" (while quite outdated, it works for these steps)
# * in Arduino IDE 2's Library Manager GUI, remove any currently installed "IRremoteESP8266" released library, e.g. remove the currently latest (as of this writing) release 2.8.6

##########
# clone *this* repository to Arduino IDE 2's library directory:
cd "${HOME}/Arduino/libraries/"
git clone https://github.com/crankyoldgit/IRremoteESP8266.git

# check out merge request #2040:
cd "${HOME}/Arduino/libraries/IRremoteESP8266/"
gh pr checkout 2040

# if this is the first time the gh command is used, follow setup instructions,
# e.g. "gh auth login"
# then execute "gh pr checkout 2040" again

# if everything went well, "git show --summary" should show the following latest commit:
# $ git show --summary
# commit db98aa001b8302ee827d1cd23367eb43480ba5ee (HEAD -> feature/C++20-compatibility)
# Author: Ton Huisman <tonhu2004@hotmail.com>
# Date:   Thu Nov 2 21:22:16 2023 +0100
#
#     [Lib] Add latest ESP32 fixes by @s-hadinger, add extra NULL safeguard, update Platform build
#

@mm5agm
Copy link

mm5agm commented Aug 9, 2024

Steps to use PR #2040 in Arduino IDE 2.3.2 under Linux (no IDE restart required):

Can someone provide a Windows solution?

@tonhuisman
Copy link
Contributor

For Windows the git commands are the same, with the same requirement: having the Github tools installed. The only difference would be the directory names, but you should be able to open a command prompt from Windows Explorer to get there.

@Vorms

This comment was marked as off-topic.

@kaituozhe
Copy link

It seems not working with arduino-esp32 V3.0.4
I meet the same problem when using IRremoteESP8266 v2.8.6 :

In function 'void gpio_intr()':
error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'?
246 | timerAlarmEnable(timer);
| ^~~~~~~~~~~~~~~~
| timerAlarm

@Zhentao-Lin
Copy link


I haven't been able to use it for a long time and I'm waiting for them to update until they can, until then, I have my own ESP32-based rmt encapsulated library, which can barely be used to identify infrared remote controls. But it can't be used for anything else. There is no infrared transmission for the time being.

@Zhentao-Lin
Copy link

@tonhuisman
Copy link
Contributor

I meet the same problem when using IRremoteESP8266 v2.8.6 :

@kaituoshe Then most likely you didn't pull the PR code local, as described above.

@NiKiZe
Copy link
Collaborator

NiKiZe commented Sep 23, 2024

I'm considering merging #2144, looking for feedback from anyone that could help test.

@mistic100
Copy link

I tested #2144 on a Seeeduino Xiao ESP32C3 using pioarduino platform, not problem so far.

(well no more that the base library on Arduino 2, I get garbage output when using Wifi, but that's another story. Without Wifi it's OK)

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