IRMP-org / IRMP

Infrared Multi Protocol Decoder
GNU General Public License v3.0
267 stars 43 forks source link

simple receiver compile error #95

Open clear-sky opened 1 month ago

clear-sky commented 1 month ago

Bug Report

ESP32 DEV MODULE

IDE

IR-Protocol

Example to reproduce the issue

Version

Pin(s) used for IR-receive, if not default

default

Current behavior

Expected behavior

Additional context

checklist:

We will start to close or delete issues that do not follow these guidelines as it doesn't help the contributors who spend time trying to solve issues if the community ignores guidelines!

HI my arduino ide is 1.8.19 and esp32 core is 3.0.1 i have esp32dev module and tested simple receiver with default pin mapping from examples section but compile fails with errors:

In file included from /home/conrad/Arduino/libraries/IRMP-master/src/irmpArduinoExt.hpp:18,
                 from /home/conrad/Arduino/libraries/IRMP-master/src/irmp.hpp:3116,
                 from /tmp/arduino_modified_sketch_814045/SimpleReceiver.ino:69:
/home/conrad/Arduino/libraries/IRMP-master/src/IRTimer.hpp: In function 'void initIRTimerForReceive()':
/home/conrad/Arduino/libraries/IRMP-master/src/IRTimer.hpp:265:51: error: too many arguments to function 'hw_timer_t* timerBegin(uint32_t)'
  265 |         sReceiveAndSendInterruptTimer = timerBegin(3, 80, true);
      |                                         ~~~~~~~~~~^~~~~~~~~~~~~
In file included from /home/conrad/.arduino15/packages/esp32/hardware/esp32/3.0.1/cores/esp32/esp32-hal.h:84,
                 from /home/conrad/.arduino15/packages/esp32/hardware/esp32/3.0.1/cores/esp32/Arduino.h:36,
                 from /tmp/arduino_modified_sketch_814045/SimpleReceiver.ino:47:
/home/conrad/.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);
      |             ^~~~~~~~~~
/home/conrad/Arduino/libraries/IRMP-master/src/IRTimer.hpp:266:29: error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t*, void (*)())'
  266 |         timerAttachInterrupt(sReceiveAndSendInterruptTimer, irmp_timer_ISR, false); // false -> level interrupt, true -> edge interrupt, but this is not supported :-(
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/conrad/.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));
      |      ^~~~~~~~~~~~~~~~~~~~
/home/conrad/Arduino/libraries/IRMP-master/src/IRTimer.hpp:267:9: error: 'timerAlarmWrite' was not declared in this scope; did you mean 'timerWrite'?
  267 |         timerAlarmWrite(sReceiveAndSendInterruptTimer, ((getApbFrequency() / 80) + (IR_INTERRUPT_FREQUENCY / 2)) / IR_INTERRUPT_FREQUENCY, true);
      |         ^~~~~~~~~~~~~~~
      |         timerWrite
/home/conrad/Arduino/libraries/IRMP-master/src/IRTimer.hpp:269:5: error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'?
  269 |     timerAlarmEnable(sReceiveAndSendInterruptTimer);
      |     ^~~~~~~~~~~~~~~~
      |     timerAlarm
/home/conrad/Arduino/libraries/IRMP-master/src/IRTimer.hpp: In function 'void disableIRTimerInterrupt()':
/home/conrad/Arduino/libraries/IRMP-master/src/IRTimer.hpp:671:9: error: 'timerAlarmDisable' was not declared in this scope
  671 |         timerAlarmDisable(sReceiveAndSendInterruptTimer);
      |         ^~~~~~~~~~~~~~~~~
/home/conrad/Arduino/libraries/IRMP-master/src/IRTimer.hpp: In function 'void enableIRTimerInterrupt()':
/home/conrad/Arduino/libraries/IRMP-master/src/IRTimer.hpp:753:9: error: 'timerAlarmEnable' was not declared in this scope
  753 |         timerAlarmEnable(sReceiveAndSendInterruptTimer);
      |         ^~~~~~~~~~~~~~~~
exit status 1
Error compiling for board ESP32 Dev Module.