-
Notifications
You must be signed in to change notification settings - Fork 885
Description
Version/revision of the library used 2.8.6
Describe the bug
The lib cannot be used with ESP32 Core v.3.x
To Reproduce
Errors are generated by Arduino IDE when I try to compile the IRrecvDemo.ino example:
c:\Users\user\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp: In function 'void gpio_intr()':
c:\Users\user\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:218:10: warning: '++' expression of 'volatile'-qualified type is deprecated [-Wvolatile]
218 | params.rawlen++;
| ~~~~~~~^~~~~~
c:\Users\user\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:246:3: error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'?
246 | timerAlarmEnable(timer);
| ^~~~~~~~~~~~~~~~
| timerAlarm
c:\Users\user\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::enableIRIn(bool)':
c:\Users\user\Arduino\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\kvark\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.1\cores\esp32/esp32-hal.h:98,
from C:\Users\kvark\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.1\cores\esp32/Arduino.h:44,
from c:\Users\user\Arduino\libraries\IRremoteESP8266\src\IRrecv.h:10,
from c:\Users\user\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:6:
C:\Users\kvark\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.1\cores\esp32/esp32-hal-timer.h:35:13: note: declared here
35 | hw_timer_t timerBegin(uint32_t frequency);
| ^~~~~~~~~~
c:\Users\user\Arduino\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
c:\Users\user\Arduino\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\kvark\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.1\cores\esp32/esp32-hal-timer.h:50:6: note: declared here
50 | void timerAttachInterrupt(hw_timer_t *timer, void (*userFunc)(void));
| ^~~~~~~~~~~~~~~~~~~~
c:\Users\user\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::disableIRIn()':
c:\Users\user\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:401:3: error: 'timerAlarmDisable' was not declared in this scope
401 | timerAlarmDisable(timer);
| ^~~~~~~~~~~~~~~~~
c:\Users\user\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::resume()':
c:\Users\user\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:429:3: error: 'timerAlarmDisable' was not declared in this scope
429 | timerAlarmDisable(timer);
Example code used
Include all relevant code snippets or links to the actual code files. Tip: How to quote your code so it is still readable in the report.
Expected behaviour
What steps did you do and what should it have done? A clear and concise description of what you expected to happen.
e.g.
1. Initialise the IRsend class.
2. IRsend.sendFoobar(0xdeadbeef);
3. Foobar branded BBQ turns on and cooks me some ribs.
Output of raw data from [IRrecvDumpV2.ino]
What brand/model IR demodulator are you using?
None
Circuit diagram and hardware used (if applicable)
I have followed the steps in the [Troubleshooting Guide]
Not applicable
Has this library/code previously worked as expected for you?
No
Other useful information
The lib works well with ESP32 Core v.2.0.17