Infrared remote library for ESP8266/ESP32: send and receive infrared signals with multiple protocols. Based on: https://github.com/shirriff/Arduino-IRremote/
GNU Lesser General Public License v2.1
2.84k
stars
810
forks
source link
Got error messages in Arduino IDE v3.0.1(ESP32C3) something like timerAlarm or void gpio_intr() #2107
Today I upgraded ESP32 board to v3.0.1, but when I uploaded my code it showed error messages while compiling or uploading code that with IRremoteESP8266 lib in EPS32C3.
The Arduion IDE version 2.3.2, and ESP32 board version 3.0.1.
The error messages like below:
d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp: In function 'void gpio_intr()':
d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp:246:3: error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'?
246 | timerAlarmEnable(timer);
| ^~~~
| timerAlarm
d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::enableIRIn(bool)':
d:\�{���g�@\�{���y����Ƨ�\libraries\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 C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\cores\esp32/esp32-hal.h:84,
from C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\cores\esp32/Arduino.h:36,
from d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.h:10,
from d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp:6:
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\cores\esp32/esp32-hal-timer.h:35:13: note: declared here
35 | hw_timer_t timerBegin(uint32_t frequency);
| ^~~~~~
d:\�{���g�@\�{���y����Ƨ�\libraries\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
d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp:375:23: error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t, void ()())'
375 | timerAttachInterrupt(timer, &read_timeout, false);
| ~~~~^~~~~~~~~
C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\cores\esp32/esp32-hal-timer.h:50:6: note: declared here
50 | void timerAttachInterrupt(hw_timer_t timer, void (userFunc)(void));
| ^~~~~~~~
d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::disableIRIn()':
d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp:401:3: error: 'timerAlarmDisable' was not declared in this scope
401 | timerAlarmDisable(timer);
| ^~~~~
d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::pause()':
d:\�{���g�@\�{���y����Ƨ�\libraries\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
d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::resume()':
d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp:429:3: error: 'timerAlarmDisable' was not declared in this scope
429 | timerAlarmDisable(timer);
| ^~~~~
d:\�{���g�@\�{���y����Ƨ�\libraries\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
exit status 1
Compilation error: exit status 1
To Reproduce
Opened example code in Arduino IDE, but once clicked upload or compile button, it got error messages.
Expected behaviour
Can compile and upload code to ESP32C3 in version 3.0.1.
I have followed the steps in the [Troubleshooting Guide]
Yes
Has this library/code previously worked as expected for you?
Version/revision of the library used
IRremoteESP8266 v2.8.6 on Jul 28, 2023.
Describe the bug
Today I upgraded ESP32 board to v3.0.1, but when I uploaded my code it showed error messages while compiling or uploading code that with IRremoteESP8266 lib in EPS32C3. The Arduion IDE version 2.3.2, and ESP32 board version 3.0.1. The error messages like below:
d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp: In function 'void gpio_intr()': d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp:246:3: error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'? 246 | timerAlarmEnable(timer); | ^
~~~| timerAlarm d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::enableIRIn(bool)': d:\�{���g�@\�{���y����Ƨ�\libraries\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 C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\cores\esp32/esp32-hal.h:84, from C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\cores\esp32/Arduino.h:36, from d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.h:10, from d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp:6: C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\cores\esp32/esp32-hal-timer.h:35:13: note: declared here 35 | hw_timer_t timerBegin(uint32_t frequency); | ^~~~~~ d:\�{���g�@\�{���y����Ƨ�\libraries\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 d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp:375:23: error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t, void ()())' 375 | timerAttachInterrupt(timer, &read_timeout, false); |~~~~^~~~~~~~~ C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\cores\esp32/esp32-hal-timer.h:50:6: note: declared here 50 | void timerAttachInterrupt(hw_timer_t timer, void (userFunc)(void)); | ^~~~~~~~ d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::disableIRIn()': d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp:401:3: error: 'timerAlarmDisable' was not declared in this scope 401 | timerAlarmDisable(timer); | ^~~~~ d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::pause()': d:\�{���g�@\�{���y����Ƨ�\libraries\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 d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::resume()': d:\�{���g�@\�{���y����Ƨ�\libraries\IRremoteESP8266\src\IRrecv.cpp:429:3: error: 'timerAlarmDisable' was not declared in this scope 429 | timerAlarmDisable(timer); | ^~~~~ d:\�{���g�@\�{���y����Ƨ�\libraries\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 exit status 1 Compilation error: exit status 1To Reproduce
Opened example code in Arduino IDE, but once clicked upload or compile button, it got error messages.
Expected behaviour
Can compile and upload code to ESP32C3 in version 3.0.1.
I have followed the steps in the [Troubleshooting Guide]
Yes
Has this library/code previously worked as expected for you?
Yes In Arduino IDE ESP32 v 2.0.17